From ce786e84321b5c4d0ddbf43049ff5357fb72fcea Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 16 Jul 2018 23:32:22 +0200 Subject: selftest: check existence of additional directories Signed-off-by: Toni Uhlig --- src/utils.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/utils.c b/src/utils.c index 7933938..bbb05ba 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1067,6 +1067,19 @@ int selftest_minimal_requirements(void) E_STRERR("RO-directory '%s' check", getopt_str(OPT_RODIR)); goto error; } + if (mkdir(getopt_str(OPT_ROOT), S_IRWXU) && errno != EEXIST) { + E_STRERR("ROOT-directory '%s' check", getopt_str(OPT_ROOT)); + goto error; + } + if (mkdir(getopt_str(OPT_NETNS_RUN_DIR), S_IRWXU) && errno != EEXIST) { + E_STRERR("NETNS-directory '%s' check", getopt_str(OPT_NETNS_RUN_DIR)); + goto error; + } + + if (mkdir(getopt_str(OPT_SSH_RUN_DIR), S_IRWXU) && errno != EEXIST) { + E_STRERR("SSH-directory '%s' check", getopt_str(OPT_SSH_RUN_DIR)); + goto error; + } if (getopt_used(OPT_RUNTEST)) { N("%s", "Selftest success"); -- cgit v1.2.3