diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-04-01 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-04-01 08:00:00 +0000 |
commit | ec976e4f22b685a270bb20d2b210ffa79e2dee85 (patch) | |
tree | 1e7f1b137fe4ba46f2c4ff8ad5132ec2053788c1 /tests/Makefile.am | |
parent | 2dd0d59a12faefabb5cb599d38d35046997828aa (diff) | |
download | strace-ec976e4f22b685a270bb20d2b210ffa79e2dee85.tar.gz |
tests: introduce create_and_enter_subdir and leave_and_remove_subdir
Introduce the pair of functions that is going to be used to make sure
the current workdir of the tracee is different from the current workdir
of the tracer.
Use the new interface in a few tests where the difference is going to be
relevant with --secontext option.
* tests/subdir.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add subdir.c.
* tests/tests.h (create_and_enter_subdir, leave_and_remove_subdir):
New function prototypes.
* tests/access.c (main): Use create_and_enter_subdir and
leave_and_remove_subdir.
* tests/chmod.c (main): Likewise.
* tests/execve.c (main): Likewise.
* tests/fchmod.c (main): Likewise.
* tests/fchmodat.c (main): Likewise.
* tests/fchownat.c (main): Likewise.
* tests/linkat.c (main): Likewise.
* tests/open.c (main): Likewise.
* tests/openat.c (main): Likewise.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 3b4777fe7..8327e84cf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -61,6 +61,7 @@ libtests_a_SOURCES = \ skip_unavailable.c \ sprintrc.c \ status.c \ + subdir.c \ tail_alloc.c \ test_netlink.h \ test_nlattr.h \ |