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
2929 ftrace-test \
3030 tests.log \
3131
32−ftrace-test: all
32+TESTS=\
33+ ftrace-test \
34+
35+all:V: $LIB
36+
37+ftrace-test:
3338 $CC tests/ftrace-test.c
3439 $LD -o ftrace-test ftrace-test.$O
3540
@@ -38,13 +43,22 @@ installheaders: · 2 unmodified lines
3843 cp $i /sys/include
3944 }
4045
41−run-tests: ftrace-test
42− rm -f tests.log
43− ftrace-test >> tests.log >[2=1]
46+run-tests:EVQ: ftrace-test
47+ echo 'running tests...'
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
4459
4560 </sys/src/cmd/mksyslib
4661
4762 nuke:V:
4863 rm -f *.[$OS] [$OS].out $CLEANFILES $LIB
4964
50−all:V: $LIB
tests/ftrace-test.c+4−0
@@ -33,6 +33,8 @@ fn1(void) · 32 unmodified lines
3333 Fn *f = infn("fn1");
3434 iqlock(f,&g);
3535 if(rfork(RFPROC)==0){
36+ if(!canqlock(&g))
37+ upanic(f,"some lock order garbage is happening");
3638 iqunlock(f,&g);
3739 upanic(f,"penis");
3840 }
@@ -47,6 +49,8 @@ fn2(void) · 8 unmodified lines
4749 if((x = rfork(RFPROC)) == 0){
4850 Fn *f2 = infn("fn2@proc");
4951 fn1();
52+ action(f,smprint("exiting pid = %d",getpid()));
53+ exits("error: success");
5054 outfn(f2);
5155 } else if(x == -1){
5256 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