kernel: print proc info on addbroken
This commit is contained in:
parent
ecc2125b28
commit
93dfad6b0b
25
qa/kern/broken.c
Normal file
25
qa/kern/broken.c
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is part of Jehanne.
|
||||
*
|
||||
* Copyright (C) 2017 Giacomo Tesio <giacomo@tesio.it>
|
||||
*
|
||||
* Jehanne is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 2 of the License.
|
||||
*
|
||||
* Jehanne is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <u.h>
|
||||
#include <lib9.h>
|
||||
|
||||
void
|
||||
main(void)
|
||||
{
|
||||
abort();
|
||||
}
|
24
qa/kern/broken.runner
Executable file
24
qa/kern/broken.runner
Executable file
@ -0,0 +1,24 @@
|
||||
#!/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 >[2=1] &
|
||||
testpid=$apid
|
||||
|
||||
sleep 3
|
||||
|
||||
wait $testpid
|
||||
|
||||
if ( cat $test_output | grep suicide > /dev/null ) {
|
||||
rm $test_output
|
||||
echo PASS
|
||||
exit PASS
|
||||
}
|
||||
cat $test_output
|
||||
echo FAIL
|
||||
exit FAIL
|
||||
|
@ -15,6 +15,7 @@
|
||||
"awake_note0.c",
|
||||
"awake_note1.c",
|
||||
"brk.c",
|
||||
"broken.c",
|
||||
"execl.c",
|
||||
"float.c",
|
||||
"fork.c",
|
||||
|
@ -1057,6 +1057,9 @@ addbroken(Proc *p)
|
||||
broken.p[broken.n++] = p;
|
||||
qunlock(&broken);
|
||||
|
||||
dumpaproc(p);
|
||||
dumpregs(p->dbgreg);
|
||||
|
||||
p->state = Broken;
|
||||
p->psstate = 0;
|
||||
sched();
|
||||
|
Loading…
x
Reference in New Issue
Block a user