diff options
author | Elliott Hughes <enh@google.com> | 2017-04-02 12:29:39 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2017-04-07 11:41:20 -0500 |
commit | fc0385fb2bae2d82622b76ebb39067db0bdd7baf (patch) | |
tree | dc5c11897c83ac607aaac58ad1e48a88cec076ac /tests | |
parent | 92ca5af53128aba511c4144c173283a3e810af8b (diff) | |
download | toybox-fc0385fb2bae2d82622b76ebb39067db0bdd7baf.tar.gz |
Make pgrep tests runnable on toybox-only systems.
Also make the cleanup kill more focused.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/pgrep.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/pgrep.test b/tests/pgrep.test index 3319c79a..8db848f8 100755 --- a/tests/pgrep.test +++ b/tests/pgrep.test @@ -16,7 +16,7 @@ proc=$! #echo "# Process created with id: $proc" sleep .1 session_id=0 -proc_parent=`cat /proc/${proc}/stat | awk '{ print $4 }'` +proc_parent=`cat /proc/${proc}/stat | cut -d' ' -f4` #echo "# Parent Process id of $proc is $proc_parent" # Testcases for pgrep command @@ -34,4 +34,4 @@ testing "return failure" "pgrep almost-certainly-not || echo failure" \ "failure\n" "" "" #Clean-up -killall yes >/dev/null 2>&1 +kill -9 $proc |