diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-07-16 23:32:22 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-07-16 23:32:22 +0200 |
commit | ce786e84321b5c4d0ddbf43049ff5357fb72fcea (patch) | |
tree | bdd14f6e4de4fa0f11c036d75ca4d107db508b4f /src | |
parent | 501e478e96631c7ff5a0671b3217a4a0b7587665 (diff) |
selftest: check existence of additional directories
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.c | 13 |
1 files changed, 13 insertions, 0 deletions
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"); |