# HG changeset patch # User Sergey Kandaurov # Date 1504882312 -10800 # Node ID 7df2265e61be9a4d57e74b248f6bbda416433b13 # Parent de7d3e249b359905ee26869577cf5ead8da0db10 Tests: made access_log.t pass under root user again (closes #1379). diff --git a/access_log.t b/access_log.t --- 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; }