* [PATCH blktests] scsi/009: fix unset bytes_to_write in TEST 8
@ 2026-06-14 18:16 Sebastian Chlad
2026-06-17 4:29 ` Shin'ichiro Kawasaki
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Chlad @ 2026-06-14 18:16 UTC (permalink / raw)
To: shinichiro.kawasaki, linux-block; +Cc: Sebastian Chlad
bytes_to_write was never assigned before TEST 8, causing it to pass for
the wrong reason. Set it to atomic_unit_max_bytes + logical_block_size
and update the golden output with the expected "pwrite: Invalid argument"
from xfs_io.
Signed-off-by: Sebastian Chlad <sebastian.chlad@suse.com>
---
This is a followup on: https://github.com/linux-blktests/blktests/pull/245
tests/scsi/009 | 1 +
tests/scsi/009.out | 1 +
2 files changed, 2 insertions(+)
diff --git a/tests/scsi/009 b/tests/scsi/009
index 41a5152..c7a1754 100755
--- a/tests/scsi/009
+++ b/tests/scsi/009
@@ -143,6 +143,7 @@ test_device() {
test_desc="TEST 8 - perform a pwritev2 with size of sysfs_atomic_unit_max_bytes + 512 "
test_desc+="bytes with RWF_ATOMIC flag - pwritev2 should not be succesful"
+ bytes_to_write=$(( sysfs_atomic_unit_max_bytes + sysfs_logical_block_size ))
bytes_written=$(run_xfs_io_pwritev2_atomic "$TEST_DEV" "$bytes_to_write")
if [ "$bytes_written" = "" ]
then
diff --git a/tests/scsi/009.out b/tests/scsi/009.out
index e94882d..6c3780f 100644
--- a/tests/scsi/009.out
+++ b/tests/scsi/009.out
@@ -6,6 +6,7 @@ TEST 4 - check sysfs atomic_write_unit_min_bytes = scsi_debug atomic_wr_gran - p
TEST 5 - check statx stx_atomic_write_unit_min - pass
TEST 6 - check statx stx_atomic_write_unit_max - pass
TEST 7 - perform a pwritev2 with size of sysfs_atomic_unit_max_bytes with RWF_ATOMIC flag - pwritev2 should be succesful - pass
+pwrite: Invalid argument
TEST 8 - perform a pwritev2 with size of sysfs_atomic_unit_max_bytes + 512 bytes with RWF_ATOMIC flag - pwritev2 should not be succesful - pass
TEST 9 - perform a pwritev2 with size of sysfs_atomic_unit_min_bytes with RWF_ATOMIC flag - pwritev2 should be succesful - pass
pwrite: Invalid argument
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-17 4:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 18:16 [PATCH blktests] scsi/009: fix unset bytes_to_write in TEST 8 Sebastian Chlad
2026-06-17 4:29 ` Shin'ichiro Kawasaki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox