]> granicus.if.org Git - strace/blob - tests/access.c
Remove XLAT_END
[strace] / tests / access.c
1 /*
2  * Copyright (c) 2016-2019 The strace developers.
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  */
7
8 #include "tests.h"
9 #include "scno.h"
10
11 #ifdef __NR_access
12
13 # include <stdio.h>
14 # include <unistd.h>
15
16 int
17 main(void)
18 {
19         static const char sample[] = "access_sample";
20
21         long rc = syscall(__NR_access, sample, F_OK);
22         printf("access(\"%s\", F_OK) = %ld %s (%m)\n",
23                sample, rc, errno2name());
24
25         rc = syscall(__NR_access, sample, R_OK|W_OK|X_OK);
26         printf("access(\"%s\", R_OK|W_OK|X_OK) = %ld %s (%m)\n",
27                sample, rc, errno2name());
28
29         puts("+++ exited with 0 +++");
30         return 0;
31 }
32
33 #else
34
35 SKIP_MAIN_UNDEFINED("__NR_access")
36
37 #endif