1#!/bin/sh 2# Copyright 2006 Bernhard Reutner-Fischer 3# Licensed under GPLv2 or later, see file LICENSE in this source tree. 4 5. ./testing.sh 6a="taskset" 7 8# testing "test name" "opts" "expected result" "file inp" "stdin" 9testing "taskset (get from pid 1)" "$a -p 1 >/dev/null;echo \$?" "0\n" "" "" 10testing "taskset (invalid pid)" "$a -p 0 >/dev/null 2>&1;echo \$?" "1\n" "" "" 11testing "taskset (set_aff, needs CAP_SYS_NICE)" \ 12 "$a 0x1 $SHELL -c '$a -p \$\$ | grep \"current affinity mask: 1\" >/dev/null'; echo \$?" \ 13 "0\n" "" "" 14 15unset a 16exit $FAILCOUNT 17