tests: add helper to unify skipping a test and exiting

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-09-14 09:29:57 +02:00
parent c1cd674357
commit 317bb217d3
34 changed files with 128 additions and 178 deletions
+2 -4
View File
@@ -23,10 +23,8 @@ int main(int argc, char *argv[]) {
log_open();
r = enter_cgroup_subroot();
if (r == -ENOMEDIUM) {
log_notice_errno(r, "Skipping test: cgroupfs not available");
return EXIT_TEST_SKIP;
}
if (r == -ENOMEDIUM)
return log_tests_skipped("cgroupfs not available");
/* prepare the test */
assert_se(set_unit_path(get_testdata_dir()) >= 0);