From cc88159f8df5c5fc2e84a3edbe719df62708e261 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Sat, 12 May 2018 07:05:59 +0300 Subject: [PATCH] zdtm: mount tmpfs into /run in a test root iptables creates /run/xtables.lock file and we want to have it per-test. (00.332159) 1: Running iptables-restore -w for iptables-restore -w Fatal: can't open lock file /run/xtables.lock: Permission denied Signed-off-by: Andrei Vagin --- test/zdtm/lib/ns.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/zdtm/lib/ns.c b/test/zdtm/lib/ns.c index 6befc9e0c..95c3e44b0 100644 --- a/test/zdtm/lib/ns.c +++ b/test/zdtm/lib/ns.c @@ -100,6 +100,11 @@ static int prepare_mntns(void) return -1; } + if (mount("zdtm_run", "/run", "tmpfs", 0, NULL)) { + fprintf(stderr, "Unable to mount /run: %m\n"); + return -1; + } + if (umount2("./old", MNT_DETACH)) { fprintf(stderr, "umount(./old) failed: %m\n"); return -1;