From: Dmitry V. Levin Date: Thu, 21 Apr 2016 21:24:01 +0000 (+0000) Subject: tests/splice.c: stop using assert X-Git-Tag: v4.12~321 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5748b006f127e06c701c474e3389b5557f00912;p=strace tests/splice.c: stop using assert --- diff --git a/tests/splice.c b/tests/splice.c index 81b5c9b9..b3f3f080 100644 --- a/tests/splice.c +++ b/tests/splice.c @@ -49,12 +49,13 @@ main(void) const size_t len = (size_t) 0xdeadbef3facefed3ULL; const unsigned int flags = 15; - assert(syscall(__NR_splice, fd_in, off_in, fd_out, off_out, - len, flags) == -1); - printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = -1 %s (%m)\n", + long rc = syscall(__NR_splice, + fd_in, off_in, fd_out, off_out, len, flags); + printf("splice(%d, [%lld], %d, [%lld], %zu, %s) = %ld %s (%m)\n", (int) fd_in, *off_in, (int) fd_out, *off_out, len, "SPLICE_F_MOVE|SPLICE_F_NONBLOCK|SPLICE_F_MORE|SPLICE_F_GIFT", - errno2name()); + rc, errno2name()); + puts("+++ exited with 0 +++"); return 0; }