tests: add helper to unify skipping a test and exiting
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user