sendfile09: skip on native 32-bit kernels
PATCH 1/1 sendfile09: skip on native 32-bit kernels
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().
--- testcases/kernel/syscalls/sendfile/sendfile09.c | 3 +++ 1 file changed, 3 insertions(+)
testcases/kernel/syscalls/sendfile/sendfile09.c +3 -0
@@ -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" );
Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
Quoted 1 line · Avinesh Kumar
sendfile09: skip on native 32-bit kernels
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/1 sendfile09: skip on native 32-bit kernels
In reply to Avinesh Kumar via ltpthis 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)
switch to ".needs_abi_bits = 64" to cover both scenarios.
---
Changes in v2:
- Use .needs_abi_bits field
--- testcases/kernel/syscalls/sendfile/sendfile09.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/sendfile/sendfile09.c +1 -1
@@ -92,7 +92,7 @@ static struct tst_test test = { .test = run, .tcnt = ARRAY_SIZE(tc), .timeout = 120, - .skip_in_compat = 1, + .needs_abi_bits = 64, .tags = (const struct tst_tag []) { {"linux-git" ,"5d73320a96fcc" }, {}
Signature · 5 lines
2.54.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
Quoted 1 line · Avinesh Kumar
sendfile09: skip on native 32-bit kernels
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Patch merged, thanks!
Signature · 5 lines
Regards, Li Wang -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
this seems to be a common pattern. Did you see this repeating for other tests which are skipping compat mode?
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Avinesh,
testcases/kernel/syscalls/sendfile/sendfile09.c static void setup(void) · line 44
Quoted 2 lines
testcases/kernel/syscalls/sendfile/sendfile09.c +2
-0+if (tst_kernel_bits () ==32 ) +tst_brk (TCONF ,"Test is only supported on 64-bit kernels" );
Why not .needs_abi_bits == 64?
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi,
Quoted 6 lines · Andrea Cervesato via ltp
Hi Avinesh,
testcases/kernel/syscalls/sendfile/sendfile09.c static void setup(void) · line 44
Quoted 2 lines
testcases/kernel/syscalls/sendfile/sendfile09.c +2
-0+if (tst_kernel_bits () ==32 ) +tst_brk (TCONF ,"Test is only supported on 64-bit kernels" );Why not .needs_abi_bits == 64?
Thanks for the review.
I switched to .needs_abi_bits check in v2
<https://lore.kernel.org/ltp/[email protected]/>
Regards,
Avinesh
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp