From: chrubis@suse.cz
To: Ramesh <rameshyr@linux.vnet.ibm.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] syscalls/mount0* and inotify03 tests are getting skipped from runltp
Date: Wed, 3 Apr 2013 13:47:14 +0200 [thread overview]
Message-ID: <20130403114714.GB2002@rei> (raw)
In-Reply-To: <515C133C.6030803@linux.vnet.ibm.com>
Hi!
> I would like to share a work around which I have tried to make the tests
> to run
> by default when -b and -B arguments are not specified.Please share your
> thoughts
> on this and also let me know if there is any disadvantage in using a
> loop device
> as I have made use of it in my changes. Also, suggest me an alternate
> way to use
> this work around if the changes in runltp is not a better idea.
The runltp script is considered a hack rather than proper solution but
we don't have replacement yet, so we have to live with it as it is now.
The patch looks realtively good. Comments bellow.
> Here is the work around that I tried,
>
> +++ runltp 2013-04-02 16:42:47.836836402 +0530
> @@ -681,17 +681,43 @@ main()
>
> if [ -n "$DEVICE" ]; then
> sed -i "s|DEVICE|$DEVICE|" ${TMP}/alltests
> + RC=$?
> else
> - echo "remove test cases which require the block device."
> - echo "You can specify it with option -b"
> - sed -i "/DEVICE/d" ${TMP}/alltests
> + #create a block device with ext4 filesystem.
> + dd if=/dev/zero of=${TMP}/test.img bs=1 count=10MB &>/dev/null
If I'm not mistaken the bs=1 would make the whole process way too slow.
Also I'm not sure if 10MB is enough for ext4.
> + if [ $? -ne 0 ]; then
> + echo "Please check for disk space and re-run"
> + exit 1
> + else
> + ##search for an unused loop dev
> + LOOP_DEV=$(losetup -f)
> + if [ $? -ne 0 ]; then
> + echo "no unused loop device is found"
> + exit 1
There may be embeded systems without the loopback driver in kernel and
we should work on these too. So rather than aborting here, we should
disable the testcases in question.
> + else
> + ##attach the created file to loop dev.
> + losetup $LOOP_DEV ${TMP}/test.img &>/dev/null
> + if [ $? -ne 0 ]; then
> + echo "losetup failed to create block device"
> + exit 1
> + else
> + ##format the block dev with ext4 filesystem.
> + mkfs.ext4 $LOOP_DEV &>/dev/null
> + #set the values in alltests which require block device.
> + DEVICE=$LOOP_DEV
> + DEVICE_FS_TYPE="ext4"
> + sed -i "s|DEVICE|$DEVICE|" ${TMP}/alltests
> + RC=$?
> + fi
> + fi
> + fi
> fi
>
> - if [ $? -ne 0 ]; then
> + if [ $RC -ne 0 ]; then
> echo "FATAL: error during prcessing alltests file by sed"
> exit 1
> fi
> -
> +
> if [ -n "$DEVICE" ]; then
> mnt_pnt=`mktemp -d "${TMP}/mnt_pnt.XXXXXX"`
> if [ -n "$DEVICE_FS_TYPE" ]; then
> @@ -973,6 +999,8 @@ main()
>
> cleanup()
> {
> + [ -e "${TMP}/test.img" ] && rm -f ${TMP}/test.img
> + [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV
> rm -rf ${TMP}
> }
Also please send a signed patch in unified diff format next time (git
can create these for your).
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-04-03 11:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 17:55 [LTP] syscalls/mount0* and inotify03 tests are getting skipped from runltp Ramesh
2013-03-26 19:47 ` chrubis
[not found] ` <51529266.2080906@linux.vnet.ibm.com>
2013-03-27 10:28 ` chrubis
[not found] ` <515C133C.6030803@linux.vnet.ibm.com>
2013-04-03 11:47 ` chrubis [this message]
[not found] ` <515C5D28.3050604@linux.vnet.ibm.com>
2013-04-04 11:59 ` 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=20130403114714.GB2002@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=rameshyr@linux.vnet.ibm.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