summaryrefslogtreecommitdiffstats
path: root/t/test_umberlog.c
diff options
context:
space:
mode:
Diffstat (limited to 't/test_umberlog.c')
-rw-r--r--t/test_umberlog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/test_umberlog.c b/t/test_umberlog.c
index aa50484..8a47ab1 100644
--- a/t/test_umberlog.c
+++ b/t/test_umberlog.c
@@ -291,6 +291,10 @@ START_TEST (test_closelog)
verify_value_missing (jo, "program");
#endif
verify_value_differs (jo, "pid", "0");
+ if (getuid () != 0)
+ verify_value_differs (jo, "uid", "0");
+ if (getgid () != 0)
+ verify_value_differs (jo, "gid", "0");
json_object_put (jo);
}
@@ -346,6 +350,10 @@ START_TEST (test_openlog_defaults)
verify_value_missing (jo, "program");
#endif
verify_value_differs (jo, "pid", "0");
+ if (getuid () != 0)
+ verify_value_differs (jo, "uid", "0");
+ if (getgid () != 0)
+ verify_value_differs (jo, "gid", "0");
json_object_put (jo);
closelog ();