comparison http_disable_symlinks.t @ 873:c03af44a7370

Tests: avoid fcntl(O_DIRECT) alerts in http_disable_symlinks.t. Ubuntu uses to distribute /etc/resolv.conf as a symlink to file that resides in an unsupported filesystem. The fix is to skip symlinks. While here, omit passing explicitly a default argument for style.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 22 Mar 2016 13:43:55 +0300
parents 90f9b128b218
children e9064d691790
comparison
equal deleted inserted replaced
872:a07734ecb988 873:c03af44a7370
153 } 153 }
154 154
155 EOF 155 EOF
156 156
157 my $uid = getuid(); 157 my $uid = getuid();
158 my ($extfile) = grep { -f "$_" && $uid != (stat($_))[4] } 158 my ($extfile) = grep { -f && !-l && $uid != (stat())[4] }
159 ('/etc/resolv.conf', '/etc/protocols', '/etc/host.conf'); 159 ('/etc/resolv.conf', '/etc/protocols', '/etc/host.conf');
160 160
161 plan(skip_all => 'no external file found') 161 plan(skip_all => 'no external file found')
162 if !defined $extfile; 162 if !defined $extfile;
163 163