mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
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.
This commit is contained in:
parent
76c19e9f6c
commit
4dd4cb8fe4
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user