diff options
author | Jan Janssen <medhefgo@web.de> | 2021-11-25 12:05:57 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2021-11-28 11:46:26 +0100 |
commit | 26e555cbbac3e42c6bf625cb655d2070a9d3a825 (patch) | |
tree | c87cadfa92520041f91191163f3ae86d46d2e536 /src/test/test-cgroup-unit-default.c | |
parent | 0578dfe3eb2ceb8571b62a904dec0ddf410f6352 (diff) | |
download | systemd-26e555cbbac3e42c6bf625cb655d2070a9d3a825.tar.gz |
test: Convert to TEST/TEST_RET macros
Note that test-cgroup-mask, test-cgroup-unit-default and test-unit-name will now
report being skipped instead of reporting success if not run under systemd.
Diffstat (limited to 'src/test/test-cgroup-unit-default.c')
-rw-r--r-- | src/test/test-cgroup-unit-default.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/test/test-cgroup-unit-default.c b/src/test/test-cgroup-unit-default.c index 0fae2f64cb..4c8de1e382 100644 --- a/src/test/test-cgroup-unit-default.c +++ b/src/test/test-cgroup-unit-default.c @@ -8,7 +8,7 @@ #include "tests.h" #include "unit.h" -static int test_default_memory_low(void) { +TEST_RET(default_memory_low, .sd_booted = true) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; _cleanup_(manager_freep) Manager *m = NULL; Unit *root, *dml, @@ -135,12 +135,4 @@ static int test_default_memory_low(void) { return 0; } -int main(int argc, char* argv[]) { - int rc = EXIT_SUCCESS; - - test_setup_logging(LOG_DEBUG); - - TEST_REQ_RUNNING_SYSTEMD(rc = test_default_memory_low()); - - return rc; -} +DEFINE_TEST_MAIN(LOG_DEBUG); |