public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v3] testscripts/test_robind.sh: cleanup and make some fixes
Date: Tue, 8 Apr 2014 20:20:52 +0200	[thread overview]
Message-ID: <20140408182052.GA5854@rei> (raw)
In-Reply-To: <1395311334-22330-1-git-send-email-wangxg.fnst@cn.fujitsu.com>

Hi!
> Remove useless comments and abandon the operation which creates
> a 500MB image-file. If user wants to run these tests, a big block
> device should be specified by running runltp with -z option.
> 
> And we split tests in testscripts/fs_ro_tests into separate testcases,
> keep one entry per test in runtest/fs_readonly
> 
> Using the interface provided by the shell library test.sh.
> 
> Delete fs_ro_tests, which is not used now.

I've fixed the script to be POSIX shell compatible (see diff below) and added a
followup patch to move the test_robind.sh script to
testcases/kernel/fs/fs_readonly because the runtest file does not work when
it's in  testscripts directory which is not in $PATH.

Pushed, thanks.

 . test.sh
 
-function usage()
+usage()
 {
        cat << EOF
        usage: $0 -c command [ext3,ext2,jfs,xfs,reiserfs,ramfs]
@@ -67,7 +67,7 @@ EOF
        exit 1
 }
 
-function umount_mntpoint
+umount_mntpoint()
 {
        if [ $dir3_ro_mount_flag -eq 1 ];then
                umount dir3-ro
@@ -97,26 +97,26 @@ function umount_mntpoint
        fi
 }
 
-function cleanup
+cleanup()
 {
        umount_mntpoint
        tst_rmdir
 }
-TST_CLEANUP=cleanup
 
 # parameters: file_systems (if any )
-function setup
+setup()
 {
        tst_require_root
 
-       tst_tmpdir
-
        if [ -z "$LTP_BIG_DEV" ];then
                tst_brkm TCONF "tests need a big block device(>=500MB)"
        else
                device=$LTP_BIG_DEV
        fi
 
+       tst_tmpdir
+       TST_CLEANUP=cleanup
+
        for dir in $DIRS
        do
                rm -rf $dir

 # Executes the tests for differnt FS's
 for fstype in $FSTYPES; do
        opts="-F"
-       if [ "$fstype" == "reiserfs" ]; then
+       if [ "$fstype" = "reiserfs" ]; then
                opts="-f --journal-size 513 -q"
-       elif [ "$fstype" == "jfs" ]; then
+       elif [ "$fstype" = "jfs" ]; then
                opts="-f"
-       elif [ "$fstype" == "xfs" ]; then
+       elif [ "$fstype" = "xfs" ]; then
                opts=""
        fi



-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-04-08 18:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 10:28 [LTP] [PATCH v3] testscripts/test_robind.sh: cleanup and make some fixes Xiaoguang Wang
2014-04-08 18:20 ` chrubis [this message]
2014-04-08 19:15   ` chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140408182052.GA5854@rei \
    --to=chrubis@suse.cz \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=wangxg.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox