summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2021-04-01 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2021-04-01 08:00:00 +0000
commitec976e4f22b685a270bb20d2b210ffa79e2dee85 (patch)
tree1e7f1b137fe4ba46f2c4ff8ad5132ec2053788c1 /tests/Makefile.am
parent2dd0d59a12faefabb5cb599d38d35046997828aa (diff)
downloadstrace-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.am1
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 \