summaryrefslogtreecommitdiff
path: root/tests/prlimit64.c
diff options
context:
space:
mode:
authorEugene Syromyatnikov <evgsyr@gmail.com>2021-07-21 10:06:57 +0200
committerDmitry V. Levin <ldv@strace.io>2021-07-22 08:00:00 +0000
commitba1ca1e1fc8ca7bafc39a6d6f62c309f75e2be30 (patch)
tree79283ebde2f8b6e055c6bdb492226750b307edd4 /tests/prlimit64.c
parente4feb6b8508d425942f7ae1013072e808ba30a53 (diff)
downloadstrace-ba1ca1e1fc8ca7bafc39a6d6f62c309f75e2be30.tar.gz
tests: relax -a check in prlimit64 test
The initial "-a48" check was too strict as it has hit some false positives on 32-bit arches: -prlimit64(15083, RLIMIT_AS, NULL, 0xf7ff4ff0) = -1 ENOSYS (Function not implemented) +prlimit64(15083, RLIMIT_AS, NULL, 0xf7ff4ff0) = -1 ENOSYS (Function not implemented)l Reduce it to the theoretical limit - the width of "prlimit64(0, RLIMIT_AS, NULL, NULL) " string. Also, add the same check to prlimit64--pidns-translation. * tests/gen_tests.in (prlimit64, prlimit64--pidns-translation): Set alignment check to -a36. Fixes: v5.13~13 "tests: use QUIRK:START-OF-TEST-OUTPUT for prlimit64"
Diffstat (limited to 'tests/prlimit64.c')
-rw-r--r--tests/prlimit64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/prlimit64.c b/tests/prlimit64.c
index 8300fe529..41b0404a3 100644
--- a/tests/prlimit64.c
+++ b/tests/prlimit64.c
@@ -55,6 +55,11 @@ main(void)
printf("prlimit64(0, 0x10 /* RLIMIT_??? */, NULL, NULL) = %s\n",
sprintrc(rc));
+ /* The shortest output */
+ rc = syscall(__NR_prlimit64, 0, RLIMIT_AS, 0, 0);
+ pidns_print_leader();
+ printf("prlimit64(0, RLIMIT_AS, NULL, NULL) = %s\n", sprintrc(rc));
+
for (xlat = resources->data; i < resources->size; ++xlat, ++i) {
if (!xlat->str)
continue;