[LTP] [PATCH 2/4] syscalls/preadv203: don't treat short write() as failure
Jan Stancek
jstancek@redhat.com
Wed Oct 5 16:25:43 CEST 2022
Test is sporadically running into TBROK in setup() due to short write:
tst_test.c:1064: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
preadv203.c:257: TBROK: write(501,0x3fff4ef7d15,4123) failed: SUCCESS (0)
Switch to SAFE_WRITE_RETRY.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
testcases/kernel/syscalls/preadv2/preadv203.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testcases/kernel/syscalls/preadv2/preadv203.c b/testcases/kernel/syscalls/preadv2/preadv203.c
index 60dc4a882f16..25c6e1c2ecd0 100644
--- a/testcases/kernel/syscalls/preadv2/preadv203.c
+++ b/testcases/kernel/syscalls/preadv2/preadv203.c
@@ -254,7 +254,7 @@ static void setup(void)
for (j = 0; j < CHUNKS; j++) {
memset(buf, '0' + j, sizeof(buf));
- SAFE_WRITE(1, fds[i], buf, sizeof(buf));
+ SAFE_WRITE(SAFE_WRITE_RETRY, fds[i], buf, sizeof(buf));
}
}
}
--
2.27.0
More information about the ltp
mailing list