[PVFS2-CVS] commit by slang in pvfs2/test/automated/sysint-tests.d: cp

CVS commit program cvs at parl.clemson.edu
Thu Jan 12 14:43:26 EST 2006


Update of /projects/cvsroot/pvfs2/test/automated/sysint-tests.d
In directory parlweb:/tmp/cvs-serv3174/test/automated/sysint-tests.d

Modified Files:
      Tag: dbpf-changes-branch
	cp 
Log Message:
merging changes from HEAD to dbpf branch


Index: cp
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/automated/sysint-tests.d/cp,v
diff -p -u -r1.5 -r1.5.2.1
--- cp	30 Nov 2005 23:47:52 -0000	1.5
+++ cp	12 Jan 2006 19:43:26 -0000	1.5.2.1
@@ -2,48 +2,56 @@
 
 # run through a bunch of possible command line arguments for pvfs2-cp:
 
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure1
+nr_errors=0
 
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -s 128 \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure2
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -s $((1024*1024)) \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure3
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -n 1 \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure4
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -n 10 \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure5
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -b 128 \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure6
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -b $((1024*1024)) \
-                ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure7
-
-# and test reading too
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp \
-                ${PVFS2_MOUNTPOINT}/configure1 ${PVFS2_DEST}/config1
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -s 128 \
-                ${PVFS2_MOUNTPOINT}/configure2 ${PVFS2_DEST}/config2 
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -s $((1024*1024)) \
-                ${PVFS2_MOUNTPOINT}/configure3 ${PVFS2_DEST}/config3 
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -n 1 \
-                ${PVFS2_MOUNTPOINT}/configure4 ${PVFS2_DEST}/config4 
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -n 10 \
-                ${PVFS2_MOUNTPOINT}/configure5 ${PVFS2_DEST}/config5 
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -b 128 \
-                ${PVFS2_MOUNTPOINT}/configure6 ${PVFS2_DEST}/config6 
-
-${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp -b $((1024*1024)) \
-                ${PVFS2_MOUNTPOINT}/configure7 ${PVFS2_DEST}/config7 
-
-# TODO: cmp all the files
-cmp ${PVFS2_DEST}/pvfs2/configure ${PVFS2_DEST}/config1
+# copy_test: 
+#  the idea is we copy a file from local to pvfs2 and back again, seeing if
+#  any differences show up as a result.
+#
+#  usage:  copy_test <src> <dest> <local> 
+#   where <src> is the original local file (source of the 1st copy)
+#         <dest> is a pvfs2 file (destination of the 1st copy, src of the 2nd
+#                 copy) 
+#         <local> is a different local file (dest of the 2nd copy)
+copy_test() 
+{
+	src=$1
+	dest=$2
+	local=$3
+	shift 3 
+	${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp $src $dest $@
+	${PVFS2_DEST}/INSTALL-pvfs2/bin/pvfs2-cp $dest $local $@
+
+	diff $src $local 
+	if [ $? -ne 0 ] ; then
+		nr_errors=$((nr_errors+1)) 
+		echo "$local differs from $src"
+	fi
+}
+
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure0\
+	${PVFS2_DEST}/config0 
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure1\
+	${PVFS2_DEST}/config1 -s 128 
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure2\
+	${PVFS2_DEST}/config2 -s $((1024*1024))
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure3\
+	${PVFS2_DEST}/config3 -n 1
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure4\
+	${PVFS2_DEST}/config4 -n 10
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure5\
+	${PVFS2_DEST}/config5 -b 128
+
+copy_test ${PVFS2_DEST}/pvfs2/configure ${PVFS2_MOUNTPOINT}/configure6\
+	${PVFS2_DEST}/config6 -b $((1024*1024))
+
+if [ $nr_errors -ne 0 ] ; then 
+	echo "$nr_errors errors found"
+	exit 1
+fi



More information about the PVFS2-CVS mailing list