diff options
author | Pádraig Brady <P@draigBrady.com> | 2009-09-04 21:41:30 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2009-09-05 17:19:03 +0100 |
commit | 526a057602f7f312443ae4ec0653fec84bca9ff2 (patch) | |
tree | 16532c0aaac442092426ccebd166e02b5ef935d7 /tests/tail-2/tail-n0f | |
parent | 70eadcb4e6990f0d1c9186ba6fa9f8e747cf3a22 (diff) | |
download | coreutils-526a057602f7f312443ae4ec0653fec84bca9ff2.tar.xz |
tests: test old tail -f method even on systems with inotify
* src/tail.c (main): Add an undocumented ---disable-inotify option
to allow disabling inotify.
* tests/tail-2/pid: Run test in both normal and "disable_inotify" modes.
* tests/tail-2/tail-n0f: Likewise.
* tests/tail-2/wait: Likewise.
* tests/tail-2/append-only: Likewise.
Diffstat (limited to 'tests/tail-2/tail-n0f')
-rwxr-xr-x | tests/tail-2/tail-n0f | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index fce7ed16e..ddfbe6645 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -35,17 +35,19 @@ echo anything > nonempty || framework_failure fail=0 -for file in empty nonempty; do - for c_or_n in c n; do - tail --sleep=4 -${c_or_n} 0 -f $file & - pid=$! - sleep .5 - state=$(get_process_status_ $pid) - case $state in - S*) ;; - *) echo $0: process in unexpected state: $state 1>&2; fail=1 ;; - esac - kill $pid +for inotify in ---disable-inotify ''; do + for file in empty nonempty; do + for c_or_n in c n; do + tail --sleep=4 -${c_or_n} 0 -f $inotify $file & + pid=$! + sleep .5 + state=$(get_process_status_ $pid) + case $state in + S*) ;; + *) echo $0: process in unexpected state: $state 1>&2; fail=1 ;; + esac + kill $pid + done done done |