syscalls/mount0* and inotify03 tests are getting skipped from runltp
I tried to run syscalls test with ./runltp -f syscalls, it's found that the below tests
are getting skipped from the run,
-----------
inotify03 inotify03 -D DEVICE -T DEVICE_FS_TYPE
mount01 mount01 -D DEVICE -T DEVICE_FS_TYPE
mount02 mount02 -D DEVICE -T DEVICE_FS_TYPE
mount03 mount03 -D DEVICE -T DEVICE_FS_TYPE
mount04 mount04 -D DEVICE -T DEVICE_FS_TYPE
umount01 umount01 -D DEVICE -T DEVICE_FS_TYPE
umount02 umount02 -D DEVICE -T DEVICE_FS_TYPE
umount03 umount03 -D DEVICE -T DEVICE_FS_TYPE
-----------
I didn't get the value of DEVICE & DEVICE_FS_TYPE in any of conf files and also, as
the tests expect a block device, I executed the tests by specifying a block device
(-D /dev/sda1 -T ext4), tests passed.
Also,as the DEVICE & DEVICE_FS_TYPE need to be explicitly specifed to all the tests,
these tests should be commented out in ltp/runtest/syscalls which is used by runltp.
Any comments on this issue are appreciated.
Also, let me know is there a way by which we can make these tests to run from runltp
in an automated environment.
Regards,
Ramesh YR
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 20 lines
I tried to run syscalls test with ./runltp -f syscalls, it's found that the below tests
are getting skipped from the run,
-----------
inotify03 inotify03 -D DEVICE -TDEVICE_FS_TYPE
mount01 mount01 -D DEVICE -TDEVICE_FS_TYPE
mount02 mount02 -D DEVICE -TDEVICE_FS_TYPE
mount03 mount03 -D DEVICE -TDEVICE_FS_TYPE
mount04 mount04 -D DEVICE -TDEVICE_FS_TYPE
umount01 umount01 -D DEVICE -TDEVICE_FS_TYPE
umount02 umount02 -D DEVICE -TDEVICE_FS_TYPE
umount03 umount03 -D DEVICE -TDEVICE_FS_TYPE
-----------I didn't get the value of DEVICE &
DEVICE_FS_TYPEin any of conf files and also, as
the tests expect a block device, I executed the tests by specifying a block device
(-D/dev/sda1-T ext4), tests passed.
Quoted 6 lines
Also,as the DEVICE &
DEVICE_FS_TYPEneed to be explicitly specifed to all the tests,
these tests should be commented out in ltp/runtest/syscalls which is used by runltp.Any comments on this issue are appreciated.
The runtest files are processed before they are executed. See -b DEVICE and -B DEVICE_FS_TYPE runltp parameters.
The current runltp script is more of the hack than solution. I've send a RFC email with a description of planned successor to the LTP mailing list not that long ago (but I haven't started writing the code yet).
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 46 lines
Quoted 6 lines
The runtest files are processed before they are executed. See -b DEVICE and -B
DEVICE_FS_TYPErunltp parameters.The current runltp script is more of the hack than solution. I've send a RFC email with a description of planned successor to the LTP mailing list not that long ago (but I haven't started writing the code yet).
Thanks Cyril !
I got it from runltp --usage, then I tried to execute the tests by passing -b DEVICE and -B
DEVICE_FS_TYPEto runltp but it failed with the below error,---
sed: can't read : No such file or directory
FATAL: error during processing alltests file by sed
---I went through the runltp script to see the cause for this error and found that
the below substitution by sed leading to the error.Quoted 1 line
Quoted 1 line
sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|" ${TMP}/alltests
Here, I don't see any reason why the -e is used with sed as we are not performing
sed operation on multiple expressions.I just removed -e option and ran the tests, tests were successfully executed.
<patch snippet>
runltp 2013-03-27 14:39:59.322856566 +0530 renamed from runltp_org 2013-03-27 14:40:12.029836439 +0530 +1
-1@@ -719,7 +719,7 @@ main() fi if [ -n "$DEVICE" ]; then - sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|" ${TMP}/alltests + sed -i "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|" ${TMP}/alltests fi if [ $? -ne 0 ]; then
Quoted 3 lines
Please le me know if the removal of -e is a better solution for the issue or is it really
required for any other advantages.
This has been fixed in 0b6c356437acfa2b4cf131a80a52a8407d096fac (about ten months ago).
If you runned into this bug you are not using latest release. You really should use the latest release otherwise you will find more bugs that were fixed meanwhile.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 9 lines
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.
Quoted 4 lines
Here is the work around that I tried,
+++ runltp 2013-04-02 16:42:47.836836402 +0530
Review main() · line 687
Quoted 10 lines
(quoted diff) +3
-3@@ -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.
Review main() · line 696
Quoted 9 lines
(quoted diff) +9
-0+ 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.
Quoted 30 lines
(quoted diff) +19
-2+ 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
Review main() · line 1005
Quoted 7 lines
(quoted diff) +2
-0@@ -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).
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 15 lines
ltp-full-20130109/runltp | 48 ++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 44 insertions(+), 4 deletions(-)ltp-full-20130109/runltp +1
-1@@ -681,13 +681,20 @@ main() if [ -n "$DEVICE" ]; then sed -i "s|DEVICE|$DEVICE|" ${TMP}/alltests + RC=$? else - echo "remove test cases which require the block device."
ltp-full-20130109/runltp main() · line 693
Quoted 10 lines
ltp-full-20130109/runltp +8
-2- echo "You can specify it with option -b" - sed -i "/DEVICE/d" ${TMP}/alltests + create_block + if [ $? -eq 0 ]; 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
We should update the message here a little to let the user know that
1) no device was speficied on command line
2) the loopback device could not be created
3) tests that needs the device are disabled
ltp-full-20130109/runltp main() · line 698
Quoted 6 lines
ltp-full-20130109/runltp +2
-1+ RC=$? fi - if [ $? -ne 0 ]; then + if [ $RC -ne 0 ]; then echo "FATAL: error during prcessing alltests file by sed"
^
Could you please also fix this typo
ltp-full-20130109/runltp main() · line 984
Quoted 10 lines
ltp-full-20130109/runltp +4
-0exit 1 fi@@ -971,8 +978,41 @@ main() exit $VALUE } +create_block() +{ + #create a block device with ext4 filesystem. + dd if=/dev/zero of=${TMP}/test.img bs=10 count=10MB &>/dev/null
Still not right, this will create roughly 100MB file (the count and the block size get multiplied). The correct one for 10MB would be:
dd if=/dev/zero of=${TMP}/test.img bs=1kB count=10240
(the 1kB blocks are about the optimal size for write and we request
10240 of them)
ltp-full-20130109/runltp main() · line 986
Quoted 2 lines
ltp-full-20130109/runltp +2
-0+ if [ $? -ne 0 ]; then + echo "Please check for disk space and re-run"
Please be more verbose here about what has gone wrong. Something like:
"Failed to create loopback device image, plese check disk space and re-run."
Quoted 6 lines
ltp-full-20130109/runltp +6
-0+ return 1 + else + ##search for an unused loop dev + LOOP_DEV=$(losetup -f) + if [ $? -ne 0 ]; then + echo "no unused loop device is found"
ltp-full-20130109/runltp main() · line 1002
Quoted 10 lines
ltp-full-20130109/runltp +10
-0+ return 1 + 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" + return 1 + else + ##format the block dev with ext3 filesystem. + mkfs.ext4 $LOOP_DEV &>/dev/null
The comment here disagrees with the actual code, i.e. ext3 vs ext4.
I would just remove it as it's pretty clear what the line does without it.
And you should check the return value from the mkfs just in case.
Quoted 15 lines
ltp-full-20130109/runltp +11
-0+ #set the values in alltests which require block device. + DEVICE=$LOOP_DEV + DEVICE_FS_TYPE="ext4" + return 0 + fi + fi + fi +} + cleanup() { + [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img + [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV rm -rf ${TMP} }
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list