From: Dmitry V. Levin Date: Thu, 7 Apr 2016 00:39:18 +0000 (+0000) Subject: tests/unlinkat.c: check AT_* decoding X-Git-Tag: v4.12~442 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2f91c09333f5d60cdd032388dd1a43b37a8bd38;p=strace tests/unlinkat.c: check AT_* decoding * tests/unlinkat.c (main): Check decoding of AT_* constants. --- diff --git a/tests/unlinkat.c b/tests/unlinkat.c index 744d8915..2a268a28 100644 --- a/tests/unlinkat.c +++ b/tests/unlinkat.c @@ -18,6 +18,13 @@ main(void) (int) fd, sample, rc, errno == ENOSYS ? "ENOSYS" : "EBADF"); + rc = syscall(__NR_unlinkat, -100, sample, -1L); + printf("unlinkat(%s, \"%s\", %s) = %d %s (%m)\n", + "AT_FDCWD", sample, + "AT_SYMLINK_NOFOLLOW|AT_REMOVEDIR|AT_SYMLINK_FOLLOW" + "|AT_NO_AUTOMOUNT|AT_EMPTY_PATH|0xffffe0ff", + rc, errno == ENOSYS ? "ENOSYS" : "EINVAL"); + puts("+++ exited with 0 +++"); return 0; }