summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Metzler <ametzler@debian.org>2013-10-01 07:22:29 +0200
committerStef Walter <stefw@gnome.org>2013-10-01 07:22:29 +0200
commitbeb377f7479e834366be60dc6c1da2e53278e091 (patch)
tree2436070b74837604459e6db6153822379f134934
parent895327695f141d5bce5e260b80b5ec01796b214a (diff)
Disable tests with setgid binaries when running in fakeroot
We use the FAKED_MODE environment variable as a way to detect fakeroot.
-rw-r--r--common/tests/test-compat.c5
-rw-r--r--p11-kit/tests/test-conf.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/common/tests/test-compat.c b/common/tests/test-compat.c
index c73c034..872170d 100644
--- a/common/tests/test-compat.c
+++ b/common/tests/test-compat.c
@@ -91,7 +91,10 @@ main (int argc,
{
p11_test (test_strndup, "/compat/strndup");
#ifdef OS_UNIX
- p11_test (test_getauxval, "/compat/getauxval");
+ /* Don't run this test when under fakeroot */
+ if (!getenv ("FAKED_MODE")) {
+ p11_test (test_getauxval, "/compat/getauxval");
+ }
#endif
return p11_test_run (argc, argv);
}
diff --git a/p11-kit/tests/test-conf.c b/p11-kit/tests/test-conf.c
index dc82da8..d5dc415 100644
--- a/p11-kit/tests/test-conf.c
+++ b/p11-kit/tests/test-conf.c
@@ -447,7 +447,10 @@ main (int argc,
p11_test (test_load_modules_user_none, "/conf/test_load_modules_user_none");
p11_test (test_parse_boolean, "/conf/test_parse_boolean");
#ifdef OS_UNIX
- p11_test (test_setuid, "/conf/setuid");
+ /* Don't run this test when under fakeroot */
+ if (!getenv ("FAKED_MODE")) {
+ p11_test (test_setuid, "/conf/setuid");
+ }
#endif
return p11_test_run (argc, argv);
}