Skip to content

Commit

Permalink
tests: Skip tests calling getauxval(AT_SECURE) if binary is on /tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed Jun 18, 2019
1 parent fd908a7 commit 9c2022d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions common/test-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ main (int argc,
{
p11_test (test_strndup, "/compat/strndup");
#ifdef OS_UNIX
/* Don't run this test when under fakeroot */
if (!getenv ("FAKED_MODE")) {
/* Don't run this test when under fakeroot, or the binary is
* written under /tmp */
if (!getenv ("FAKED_MODE") && strncmp (BUILDDIR, "/tmp/", 5) != 0) {
p11_test (test_getauxval, "/compat/getauxval");
p11_test (test_secure_getenv, "/compat/secure_getenv");
}
Expand Down
5 changes: 3 additions & 2 deletions p11-kit/test-conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,9 @@ 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
/* Don't run this test when under fakeroot */
if (!getenv ("FAKED_MODE")) {
/* Don't run this test when under fakeroot, or the binary is
* written under /tmp */
if (!getenv ("FAKED_MODE") && strncmp (BUILDDIR, "/tmp/", 5) != 0) {
p11_test (test_setuid, "/conf/setuid");
}
#endif
Expand Down

0 comments on commit 9c2022d

Please sign in to comment.