From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH V3 3/4] testscripts/isofs.sh: removed some "unnecessary" steps
Date: Tue, 6 May 2014 15:17:50 +0200 [thread overview]
Message-ID: <20140506131750.GA8814@rei> (raw)
In-Reply-To: <5368C827.1020007@oracle.com>
Hi!
> > Giving it a second though it may. Because if you just mount and unmout
> > the device the kernel code coverage is likely much smaller.
> >
> > What about we list all files on the device and redirect the output to
> > /dev/null and check for the ls exit value?
>
> In this case most of the changes introduced by this patch are not needed
> at all:)
>
> So the final one would be something like this:
>
> diff --git a/testscripts/isofs.sh b/testscripts/isofs.sh
> index 2bb2555..1f69928 100755
> --- a/testscripts/isofs.sh
> +++ b/testscripts/isofs.sh
> @@ -98,7 +98,7 @@ for mkisofs_opt in \
> "-allow-lowercase -allow-multidot -iso-level 3 -f -l -D -J -L -R"
> do
> rm -f isofs.iso
> - mkisofs -o isofs.iso -quiet $mkisofs_opt $MAKE_FILE_SYS_DIR
> + mkisofs -o isofs.iso -quiet $mkisofs_opt $MAKE_FILE_SYS_DIR 2>
> /dev/null
> if [ $? -eq 0 ]; then
> tst_resm TPASS \
> "mkisofs -o isofs.iso -quiet $mkisofs_opt
> $MAKE_FILE_SYS_DIR"
> @@ -128,9 +128,11 @@ do
> continue
> fi
>
> - ls -lR $MNT_POINT
> - exportfs -i -o no_root_squash,rw *:$MNT_POINT
> - exportfs -u :$MNT_POINT
> + ls -lR $MNT_POINT > /dev/null
> + if [ $? -ne 0 ]; then
> + tst_resm TFAIL "ls -lR $MNT_POINT"
> + continue
> + fi
>
> umount $MNT_POINT
> if [ $? -ne 0 ]; then
>
> Correct?
I think that we should try to umount it if the ls has failed too.
In reality when ls fails the system would be in inconstistent state and
the umount will likely fail too but it would not harm.
> exportfs always returns 0, so there is no point to execute it at all.
Right.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-05-06 13:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 14:22 [LTP] isofs.sh series V3 Stanislav Kholmanskikh
2014-03-27 14:22 ` [LTP] [PATCH V3 1/4] testscripts/isofs.sh: cleanup Stanislav Kholmanskikh
2014-06-16 6:22 ` Mike Frysinger
2014-06-16 12:29 ` Stanislav Kholmanskikh
2014-03-27 14:22 ` [LTP] [PATCH V3 2/4] testscripts/isofs.sh: use the new shell interface Stanislav Kholmanskikh
2014-03-27 14:22 ` [LTP] [PATCH V3 3/4] testscripts/isofs.sh: removed some "unnecessary" steps Stanislav Kholmanskikh
2014-04-29 15:29 ` chrubis
2014-04-29 15:30 ` chrubis
[not found] ` <5368C827.1020007@oracle.com>
2014-05-06 13:17 ` chrubis [this message]
2014-06-16 6:23 ` Mike Frysinger
2014-06-16 12:30 ` Stanislav Kholmanskikh
2014-03-27 14:22 ` [LTP] [PATCH V3 4/4] Declare an iso9660 fs testcase based on isofs.sh Stanislav Kholmanskikh
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=20140506131750.GA8814@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.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