summaryrefslogtreecommitdiff
path: root/src/test/test-rm-rf.c
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2021-11-24 12:00:02 +0100
committerJan Janssen <medhefgo@web.de>2021-11-25 15:03:06 +0100
commit4f7452a8eb7a946efea927fae017d4d661097833 (patch)
tree413778cc0fb08fbbed0890130b5ba66c90581e61 /src/test/test-rm-rf.c
parent4d5ad9d951299c905453ac8e3769dc82b0a09fb4 (diff)
downloadsystemd-4f7452a8eb7a946efea927fae017d4d661097833.tar.gz
test: Use TEST macro
This converts to TEST macro where it is trivial. Some additional notable changes: - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c - use saved_argc/saved_argv in test-copy.c, test-path-util.c, test-tmpfiles.c and test-unit-file.c
Diffstat (limited to 'src/test/test-rm-rf.c')
-rw-r--r--src/test/test-rm-rf.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/test/test-rm-rf.c b/src/test/test-rm-rf.c
index 38aa100e0b..1eb9a49077 100644
--- a/src/test/test-rm-rf.c
+++ b/src/test/test-rm-rf.c
@@ -38,11 +38,9 @@ static void test_rm_rf_chmod_inner(void) {
assert_se(access(d, F_OK) < 0 && errno == ENOENT);
}
-static void test_rm_rf_chmod(void) {
+TEST(rm_rf_chmod) {
int r;
- log_info("/* %s */", __func__);
-
if (getuid() == 0) {
/* This test only works unpriv (as only then the access mask for the owning user matters),
* hence drop privs here */
@@ -65,10 +63,4 @@ static void test_rm_rf_chmod(void) {
test_rm_rf_chmod_inner();
}
-int main(int argc, char **argv) {
- test_setup_logging(LOG_DEBUG);
-
- test_rm_rf_chmod();
-
- return 0;
-}
+DEFINE_TEST_MAIN(LOG_DEBUG);