- 求职 : Linux运维
- 论坛徽章:
- 10
|
本帖最后由 夏寥寥 于 2017-02-07 09:45 编辑
我在RHEL6.5上升级OPENSSL时(版本号:openssl-1.1.0d),make之后,在执行make test后提示如下错误:
错误提示说:我没有使用root这个特权用户来执行测试。但我使用的就是root.
打开提示错误文件的line 49,内容如下:
- [root@RHEL6 recipes]# vi 40-test_rehash.t
- 1 #! /usr/bin/env perl
- 2 # Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
- 3 #
- 4 # Licensed under the OpenSSL license (the "License"). You may not use
- 5 # this file except in compliance with the License. You can obtain a copy
- 6 # in the file LICENSE in the source distribution or at
- 7 # https://www.openssl.org/source/license.html
- 8
- 9
- 10 use strict;
- 11 use warnings;
- 12
- 13 use File::Spec::Functions;
- 14 use File::Copy;
- 15 use File::Basename;
- 16 use if $^O ne "VMS", 'File::Glob' => qw/glob/;
- 17 use OpenSSL::Test qw/:DEFAULT bldtop_file/;
- 18
- 1 #! /usr/bin/env perl
- 2 # Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
- 3 #
- 4 # Licensed under the OpenSSL license (the "License"). You may not use
- 5 # this file except in compliance with the License. You can obtain a copy
- 6 # in the file LICENSE in the source distribution or at
- 7 # https://www.openssl.org/source/license.html
- 8
- 9
- 10 use strict;
- 11 use warnings;
- 12
- 13 use File::Spec::Functions;
- 14 use File::Copy;
- 15 use File::Basename;
- 16 use if $^O ne "VMS", 'File::Glob' => qw/glob/;
- 17 use OpenSSL::Test qw/:DEFAULT bldtop_file/;
- 18
- 19 setup("test_rehash");
- 20
- 21 #If "openssl rehash -help" fails it's most likely because we're on a platform
- 22 #that doesn't support the rehash command (e.g. Windows)
- 23 plan skip_all => "test_rehash is not available on this platform"
- 24 unless run(app(["openssl", "rehash", "-help"]));
- 25
- 26 plan tests => 5;
- 27
- 28 indir "rehash.[ DISCUZ_CODE_1 ]quot; => sub {
- 29 prepare();
- 30 ok(run(app(["openssl", "rehash", curdir()])),
- 31 'Testing normal rehash operations');
- 32 }, create => 1, cleanup => 1;
- 33
- 34 indir "rehash.[ DISCUZ_CODE_1 ]quot; => sub {
- 35 prepare(sub { chmod 400, $_ foreach (@_); });
- 36 ok(run(app(["openssl", "rehash", curdir()])),
- 37 'Testing rehash operations on readonly files');
- 38 }, create => 1, cleanup => 1;
- 39
- 40 indir "rehash.[ DISCUZ_CODE_1 ]quot; => sub {
- 41 ok(run(app(["openssl", "rehash", curdir()])),
- 42 'Testing rehash operations on empty directory');
- 43 }, create => 1, cleanup => 1;
- 44
- 45 indir "rehash.[ DISCUZ_CODE_1 ]quot; => sub {
- 46 prepare();
- 47 chmod 0500, curdir();
- 48 SKIP: {
- 49 <b><font color="#ff0000"> if (!ok(!open(FOO, ">unwritable.txt"),</font></b>
- 50 "Testing that we aren't running as a privileged user, such as root")) {
- 51 close FOO;
- 52 skip "It's pointless to run the next test as root", 1;
- 53 }
- 54 isnt(run(app(["openssl", "rehash", curdir()])), 1,
- 55 'Testing rehash operations on readonly directory');
- 56 }
- 57 chmod 0700, curdir(); # make it writable again, so cleanup works
- 58 }, create => 1, cleanup => 1;
- 59
- 60 sub prepare {
- 61 my @sourcefiles =
- 62 sort map { glob(bldtop_file('certs', 'demo', "*.$_")) } ('pem',
- 63 'crt',
- 64 'cer',
- 65 'crl');
- 66 my @destfiles = ();
- 67 foreach (@sourcefiles) {
- 68 copy($_, curdir());
- 69 push @destfiles, catfile(curdir(), basename($_));
- 70 }
- 71 foreach (@_) {
- 72 die "Internal error, argument is not CODE"
- 73 unless (ref($_) eq 'CODE');
- 74 $_->(@destfiles);
- 75 }
- 76 }
复制代码
|
|