Unified · Split
| @@ -29,7 +29,12 @@ CLEANFILES=\ · 28 unmodified lines | ||
| 29 | 29 | ftrace-test \ |
| 30 | 30 | tests.log \ |
| 31 | 31 | |
| 32 | −ftrace-test: all | |
| 32 | +TESTS=\ | |
| 33 | + ftrace-test \ | |
| 34 | + | |
| 35 | +all:V: $LIB | |
| 36 | + | |
| 37 | +ftrace-test: | |
| 33 | 38 | $CC tests/ftrace-test.c |
| 34 | 39 | $LD -o ftrace-test ftrace-test.$O |
| 35 | 40 | |
| @@ -38,13 +43,22 @@ installheaders: · 2 unmodified lines | ||
| 38 | 43 | cp $i /sys/include |
| 39 | 44 | } |
| 40 | 45 | |
| 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 | |
| 44 | 59 | |
| 45 | 60 | </sys/src/cmd/mksyslib |
| 46 | 61 | |
| 47 | 62 | nuke:V: |
| 48 | 63 | rm -f *.[$OS] [$OS].out $CLEANFILES $LIB |
| 49 | 64 | |
| 50 | −all:V: $LIB | |
| @@ -33,6 +33,8 @@ fn1(void) · 32 unmodified lines | ||
| 33 | 33 | Fn *f = infn("fn1"); |
| 34 | 34 | iqlock(f,&g); |
| 35 | 35 | if(rfork(RFPROC)==0){ |
| 36 | + if(!canqlock(&g)) | |
| 37 | + upanic(f,"some lock order garbage is happening"); | |
| 36 | 38 | iqunlock(f,&g); |
| 37 | 39 | upanic(f,"penis"); |
| 38 | 40 | } |
| @@ -47,6 +49,8 @@ fn2(void) · 8 unmodified lines | ||
| 47 | 49 | if((x = rfork(RFPROC)) == 0){ |
| 48 | 50 | Fn *f2 = infn("fn2@proc"); |
| 49 | 51 | fn1(); |
| 52 | + action(f,smprint("exiting pid = %d",getpid())); | |
| 53 | + exits("error: success"); | |
| 50 | 54 | outfn(f2); |
| 51 | 55 | } else if(x == -1){ |
| 52 | 56 | char *s = mallocz(sizeof(char)*1024,1); |