Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2007 06:13:23 GMT
From:      Zhouyi ZHOU <zhouzhouyi@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124991 for review
Message-ID:  <200708100613.l7A6DNa4069772@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124991

Change 124991 by zhouzhouyi@zhouzhouyi_mactest on 2007/08/10 06:13:17

	Add test cases for pipe io

Affected files ...

.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#5 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/pipe_io.c#1 add
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/fifo/00.t#2 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#15 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/pipe/00.t#1 add

Differences ...

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/Makefile#5 (text+ko) ====

@@ -6,7 +6,7 @@
 #CFLAGS+=-DHAS_TRUNCATE64
 #CFLAGS+=-DHAS_STAT64
 
-all:	macproc mactest mdconfigopenrdonly fifo_io
+all:	macproc mactest mdconfigopenrdonly fifo_io pipe_io
 
 macproc:	macproc.c
 	gcc -Wall ${CFLAGS} macproc.c -o macproc -lutil
@@ -17,9 +17,12 @@
 	gcc ${CFLAGS} -o mdconfigopenrdonly mdconfig.c -lutil -lgeom -lbsdxml -lsbuf
 fifo_io: fifo_io.c
 	gcc ${CFLAGS} -o fifo_io fifo_io.c mactestparser.tab.c macconf.c
+pipe_io: pipe_io.c
+	gcc ${CFLAGS} -o pipe_io pipe_io.c mactestparser.tab.c macconf.c
 
 clean:
 	rm -f macproc
 	rm -f mactest
 	rm -f mdconfigopenrdonly
 	rm -f fifo_io
+	rm -f pipe_io

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/fifo/00.t#2 (text+ko) ====

@@ -70,7 +70,7 @@
     echo "biba/high(low-high),mls/6(low-high) biba/high,mls/7" >> ${mactest_conf}
     echo -n "pid = -2 mac_test_check_vnode_open#VREAD:" >> ${mactest_conf}
     echo "biba/high(low-high),mls/7(low-high) biba/high,mls/7" >> ${mactest_conf}
-    fifotestexpect "" "" -r "mls/7(low-high)" -w "mls/6(low-high)" -f ${mactest_conf} -p ${n3}/${n2}
+    bizarretestexpect ${fifo_io} "" "" -r "mls/7(low-high)" -w "mls/6(low-high)" -f ${mactest_conf} -p ${n3}/${n2}
 
 #cleanup:
     t=`sysctl security.mac.mls.enabled=0`

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/misc.sh#15 (text+ko) ====

@@ -19,6 +19,7 @@
 mactest="${maindir}/mactest"
 mdconfigopenrdonly="${maindir}/mdconfigopenrdonly"
 fifo_io="${maindir}/fifo_io"
+pipe_io="${maindir}/pipe_io"
 
 . ${maindir}/tests/conf
 
@@ -112,15 +113,19 @@
 }
 
 
-fifotestexpect()
+bizarretestexpect()
 {
-	
+
+	command="${1}"
+	shift
+
 	e="${1}"
 	shift
 
 	e1="${1}"
 	shift
 
+
 	if [ -f ${tmp_file} ]; then
 	    rm ${tmp_file}
 	fi
@@ -139,7 +144,7 @@
 	label1="mls/equal,biba/equal"
 	setfmac ${label1} ${tmp_file} ${tmp_file1} /var/log/mactest
 
-	${fifo_io} $* 2>${tmp_file1} 1>>${tmp_file}
+	${command} $* 2>${tmp_file1} 1>>${tmp_file}
 
 	c=1
 	b=1



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708100613.l7A6DNa4069772>