From ceffb33db28d067fde07531c3fd36a0ed4b95ded Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 9 Sep 2015 17:29:06 +0200 Subject: [PATCH] Make sure the temporary error log resides in a well defined location If a test recipe does something like this: indir "foo.$$" => sub { chmod 0500, File::Spec->curdir(); ok(run(app(["something"]))); } we get a problem, because we were storing the temporary stderr file in the current directory at all times (so while inside the 'indir', we would attemp to store it in "foo.$$"). So, change our ways to always store that temporary file in the exact same location, defined by the environment variable RESULT_D, or failing that TEST_D, or failing that $TOP/test. Reviewed-by: Rich Salz --- test/testlib/OpenSSL/Test.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/testlib/OpenSSL/Test.pm b/test/testlib/OpenSSL/Test.pm index f378351f65..c64d68de46 100644 --- a/test/testlib/OpenSSL/Test.pm +++ b/test/testlib/OpenSSL/Test.pm @@ -720,7 +720,8 @@ sub __build_cmd { $saved_stderr = $opts{stderr} if defined($opts{stderr}); - my $errlog = $num ? "$test_name.$num.tmp_err" : "$test_name.tmp_err"; + my $errlog = + __results_file($num ? "$test_name.$num.tmp_err" : "$test_name.tmp_err"); my $display_cmd = "$cmd$arg_str$stdin$stdout$stderr"; $cmd .= "$arg_str$stdin$stdout 2> $errlog"; -- 2.34.1