kernel: fix _procfdprint to use chan's flags

This commit is contained in:
2017-09-28 23:04:05 +02:00
parent ba11888753
commit 90c3415176
4 changed files with 111 additions and 3 deletions

37
qa/kern/dup.runner Executable file
View File

@ -0,0 +1,37 @@
#!/cmd/rc
runner=$0
test = `{echo $runner|sed 's/.runner//'}
test_output = /tmp/output-`{basename $test}
if ( test -e $test_output) rm $test_output
$test > $test_output
testpid=$apid
wait $testpid
if ( ! cat $test_output | grep 'Got 0ctl: 0 r ' > /dev/null ) {
cat $test_output
echo FAIL
exit FAIL
}
if ( ! cat $test_output | grep 'Got 1ctl: 1 w ' > /dev/null ) {
cat $test_output
echo FAIL
exit FAIL
}
if ( ! cat $test_output | grep 'Got 2ctl: 2 w ' > /dev/null ) {
cat $test_output
echo FAIL
exit FAIL
}
if ( ! cat $test_output | grep 'Got: 3 rE ' > /dev/null ) {
cat $test_output
echo FAIL
exit FAIL
}
rm $test_output
echo PASS
exit PASS