diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-01 23:11:28 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-03 01:06:11 +0000 |
commit | 3e15e018efc5ed08eba647305ebd70e695a50967 (patch) | |
tree | 392f84fb04220e02edc00f4d1bcf8b6bec08047e /tests/getdents64.c | |
parent | c5c64110a8158e5227b1ade518e1cc35fe398d22 (diff) | |
download | strace-3e15e018efc5ed08eba647305ebd70e695a50967.tar.gz |
tests: make test executables invocable outside current work directory
Most of test executables were ready for the upcoming change,
this change prepares all the rest.
* tests/getdents.c (main): Use fixed name for the sample directory.
* tests/getdents64.c (main): Likewise.
* tests/readdir.c (main): Likewise.
* tests/mknod.c (sample): Change to a pointer.
(main): Use av[0] as a sample.
* tests/symlink.c (main): Use av[0] as a linkpath.
* tests/umode_t.c (sample): Change to a pointer.
(test_syscall): Fix expected output.
(main): Use av[0] as a sample.
Diffstat (limited to 'tests/getdents64.c')
-rw-r--r-- | tests/getdents64.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/getdents64.c b/tests/getdents64.c index 9da2a23c2..0e7085b71 100644 --- a/tests/getdents64.c +++ b/tests/getdents64.c @@ -98,12 +98,10 @@ print_dirent(const kernel_dirent64 *d) } int -main(int ac, const char **av) +main(void) { - char *dname; + static const char dname[] = "getdents64.test.tmp.dir"; - assert(ac == 1); - assert(asprintf(&dname, "%s.test.tmp.dir", av[0]) > 0); assert(!mkdir(dname, 0700)); assert(!chdir(dname)); (void) close(0); |