nacl - run tests under emulator.
special all-nacl.bash and test/run-nacl that
run just the tests known to work under nacl.
the rest requires closures.

fix another bug or two in syscall.

R=r
DELTA=420  (410 added, 8 deleted, 2 changed)
OCL=34882
CL=34907
diff --git a/test/run b/test/run
index 56de68a..f850054 100755
--- a/test/run
+++ b/test/run
@@ -20,6 +20,11 @@
 	exit 1
 esac
 
+case X"$GOOS" in
+Xnacl)
+	export E="nacl"
+esac
+
 export G=${A}g
 export L=${A}l
 export GOTRACEBACK=0
@@ -36,6 +41,8 @@
 # on thresher, 3GB suffices to run the tests; with 2GB, peano fails.
 ulimit -v 4000000
 
+true >pass.out
+
 for dir in . ken chan interface fixedbugs bugs
 do
 	echo
@@ -44,7 +51,7 @@
 	do
 		export F=$(basename $i .go)
 		export D=$dir
-		sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|' >$RUNFILE		
+		sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|' >$RUNFILE
 		if ! sh $RUNFILE >$TMP1FILE 2>$TMP2FILE
 		then
 			echo
@@ -61,6 +68,8 @@
 		elif [ $dir = "bugs" ]
 		then
 			echo $i succeeded with no output.
+		else
+			echo $i >>pass.out
 		fi
 	done
 done | # clean up some stack noise