Mercurial > hg > toybox
annotate scripts/test/renice.test @ 1364:94677e7b6d97 draft
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
author | Divya Kothari <divya.s.kothari@gmail.com> |
---|---|
date | Thu, 26 Jun 2014 07:25:20 -0500 |
parents | |
children |
rev | line source |
---|---|
1364
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
2 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
3 # Copyright 2013 Robin Mittal <robinmittal.it@gmail.com> |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
4 # Copyright 2013 Divya Kothari <divya.s.kothari@gmail.com> |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
5 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
6 [ -f testing.sh ] && . testing.sh |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
7 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
8 #testing "name" "command" "result" "infile" "stdin" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
9 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
10 fun_nice_val() |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
11 { |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
12 for each_proc in $@ |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
13 do |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
14 echo `awk '{ print $18 }' /proc/${each_proc}/stat` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
15 done |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
16 } |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
17 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
18 # creating processes as a test data |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
19 yes >/dev/null & |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
20 proc1=$! |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
21 yes >/dev/null & |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
22 proc2=$! |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
23 yes >/dev/null & |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
24 proc3=$! |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
25 yes >/dev/null & |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
26 proc4=$! |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
27 yes >/dev/null & |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
28 proc5=$! |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
29 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
30 n_val1=`fun_nice_val $proc1` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
31 n_val2=`fun_nice_val $proc2` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
32 n_val3=`fun_nice_val $proc3` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
33 n_val4=`fun_nice_val $proc4` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
34 n_val5=`fun_nice_val $proc5` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
35 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
36 # Redirecting errors to /dev/null |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
37 arg="2>/dev/null" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
38 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
39 for n_v in "-1" "1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
40 do |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
41 for n_o in "" " -p" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
42 do |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
43 nice_val1=$((`fun_nice_val $proc1` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
44 nice_val2=$((`fun_nice_val $proc2` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
45 nice_val3=$((`fun_nice_val $proc3` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
46 nice_val4=$((`fun_nice_val $proc4` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
47 nice_val5=$((`fun_nice_val $proc5` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
48 testing "renice with -n=$n_v and with$n_o multiple_pids" \ |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
49 "renice -n $n_v$n_o $proc1 $proc2 $proc3 $proc4 $proc5 && |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
50 fun_nice_val $proc1 $proc2 $proc3 $proc4 $proc5" \ |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
51 "$nice_val1\n$nice_val2\n$nice_val3\n$nice_val4\n$nice_val5\n" "" "" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
52 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
53 nice_val1=$((`fun_nice_val $proc1` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
54 nice_val2=$((`fun_nice_val $proc2` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
55 nice_val3=$((`fun_nice_val $proc3` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
56 nice_val4=$((`fun_nice_val $proc4` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
57 nice_val5=$((`fun_nice_val $proc5` + $n_v)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
58 testing "renice with -n=$n_v and with$n_o multiple_pids (some invalid)" \ |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
59 "renice -n $n_v$n_o $proc1 $proc2 88888 99999 $proc3 $proc4 $proc5 $arg || |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
60 fun_nice_val $proc1 $proc2 $proc3 $proc4 $proc5" \ |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
61 "$nice_val1\n$nice_val2\n$nice_val3\n$nice_val4\n$nice_val5\n" "" "" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
62 done |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
63 done |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
64 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
65 # Starting Boundary Test Here .. |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
66 loop_cnt=2 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
67 echo -n "TEST: Boundary value test for Id($proc1)..[old_nice_val/new_nice_val]:" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
68 cnt=0 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
69 n_val=1 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
70 while [ $cnt -gt -1 ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
71 do |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
72 old_nice_val=`fun_nice_val $proc1` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
73 new_nice_val=`renice -n $n_val $proc1 >/dev/null 2>&1 && fun_nice_val $proc1` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
74 echo -n "[$old_nice_val/$new_nice_val]," |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
75 if [ $old_nice_val -eq 39 -a $old_nice_val -eq $new_nice_val ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
76 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
77 echo -n " [Equals 39,doing -1] " |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
78 n_val="-1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
79 elif [ $old_nice_val -eq 0 -a $old_nice_val -eq $new_nice_val ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
80 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
81 echo -n " [Equals 0,doing +1] " |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
82 n_val="1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
83 elif [ $new_nice_val -gt 39 -o $new_nice_val -lt 0 ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
84 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
85 echo " [Test Fail] " |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
86 echo "FAIL: renice with step 1 ($proc1) (boundary value)" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
87 cnt="-1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
88 elif [ $new_nice_val -eq $n_val1 -a $new_nice_val -eq $(($old_nice_val+1)) ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
89 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
90 cnt=$(($cnt + 1)) |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
91 if [ $cnt -eq $loop_cnt ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
92 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
93 echo " [Test Pass] " |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
94 echo "PASS: renice with step 1 ($proc1) (boundary value)" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
95 cnt="-1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
96 fi |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
97 else |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
98 dif=`echo $(($new_nice_val-$old_nice_val))` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
99 dif=`echo ${dif/-}` |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
100 if [ $dif -ne 1 ] |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
101 then |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
102 echo " [Test Fail] " |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
103 echo "FAIL: renice with step 1 ($proc1) (boundary value)" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
104 cnt="-1" |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
105 fi |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
106 fi |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
107 done |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
108 # Boundary test End |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
109 |
94677e7b6d97
I have developed few testsuite for toybox commands - ls, ln, rm, mv, printf, dd, renice.
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff
changeset
|
110 killall yes >/dev/null 2>&1 |