Skip to contentSkip to conversation

PATCH : test_fs_bind testscript for busybox machines

LTP Suzuki Poulose 3 participants 4 messages Apr 26, 2010 – May 5, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

The test_fs_bind testscript hangs indefinitely when run on a machine where busybox applets are used.

The test hangs while trying to restore the mounts after a test run.

This happens because the "xargs" applet from busybox doesn't understand the --max-args=1 option. Thus, the mounts from the test are not removed and this goes on in a loop, indefinitely.

This could be avoided by using "-n" option which is supported by both the implementations of xargs.

Attached the patch here.

Thanks

Suzuki

testscripts/test_fs_bind.sh +1 -1
Index: ltp/testscripts/test_fs_bind.sh
===================================================================
@@ -238,7 +238,7 @@
 	# new mounts around and will never remove mounts outside the test
 	# directory
 	( while grep_proc_mounts ; do
-		grep_proc_mounts | awk '{print $2}' | xargs -r --max-args=1 umount -l
+		grep_proc_mounts | awk '{print $2}' | xargs -r -n 1 umount -l
 	done ) >& /dev/null
 	
 	# mount list and exit with 0

------------------------------------------------------------------------------

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

Looks fine.

committed as d9f3d25b9db35073c7104b759d526869d9867692

Thanks
-Rishi

[email protected]
.ibm.com
To
04/26/2010 12:06 Rishikesh K Rajak/India/IBM@IBMIN,
PM [email protected]
cc
Robert Paulsen <[email protected]>
Subject
PATCH : test_fs_bind testscript for busybox machines

Hi,

The test_fs_bind testscript hangs indefinitely when run on a machine where busybox applets are used.

The test hangs while trying to restore the mounts after a test run.

This happens because the "xargs" applet from busybox doesn't understand the --max-args=1 option. Thus, the mounts from the test are not removed and this goes on in a loop, indefinitely.

This could be avoided by using "-n" option which is supported by both the implementations of xargs.

Attached the patch here.

Thanks

Suzuki
(See attached file: fix_fs_bind_tests_for_busybox_machines.diff)

testscripts/test_fs_bind.sh +1 -1
Index: ltp/testscripts/test_fs_bind.sh
===================================================================
@@ -238,7 +238,7 @@
 	# new mounts around and will never remove mounts outside the test
 	# directory
 	( while grep_proc_mounts ; do
-		grep_proc_mounts | awk '{print $2}' | xargs -r --max-args=1 umount -l
+		grep_proc_mounts | awk '{print $2}' | xargs -r -n 1 umount -l
 	done ) >& /dev/null
 	
 	# mount list and exit with 0

------------------------------------------------------------------------------

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Acked-by
#2 lore raw
In reply to Suzuki Poulose
Quoted 16 lines · Suzuki Poulose

Hi,

The test_fs_bind testscript hangs indefinitely when run on a machine where busybox applets are used.

The test hangs while trying to restore the mounts after a test run.

This happens because the "xargs" applet from busybox doesn't understand the --max-args=1 option. Thus, the mounts from the test are not removed and this goes on in a loop, indefinitely.

This could be avoided by using "-n" option which is supported by both the implementations of xargs.

Quoted 5 lines

Attached the patch here.

Thanks

Suzuki

Just noticed this thread. Looks good, thanks!

Quoted 19 lines

Index: ltp/testscripts/test_fs_bind.sh
===================================================================

testscripts/test_fs_bind.sh +1 -2
@@ -238,7 +238,7 @@
 	# new mounts around and will never remove mounts outside the test
 	# directory
 	( while grep_proc_mounts ; do
-		grep_proc_mounts | awk '{print $2}' | xargs -r --max-args=1 umount -l
+		grep_proc_mounts | awk '{print $2}' | xargs -r -n 1 umount -l
 	done ) >& /dev/null
 
 	# mount list and exit with 0
 
------------------------------------------------------------------------------
Quoted 4 lines

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Acked-by Matt Helsley
#3 lore raw

Thanks matt. This has been already applied and released to April month LTP tarball.

Commit ID : d9f3d25b9db35073c7104b759d526869d9867692

Warm Regards

Rishi
Linux Tech Centre
IBM-ISTL, Manyata
Bangalore

Matt Helsley
<[email protected].
com> To
[email protected]
05/05/2010 04:05 cc
AM Rishikesh K Rajak/India/IBM@IBMIN,
[email protected]
Subject
Re: [LTP] PATCH : test_fs_bind testscript for busybox machines

Quoted 16 lines · Suzuki Poulose

Hi,

The test_fs_bind testscript hangs indefinitely when run on a machine where busybox applets are used.

The test hangs while trying to restore the mounts after a test run.

This happens because the "xargs" applet from busybox doesn't understand the --max-args=1 option. Thus, the mounts from the test are not removed and this goes on in a loop, indefinitely.

This could be avoided by using "-n" option which is supported by both the implementations of xargs.

Quoted 5 lines

Attached the patch here.

Thanks

Suzuki

Just noticed this thread. Looks good, thanks!

Quoted 6 lines

Index: ltp/testscripts/test_fs_bind.sh
===================================================================
--- ltp.orig/testscripts/test_fs_bind.sh 2009-12-22

03:28:25.000000000 +0000

Quoted 1 line

+++ ltp/testscripts/test_fs_bind.sh 2010-04-26

05:50:41.000000000 +0000

Review line 238

Quoted 2 lines
(quoted diff) +0 -0
@@ -238,7 +238,7 @@
 		 # new mounts around and will never remove mounts outside the

test

testscripts/test_fs_bind.sh

Quoted 3 lines
testscripts/test_fs_bind.sh +0 -1
 		 # directory
 		 ( while grep_proc_mounts ; do
-		 		 grep_proc_mounts | awk '{print $2}' | xargs -r

--max-args=1 umount -l

Review line 241

Quoted 1 line
(quoted diff) +1 -0
+		 		 grep_proc_mounts | awk '{print $2}' | xargs -r -n

1 umount -l

testscripts/test_fs_bind.sh line 244

Quoted 5 lines
testscripts/test_fs_bind.sh +0 -0
 		 done ) >& /dev/null
 
 		 # mount list and exit with 0

------------------------------------------------------------------------------

Quoted 4 lines

_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list