libmount is required for setup_namespace() so skip the test if it
is not available.
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
+#include "libmount-util.h"
#include "namespace-util.h"
#include "namespace.h"
#include "pidref.h"
.root_directory_fd = -EBADF,
};
pid_t pid;
+ int r;
if (geteuid() > 0) {
(void) log_tests_skipped("not root");
return;
}
+ r = dlopen_libmount();
+ if (ERRNO_IS_NEG_NOT_SUPPORTED(r)) {
+ (void) log_tests_skipped("libmount support not compiled in");
+ return;
+ }
+ ASSERT_OK(r);
+
pid = fork();
ASSERT_OK_ERRNO(pid);