]> granicus.if.org Git - strace/blobdiff - tests/vmsplice.c
tests: extend TEST_NETLINK_OBJECT macro
[strace] / tests / vmsplice.c
index dcf13fcefe9debf2cec1fa0c0919eca571d8f6de..4242d9e6f15774a13076cd9ddc297641a26e9909 100644 (file)
@@ -28,7 +28,7 @@
  */
 
 #include "tests.h"
-#include <sys/syscall.h>
+#include <asm/unistd.h>
 
 #if defined __NR_vmsplice
 
@@ -76,8 +76,9 @@ main(void)
        const unsigned int len =
                LENGTH_OF(w0_c) + LENGTH_OF(w1_c) + LENGTH_OF(w2_c);
 
-       tprintf("vmsplice(1, [{\"%s\", %u}, {\"%s\", %u}"
-               ", {\"%s\", %u}], %u, %s) = %u\n"
+       tprintf("vmsplice(1, [{iov_base=\"%s\", iov_len=%u}"
+               ", {iov_base=\"%s\", iov_len=%u}"
+               ", {iov_base=\"%s\", iov_len=%u}], %u, %s) = %u\n"
                " * %u bytes in buffer 0\n"
                " | 00000 %-49s  %-16s |\n"
                " * %u bytes in buffer 1\n"
@@ -85,7 +86,7 @@ main(void)
                " * %u bytes in buffer 2\n"
                " | 00000 %-49s  %-16s |\n",
                w0_c, LENGTH_OF(w0_c), w1_c, LENGTH_OF(w1_c),
-               w2_c, LENGTH_OF(w2_c), ARRAY_SIZE(iov_),
+               w2_c, LENGTH_OF(w2_c), (unsigned int) ARRAY_SIZE(iov_),
                "SPLICE_F_NONBLOCK", len,
                LENGTH_OF(w0_c), w0_d, w0_c,
                LENGTH_OF(w1_c), w1_d, w1_c, LENGTH_OF(w2_c), w2_d, w2_c);