Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/testsuite/taskset.tests

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
   
2  # Copyright 2006 Bernhard Reutner-Fischer  # Copyright 2006 Bernhard Reutner-Fischer
3  # Licensed under GPL v2 or later, see file LICENSE for details.  # Licensed under GPL v2 or later, see file LICENSE for details.
4    
5  . testing.sh  . ./testing.sh
6  a="taskset"  a="taskset"
7    
8  # testing "test name"              "opts" "expected result" "file inp" "stdin"  # testing "test name"              "opts" "expected result" "file inp" "stdin"
9  testing "taskset (get from pid 1)" "$a -p 1 >/dev/null;echo \$?" "0\n" "" ""  testing "taskset (get from pid 1)" "$a -p 1 >/dev/null;echo \$?" "0\n" "" ""
10  testing "taskset (invalid pid)"    "$a -p 0 >/dev/null 2>&1;echo \$?" "1\n" "" ""  testing "taskset (invalid pid)"    "$a -p 0 >/dev/null 2>&1;echo \$?" "1\n" "" ""
11  testing "taskset (set_aff, needs CAP_SYS_NICE)" \  testing "taskset (set_aff, needs CAP_SYS_NICE)" \
12                                     "$a 0x1 $SHELL -c $a\ -p\ \$$\|grep\ \"current\ affinity\ mask:\ 1\" >/dev/null;echo \$?" \   "$a 0x1 $SHELL -c '$a -p \$\$ | grep \"current affinity mask: 1\" >/dev/null'; echo \$?" \
13                                  "0\n" "" ""   "0\n" "" ""
14    
15  unset a  unset a
16  exit $FAILCOUNT  exit $FAILCOUNT

Legend:
Removed from v.983  
changed lines
  Added in v.984