projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42cd665
)
tests: refactor code to use require_proc_pid_status_
author
Giuseppe Scrivano
<gscrivano@gnu.org>
Sat, 4 Jul 2009 08:25:03 +0000
(10:25 +0200)
committer
Jim Meyering
<meyering@redhat.com>
Sat, 4 Jul 2009 08:47:56 +0000
(10:47 +0200)
* tests/tail-2/tail-n0f: Read the process status using the test-lib.sh
require_proc_pid_status_ function.
tests/tail-2/tail-n0f
patch
|
blob
|
history
diff --git
a/tests/tail-2/tail-n0f
b/tests/tail-2/tail-n0f
index 322fddcf3a60a7b968052a9944321a1a41046a40..fce7ed16ec50884f777a1f9ed796fd9e62d19ac5 100755
(executable)
--- a/
tests/tail-2/tail-n0f
+++ b/
tests/tail-2/tail-n0f
@@
-40,9
+40,7
@@
for file in empty nonempty; do
tail --sleep=4 -${c_or_n} 0 -f $file &
pid=$!
sleep .5
- set _ `sed -n '/^State:[ ]*\([^ ]\)/s//\1/p' /proc/$pid/status`
- shift # Remove the leading `_'.
- state=$1
+ state=$(get_process_status_ $pid)
case $state in
S*) ;;
*) echo $0: process in unexpected state: $state 1>&2; fail=1 ;;