Skip to content

Commit 43d9fba

Browse files
committed
tests/bracket.sh: disable 'test -N' tests due to noatime mounts
src/cmd/ksh93/tests/bracket.sh: - Disable tests for [[ -N ... ]] (test -N ...), because it is expected to break on systems where $TMPDIR (or even the entire root file system) is mounted with noatime for better performance. Ref.: https://opensource.com/article/20/6/linux-noatime (It also needs annoyingly long sleep times on older systems with a 1-second timestamp granularity.)
1 parent 2315f66 commit 43d9fba

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cmd/ksh93/tests/bracket.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,12 @@ done
232232
[[ abcdcdabcde == {5}(ab|cd)e ]] || err_exit 'abcdcdabcd == {5}(ab|cd)e'
233233
) || err_exit 'errors with {..}(...) patterns'
234234
[[ D290.2003.02.16.temp == D290.+(2003.02.16).temp* ]] || err_exit 'pattern match bug with +(...)'
235+
236+
# Tests for [[ -N ... ]] (test -N ...) are disabled because it is expected to break on systems where
237+
# $TMPDIR (or even the entire root file system) is mounted with noatime for better performance.
238+
# Ref.: https://opensource.com/article/20/6/linux-noatime
239+
# (It also needs annoyingly long sleep times on older systems with a 1-second timestamp granularity.)
240+
: <<\end_disabled
235241
rm -rf $file
236242
{
237243
[[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after creat'
@@ -242,6 +248,8 @@ sleep .02
242248
read
243249
[[ -N $file ]] && err_exit 'test -N $tmp/*: st_mtime>st_atime after read'
244250
} > $file < $file
251+
end_disabled
252+
245253
if rm -rf "$file" && ln -s / "$file"
246254
then [[ -L "$file" ]] || err_exit '-L not working'
247255
[[ -L "$file"/ ]] && err_exit '-L with file/ not working'

0 commit comments

Comments
 (0)