Also try to only kill processes we created.
---
 tests/losetup.test | 6 ++++++
 tests/renice.test  | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)
From 490c1919db2424320dbad4b34e548a6d077d2848 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <e...@google.com>
Date: Mon, 3 Apr 2017 08:57:42 -0700
Subject: [PATCH] Make renice.test work without awk.

Also try to only kill processes we created.
---
 tests/losetup.test | 6 ++++++
 tests/renice.test  | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/losetup.test b/tests/losetup.test
index 651c693..d601c27 100755
--- a/tests/losetup.test
+++ b/tests/losetup.test
@@ -16,6 +16,12 @@ FILE="$(readlink -f blah.img)"
 DEV="$(printf '%04d' $(stat -t blah.img | awk '{print $7}'))"
 NODE="$(awk '{print $7}')"
 
+echo $FILE
+echo $DEV
+echo $NODE
+
+exit 0
+
 losetup -f 
 losetup -f -s
 losetup -f file
diff --git a/tests/renice.test b/tests/renice.test
index e350c27..4f17d01 100755
--- a/tests/renice.test
+++ b/tests/renice.test
@@ -11,7 +11,7 @@ fun_nice_val()
 {
   for each_proc in $@
   do
-    echo `awk '{ print $18 }' /proc/${each_proc}/stat`
+    echo `cut -d' ' -f18 /proc/${each_proc}/stat`
   done
 }
 
@@ -107,4 +107,4 @@ do
 done
 # Boundary test End
 
-killall yes >/dev/null 2>&1
+kill -9 $proc1 $proc2 $proc3 $proc4 $proc5
-- 
2.12.2.564.g063fe858b8-goog

_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to