Skip to contentSkip to conversation

testscripts/test_robind.sh: add fs_readonly to default

PATCH In review Xiaoguang Wang 2 participants 2 messages Nov 18, 2013 – Nov 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 testscripts/test_robind.sh: add fs_readonly to default

cleanup of testscripts/test_robind.sh

testscripts/fs_ro_tests: delete some unecessary tests

---
 scenario_groups/default    |   1 +
 testscripts/fs_ro_tests    |  19 ----
 testscripts/test_robind.sh | 272 ++++++++++++++++++++++-----------------------
 3 files changed, 134 insertions(+), 158 deletions(-)
scenario_groups/default +1 -0
index 9eca8ad..520db8b 100644
@@ -25,3 +25,4 @@ hugetlb
 commands
 hyperthreading
 kernel_misc
+fs_readonly
testscripts/fs_ro_tests +0 -19
index ec4a86c..2ecd9c5 100644
@@ -35,22 +35,3 @@ rwtest -N rwtest04 -c -q -i 60s -n 2  -f sync -s mmread,mmwrite -m random -Dv 10
 rwtest -N rwtest05 -c -q -i 50 -T 64b 500b:rwtest01%f
 rwtest -N iogen01 -i 120s -s read,write -Da -Dv -n 2 500b:doio.f1.$$ 1000b:doio.f2.$$
 fs_inod . 10 10 1
-linktest.pl
-openfile -f10 -t10
-inode01
-inode02
-stream01
-stream02
-stream03
-stream04
-stream05
-ftest01
-ftest02
-ftest03
-ftest04
-ftest05
-ftest06
-ftest07
-ftest08
-lftest 80
-writetest
testscripts/test_robind.sh +133 -139

328 lines not on this page · raw message

Signature · 13 lines
1.8.2.1


------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

Hi!

Quoted 1 line

cleanup of testscripts/test_robind.sh

Can you send the cleanup as a separate patch?

Quoted 1 line

testscripts/fs_ro_tests: delete some unecessary tests

Why are these tests unnecessary?

Quoted 12 lines
---
 scenario_groups/default    |   1 +
 testscripts/fs_ro_tests    |  19 ----
 testscripts/test_robind.sh | 272 ++++++++++++++++++++++-----------------------
 3 files changed, 134 insertions(+), 158 deletions(-)
scenario_groups/default +0 -0
index 9eca8ad..520db8b 100644

scenario_groups/default hugetlb · line 28

Quoted 4 lines
scenario_groups/default +1 -0
@@ -25,3 +25,4 @@ hugetlb
 commands
 hyperthreading
 kernel_misc
+fs_readonly

I generally don't like adding tests that are executed as a signle script because it's hard to tell what went wrong when some of the tests has failed. It would be better to split them into separate testcases.

Quoted 77 lines
testscripts/fs_ro_tests +0 -19
index ec4a86c..2ecd9c5 100644
@@ -35,22 +35,3 @@ rwtest -N rwtest04 -c -q -i 60s -n 2  -f sync -s mmread,mmwrite -m random -Dv 10
 rwtest -N rwtest05 -c -q -i 50 -T 64b 500b:rwtest01%f
 rwtest -N iogen01 -i 120s -s read,write -Da -Dv -n 2 500b:doio.f1.$$ 1000b:doio.f2.$$
 fs_inod . 10 10 1
-linktest.pl
-openfile -f10 -t10
-inode01
-inode02
-stream01
-stream02
-stream03
-stream04
-stream05
-ftest01
-ftest02
-ftest03
-ftest04
-ftest05
-ftest06
-ftest07
-ftest08
-lftest 80
-writetest
testscripts/test_robind.sh +11 -19
index 4c01f4e..231419a 100755
@@ -45,23 +45,20 @@
 $trace_logic
 
 # The test case ID, the test case count and the total number of test case
