diff options
author | Stef Walter <stef@thewalter.net> | 2013-07-24 18:18:07 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-07-24 18:18:07 +0200 |
commit | 3896c32e4acfbcb99ec1d39336ab156f38f540db (patch) | |
tree | f04e58818de55513f58e2422027c5bac678d4248 | |
parent | cd29cdeabd043149076c834f97c076e8bfed7f96 (diff) | |
download | p11-kit-3896c32e4acfbcb99ec1d39336ab156f38f540db.tar.gz |
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.c | 5 | ||||
-rw-r--r-- | p11-kit/tests/conf-test.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/common/tests/test-compat.c b/common/tests/test-compat.c index 390502f..8225aa1 100644 --- a/common/tests/test-compat.c +++ b/common/tests/test-compat.c @@ -176,7 +176,10 @@ main (void) SUITE_ADD_TEST (suite, test_strndup); #ifdef OS_UNIX - SUITE_ADD_TEST (suite, test_getauxval); + /* Don't run this test when under fakeroot */ + if (!getenv ("FAKED_MODE")) { + SUITE_ADD_TEST (suite, test_getauxval); + } #endif CuSuiteRun (suite); diff --git a/p11-kit/tests/conf-test.c b/p11-kit/tests/conf-test.c index 0d4e78a..f38fee9 100644 --- a/p11-kit/tests/conf-test.c +++ b/p11-kit/tests/conf-test.c @@ -532,7 +532,10 @@ main (void) SUITE_ADD_TEST (suite, test_load_modules_user_none); SUITE_ADD_TEST (suite, test_parse_boolean); #ifdef OS_UNIX - SUITE_ADD_TEST (suite, test_setuid); + /* Don't run this test when under fakeroot */ + if (!getenv ("FAKED_MODE")) { + SUITE_ADD_TEST (suite, test_setuid); + } #endif CuSuiteRun (suite); |