changeset 1217:7df2265e61be

Tests: made access_log.t pass under root user again (closes #1379).
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 08 Sep 2017 17:51:52 +0300
parents de7d3e249b35
children 24e175025ad8
files access_log.t
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/access_log.t
+++ b/access_log.t
@@ -104,7 +104,10 @@ http {
 
 EOF
 
-mkdir $t->testdir() . '/dir';
+my $d = $t->testdir();
+
+mkdir "$d/dir";
+
 $t->run();
 
 ###############################################################################
@@ -151,19 +154,19 @@ http_get('/cache?logname=first');
 http_get('/cache?logname=second');
 http_get('/cache?logname=second');
 
-chmod 0000, $t->testdir() . '/dir';
+rename "$d/dir", "$d/dir_moved";
 
 http_get('/cache?logname=lru');
 http_get('/cache?logname=once');
 http_get('/cache?logname=first');
 http_get('/cache?logname=second');
 
-chmod 0755, $t->testdir() . '/dir';
+rename "$d/dir_moved",  "$d/dir";
 
 # wait for file to appear with nonzero size thanks to the flush parameter
 
 for (1 .. 10) {
-	last if -s $t->testdir() . '/compressed.log';
+	last if -s "$d/compressed.log";
 	select undef, undef, undef, 0.1;
 }