[PATCH] sendfile09: skip on native 32-bit kernels

Avinesh Kumar via ltp <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <[email protected]>
this test is already documented as 64-bit only, but
.skip_in_compat only covers 32-bit-on-64-bit. On a native 32-bit
kernel (e.g. i586) it still runs and setup's write() past 2GB fails
with EFBIG (TBROK).

sendfile09.c:49: TBROK: write(3,0x4a8011,1) failed: EFBIG (27)

TCONF on 32-bit kernels via tst_kernel_bits().

Signed-off-by: Avinesh Kumar <avinesh.kumar-IBi9RG/[email protected]>
---
 testcases/kernel/syscalls/sendfile/sendfile09.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/testcases/kernel/syscalls/sendfile/sendfile09.c b/testcases/kernel/syscalls/sendfile/sendfile09.c
index 82feaeba0..50b9c1ca7 100644
--- a/testcases/kernel/syscalls/sendfile/sendfile09.c
+++ b/testcases/kernel/syscalls/sendfile/sendfile09.c
@@ -40,6 +40,9 @@ static void setup(void)
 {
 	int i, fd;
 
+	if (tst_kernel_bits() == 32)
+		tst_brk(TCONF, "Test is only supported on 64-bit kernels");
+
 	if (!tst_fs_has_free(".", 5, TST_GB))
 		tst_brk(TCONF, "Test on large file needs 5G free space");
 
-- 
2.54.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.