]> granicus.if.org Git - strace/commitdiff
tests: fix preadv2-pwritev2 test on x32
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 19 Dec 2016 21:32:40 +0000 (00:32 +0300)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 19 Dec 2016 21:32:40 +0000 (00:32 +0300)
On x32 p(read|write)v(|2) syscalls are implemented via compat, which
truncates len argument to unsigned int.

* tests/preadv2-pwritev2.c (main): Print vlen argument as unsigned long.

tests/preadv2-pwritev2.c

index 9f1dd95df0da43ae8325ecda31c523ebd876fc6f..97deb4f95c3f3c35793a79d60ec6b3081c4512fd 100644 (file)
@@ -192,14 +192,14 @@ main(void)
        syscall(__NR_preadv2, -1, NULL, vlen, pos_l, pos_h, 1);
        if (ENOSYS == errno)
                test_dumpio = 0;
-       tprintf("preadv2(-1, NULL, %llu, %lld, RWF_HIPRI) = -1 %s (%m)\n",
-               (unsigned long long) vlen, pos, errno2name());
+       tprintf("preadv2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n",
+               (unsigned long) vlen, pos, errno2name());
 
        syscall(__NR_pwritev2, -1, NULL, vlen, pos_l, pos_h, 1);
        if (ENOSYS == errno)
                test_dumpio = 0;
-       tprintf("pwritev2(-1, NULL, %llu, %lld, RWF_HIPRI) = -1 %s (%m)\n",
-               (unsigned long long) vlen, pos, errno2name());
+       tprintf("pwritev2(-1, NULL, %lu, %lld, RWF_HIPRI) = -1 %s (%m)\n",
+               (unsigned long) vlen, pos, errno2name());
 
        if (test_dumpio)
                dumpio();