[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils-8.3: a few tests fail
From: |
Pádraig Brady |
Subject: |
Re: coreutils-8.3: a few tests fail |
Date: |
Wed, 13 Jan 2010 12:07:08 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 |
Well we're only testing if tail has died I think, so
how about just using `kill -0 $pid` as follows:
diff --git a/tests/tail-2/inotify-hash-abuse b/tests/tail-2/inotify-hash-abuse
index ab5a69e..592022a 100755
--- a/tests/tail-2/inotify-hash-abuse
+++ b/tests/tail-2/inotify-hash-abuse
@@ -46,23 +46,14 @@ echo a > 1 || fail=1
# Wait up to 2s for the buggy tail to die,
# or for the "tail: `1' has appeared; following end of new file" output
-dead=0
for i in $(seq 10); do
- kill -0 $pid || { dead=1; break; }
+ kill -0 $pid || break
grep 'has appeared;' out > /dev/null && break
sleep .2
done
# Fixed tail will not have aborted. Kill it.
-test $dead = 0 && kill -HUP $pid
-
-wait $pid
-st=$?
-
-case $st in
- 129) ;;
- *) echo tail died via unexpected signal: $st; fail=1;;
-esac
+kill -0 $pid && kill $pid || fail=1
cat out
diff --git a/tests/tail-2/inotify-hash-abuse2 b/tests/tail-2/inotify-hash-abuse2
index 4fe080b..ffad623 100755
--- a/tests/tail-2/inotify-hash-abuse2
+++ b/tests/tail-2/inotify-hash-abuse2
@@ -37,14 +37,6 @@ for i in $(seq 200); do
done
# Fixed tail will not have aborted. Kill it.
-kill -HUP $pid
-
-wait $pid
-st=$?
-
-case $st in
- 129) ;;
- *) echo tail died via unexpected signal: $st; fail=1;;
-esac
+kill -0 $pid && kill $pid || fail=1
Exit $fail
Re: coreutils-8.3: a few tests fail, Christophe LYON, 2010/01/14