-TCID=${TCID:-test_robind.sh}
-TST_TOTAL=1
-TST_COUNT=1
-export TCID
-export TST_COUNT
-export TST_TOTAL
+export TCID=${TCID:-test_robind.sh}
+export TST_TOTAL=1
+export TST_COUNT=1
 
 usage()
 {
-  cat << EOF
-  usage: $0 [ext3,ext2,jfs,xfs,reiserfs,ramfs]
+	cat << EOF
+usage: $0 [ext3,ext2,jfs,xfs,reiserfs,ramfs]
 
-  This script verifies ReadOnly-filesystem, by mounting imagefile and
-  executing the filesystem tests.
+	This script verifies ReadOnly-filesystem, by mounting imagefile and
+executing the filesystem tests.
 
-  OPTIONS
-    -h    display this message and exit
+OPTIONS
+	-h    display this message and exit
 EOF
 }
 
@@ -81,18 +78,15 @@ trap cleanup INT
 #==============================================================================
 function cleanup
 {
-    umount ${TMPDIR}/dir3-ro 2> /dev/null > /dev/null
-    umount ${TMPDIR}/dir2-bound 2> /dev/null 1> /dev/null
-    umount ${TMPDIR}/dir1 2> /dev/null 1> /dev/null
-    if [ ! -z $1 ]; then {
-        rm -rf $1 || true
-    }
-    fi
+	umount ${TMPDIR}/dir3-ro 2> /dev/null > /dev/null
+	umount ${TMPDIR}/dir2-bound 2> /dev/null 1> /dev/null

testscripts/test_robind.sh trap cleanup INT · line 89

Quoted 10 lines
testscripts/test_robind.sh +5 -3
+	umount ${TMPDIR}/dir1 2> /dev/null 1> /dev/null
+	if [ ! -z $1 ]; then
+		rm -rf $1 || true
+	fi
 }
 
-#===============================================================================
-# FUNCTION NAME:    setup
-#
+#=============================================================================== # FUNCTION NAME:    setup #

This newly added line looks like a mistake.

Also these comments are mostly useless and only make the test source longer.

Quoted 59 lines
testscripts/test_robind.sh +23 -23
 # FUNCTION DESCRIPTION: Does the initailization
 #
 # PARAMETERS:   File_systems (if any )
@@ -101,33 +95,33 @@ function cleanup
 #===============================================================================
 function setup
 {
-    mkdir ${TMPDIR}
-    FAILLOG="$TMPDIR/errs.log"
-    PASSLOG="$TMPDIR/pass.log"
+	mkdir ${TMPDIR}
+	FAILLOG="$TMPDIR/errs.log"
+	PASSLOG="$TMPDIR/pass.log"
 
-    for i in $DIRS; do
-        rm -rf ${TMPDIR}/$i || true
-        mkdir -p ${TMPDIR}/$i
-    done;
+	for i in $DIRS; do
+		rm -rf ${TMPDIR}/$i || true
+		mkdir -p ${TMPDIR}/$i
+	done;
 
-    # Populating the default FS as ext3, if FS is not given
-    if [ -z "$*" ]; then
-        FSTYPES="ext3"
-    else
-        FSTYPES="$*"
-    fi
+	# Populating the default FS as ext3, if FS is not given
+	if [ -z "$*" ]; then
+		FSTYPES="ext3"
+	else
+		FSTYPES="$*"
+	fi
 
-    # set the LTPROOT directory
-    cd `dirname $0`
-    echo "${PWD}" | grep testscripts > /dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        cd ..
-        export LTPROOT="${PWD}"
-        export PATH="${PATH}:${LTPROOT}/testcases/bin"
-    fi
+	# set the LTPROOT directory
+	cd `dirname $0`
+	echo "${PWD}" | grep testscripts > /dev/null 2>&1
+	if [ $? -eq 0 ]; then
+		cd ..
+		export LTPROOT="${PWD}"
+		export PATH="${PATH}:${LTPROOT}/testcases/bin"
+	fi
 
-    FS_Tests="${LTPROOT}/testscripts/fs_ro_tests"
-    cd ${TMPDIR}
+	FS_Tests="${LTPROOT}/testscripts/fs_ro_tests"
+	cd ${TMPDIR}
 }
 
Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list