History

updated tests and shit

Matthew Veety committed 10 years ago

Commit 109f16c1 parent 11191a72 files · +23 −5Browse files

Unified · Split

2 files
  1. mkfile +19 −5
  2. tests/ftrace-test.c +4 −0
mkfile+19−5
@@ -29,7 +29,12 @@ CLEANFILES=\ · 28 unmodified lines
29 ftrace-test \29 ftrace-test \
30 tests.log \30 tests.log \
31 31
32ftrace-test: all32TESTS=\
33 ftrace-test \
34
35all:V: $LIB
36
37ftrace-test:
33 $CC tests/ftrace-test.c38 $CC tests/ftrace-test.c
34 $LD -o ftrace-test ftrace-test.$O39 $LD -o ftrace-test ftrace-test.$O
35 40
@@ -38,13 +43,22 @@ installheaders: · 2 unmodified lines
38 cp $i /sys/include43 cp $i /sys/include
39 }44 }
40 45
41run-tests: ftrace-test46run-tests:EVQ: ftrace-test
42 rm -f tests.log47 echo 'running tests...'
43 ftrace-test >> tests.log >[2=1]48 {
49 echo -n 'tests started at '
50 date
51 echo '-----------------------------------------------------'
52 for(i in $TESTS){
53 echo 'running test: '^$i
54 $i >[2=1]
55 echo '-----------------------------------------------------'
56 }
57 echo 'tests done.'
58 } > tests.log
44 59
45</sys/src/cmd/mksyslib60</sys/src/cmd/mksyslib
46 61
47nuke:V:62nuke:V:
48 rm -f *.[$OS] [$OS].out $CLEANFILES $LIB63 rm -f *.[$OS] [$OS].out $CLEANFILES $LIB
49 64
50all:V: $LIB
tests/ftrace-test.c+4−0
@@ -33,6 +33,8 @@ fn1(void) · 32 unmodified lines
33 Fn *f = infn("fn1");33 Fn *f = infn("fn1");
34 iqlock(f,&g);34 iqlock(f,&g);
35 if(rfork(RFPROC)==0){35 if(rfork(RFPROC)==0){
36 if(!canqlock(&g))
37 upanic(f,"some lock order garbage is happening");
36 iqunlock(f,&g);38 iqunlock(f,&g);
37 upanic(f,"penis");39 upanic(f,"penis");
38 }40 }
@@ -47,6 +49,8 @@ fn2(void) · 8 unmodified lines
47 if((x = rfork(RFPROC)) == 0){49 if((x = rfork(RFPROC)) == 0){
48 Fn *f2 = infn("fn2@proc");50 Fn *f2 = infn("fn2@proc");
49 fn1();51 fn1();
52 action(f,smprint("exiting pid = %d",getpid()));
53 exits("error: success");
50 outfn(f2);54 outfn(f2);
51 } else if(x == -1){55 } else if(x == -1){
52 char *s = mallocz(sizeof(char)*1024,1);56 char *s = mallocz(sizeof(char)*1024,1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t