From 9c2022d292c00ccbe2413b53b7c91cf4ba4d7c14 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 3 Jun 2019 03:33:05 +0200 Subject: tests: Skip tests calling getauxval(AT_SECURE) if binary is on /tmp --- common/test-compat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/test-compat.c b/common/test-compat.c index 77a0c31..8b5d2e6 100644 --- a/common/test-compat.c +++ b/common/test-compat.c @@ -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"); } -- cgit v1.1