summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-01-29 06:14:53 +0100
committerRichard Levitte <levitte@openssl.org>2018-01-29 12:51:22 +0100
commit98ade24200f127a158b60bc736390c587cdd3dfb (patch)
treeb8c90749a281f45d0ac0aa00db3740b1da78cd5d /test
parent20928ff635772182fe8696d618a19f9101a5370f (diff)
Don't break testing when runnins as root
The rehash test broke the test if run by root. Instead, just skip the check that requires non-root to be worth it. Fixes #4387 Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5184)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/40-test_rehash.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/recipes/40-test_rehash.t b/test/recipes/40-test_rehash.t
index 1204f1f77f..9e42742fba 100644
--- a/test/recipes/40-test_rehash.t
+++ b/test/recipes/40-test_rehash.t
@@ -23,7 +23,7 @@ setup("test_rehash");
plan skip_all => "test_rehash is not available on this platform"
unless run(app(["openssl", "rehash", "-help"]));
-plan tests => 5;
+plan tests => 4;
indir "rehash.$$" => sub {
prepare();
@@ -46,8 +46,7 @@ indir "rehash.$$" => sub {
prepare();
chmod 0500, curdir();
SKIP: {
- if (!ok(!open(FOO, ">unwritable.txt"),
- "Testing that we aren't running as a privileged user, such as root")) {
+ if (open(FOO, ">unwritable.txt")) {
close FOO;
skip "It's pointless to run the next test as root", 1;
}