summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSteve Muir <muir@fb.com>2016-07-27 14:23:44 -0700
committerDavide Cavalca <dcavalca@fb.com>2016-07-29 14:30:46 -0700
commit4dd4cb8fe40baea007336a346ec2aa645890eec3 (patch)
treefd91546e623940ffa453bb68eee6ab08fa4e7cfe /src/test
parent76c19e9f6c8e8e5922e43716137d532c542e34c8 (diff)
tests: don't run private device tests if running in a container
Private devices don't exist when running in a container, so skip the related tests.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-execute.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 77ef4e8b2a..baf5b96487 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -33,6 +33,7 @@
#include "test-helper.h"
#include "unit.h"
#include "util.h"
+#include "virt.h"
typedef void (*test_function_t)(Manager *m);
@@ -111,6 +112,10 @@ static void test_exec_privatetmp(Manager *m) {
}
static void test_exec_privatedevices(Manager *m) {
+ if (detect_container() > 0) {
+ log_notice("testing in container, skipping private device tests");
+ return;
+ }
test(m, "exec-privatedevices-yes.service", 0, CLD_EXITED);
test(m, "exec-privatedevices-no.service", 0, CLD_EXITED);
}