* [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup
@ 2013-11-11 1:51 Siva Padhy
2013-11-11 9:22 ` Jan Stancek
2013-11-13 16:39 ` chrubis
0 siblings, 2 replies; 3+ messages in thread
From: Siva Padhy @ 2013-11-11 1:51 UTC (permalink / raw)
To: ltp-list
The fs_bind testcases creates the mount directories for testing.
When the testcase exits, those directories were not properly unmounted.
The reason of the issues are:
1. Some directories were kept mounted, even after the cleanup() routine, as the unmount code is missing.
2. Some "umount" command execution fails, as they are dependent on some other mounted directories.
Error Report
------------
rbind/test02 1 TPASS : rbind/test02: PASSED
/kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test02 did not properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
rbind/test38 1 TPASS : rbind/test38: PASSED
/kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test38 did not properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
This patch add/reorder the unmount code to fix the above TWARN messages.
Modified-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Siva <siva.padhy@lge.com>
---
testcases/kernel/fs/fs_bind/rbind/test02 | 18 +++++++-----------
testcases/kernel/fs/fs_bind/rbind/test38 | 4 ++--
2 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/testcases/kernel/fs/fs_bind/rbind/test02 b/testcases/kernel/fs/fs_bind/rbind/test02
index 3ab7b6c..f68f691 100755
--- a/testcases/kernel/fs/fs_bind/rbind/test02
+++ b/testcases/kernel/fs/fs_bind/rbind/test02
@@ -1,5 +1,4 @@
#!/bin/bash
-
#
# Copyright (c) International Business Machines Corp., 2005
# Author: Avantika Mathur (mathurav@us.ibm.com)
@@ -38,9 +37,6 @@ trap 'ERR=$? ; ERR_MSG="caught error near: ${BASH_SOURCE[0]}:${FUNCNAME[0]}:${LI
while /bin/true ; do
# This loop is for error recovery purposes only
-
-
-
"${FS_BIND_ROOT}/bin/makedir" share parent1
"${FS_BIND_ROOT}/bin/makedir" priv parent2
"${FS_BIND_ROOT}/bin/makedir" share share1
@@ -74,10 +70,10 @@ if [ -n "${ERR_MSG}" ]; then
fi
trap '' ERR
{
+ umount parent2/child2/b
umount parent1/child1/a
- umount parent1/child1/b
- umount parent1/child1
- umount parent1/child1
+ umount parent2/child2
+ umount share1
umount parent1/child1
umount parent1/child1
umount share1
@@ -90,11 +86,11 @@ trap '' ERR
if [ $result -ne 0 ]
then
- tst_resm TFAIL "rbind/test02: FAILED: rbind: shared child to private parent."
- exit 1
+ tst_resm TFAIL "rbind/test02: FAILED: rbind: shared child to private parent."
+ exit 1
else
- tst_resm TPASS "rbind/test02: PASSED"
- exit 0
+ tst_resm TPASS "rbind/test02: PASSED"
+ exit 0
fi
diff --git a/testcases/kernel/fs/fs_bind/rbind/test38 b/testcases/kernel/fs/fs_bind/rbind/test38
index c9cf3e1..ae7477e 100755
--- a/testcases/kernel/fs/fs_bind/rbind/test38
+++ b/testcases/kernel/fs/fs_bind/rbind/test38
@@ -1,5 +1,4 @@
#!/bin/bash
-
#
# Copyright (c) International Business Machines Corp., 2005
# Author: Avantika Mathur (mathurav@us.ibm.com)
@@ -82,10 +81,11 @@ trap '' ERR
umount parent1/child1
umount parent2/child1
umount parent2/child1
- umount parent2/child2
umount parent2
umount share1
umount share1
+ umount share2
+ umount parent2/child2
rm -rf parent* share*
cleanup
--
1.7.9.5
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup
2013-11-11 1:51 [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup Siva Padhy
@ 2013-11-11 9:22 ` Jan Stancek
2013-11-13 16:39 ` chrubis
1 sibling, 0 replies; 3+ messages in thread
From: Jan Stancek @ 2013-11-11 9:22 UTC (permalink / raw)
To: Siva Padhy; +Cc: ltp-list
----- Original Message -----
> From: "Siva Padhy" <siva.padhy@lge.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Monday, 11 November, 2013 2:51:25 AM
> Subject: [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup
>
> The fs_bind testcases creates the mount directories for testing.
> When the testcase exits, those directories were not properly unmounted.
> The reason of the issues are:
>
> 1. Some directories were kept mounted, even after the cleanup() routine, as
> the unmount code is missing.
> 2. Some "umount" command execution fails, as they are dependent on some
> other mounted directories.
>
> Error Report
> ------------
> rbind/test02 1 TPASS : rbind/test02: PASSED
> /kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test02 did not
> properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
>
> rbind/test38 1 TPASS : rbind/test38: PASSED
> /kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test38 did not
> properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
>
> This patch add/reorder the unmount code to fix the above TWARN messages.
>
> Modified-by: Jan Stancek <jstancek@redhat.com>
> Signed-off-by: Siva <siva.padhy@lge.com>
> ---
Hi,
I think this is actually v3 now. Anyway, it looks good to me
and both testcases worked fine (no mounts left behind).
Regards,
Jan
> testcases/kernel/fs/fs_bind/rbind/test02 | 18 +++++++-----------
> testcases/kernel/fs/fs_bind/rbind/test38 | 4 ++--
> 2 files changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/testcases/kernel/fs/fs_bind/rbind/test02
> b/testcases/kernel/fs/fs_bind/rbind/test02
> index 3ab7b6c..f68f691 100755
> --- a/testcases/kernel/fs/fs_bind/rbind/test02
> +++ b/testcases/kernel/fs/fs_bind/rbind/test02
> @@ -1,5 +1,4 @@
> #!/bin/bash
> -
> #
> # Copyright (c) International Business Machines Corp., 2005
> # Author: Avantika Mathur (mathurav@us.ibm.com)
> @@ -38,9 +37,6 @@ trap 'ERR=$? ; ERR_MSG="caught error near:
> ${BASH_SOURCE[0]}:${FUNCNAME[0]}:${LI
> while /bin/true ; do
> # This loop is for error recovery purposes only
>
> -
> -
> -
> "${FS_BIND_ROOT}/bin/makedir" share parent1
> "${FS_BIND_ROOT}/bin/makedir" priv parent2
> "${FS_BIND_ROOT}/bin/makedir" share share1
> @@ -74,10 +70,10 @@ if [ -n "${ERR_MSG}" ]; then
> fi
> trap '' ERR
> {
> + umount parent2/child2/b
> umount parent1/child1/a
> - umount parent1/child1/b
> - umount parent1/child1
> - umount parent1/child1
> + umount parent2/child2
> + umount share1
> umount parent1/child1
> umount parent1/child1
> umount share1
> @@ -90,11 +86,11 @@ trap '' ERR
>
> if [ $result -ne 0 ]
> then
> - tst_resm TFAIL "rbind/test02: FAILED: rbind: shared child to private
> parent."
> - exit 1
> + tst_resm TFAIL "rbind/test02: FAILED: rbind: shared child to private
> parent."
> + exit 1
> else
> - tst_resm TPASS "rbind/test02: PASSED"
> - exit 0
> + tst_resm TPASS "rbind/test02: PASSED"
> + exit 0
> fi
>
>
> diff --git a/testcases/kernel/fs/fs_bind/rbind/test38
> b/testcases/kernel/fs/fs_bind/rbind/test38
> index c9cf3e1..ae7477e 100755
> --- a/testcases/kernel/fs/fs_bind/rbind/test38
> +++ b/testcases/kernel/fs/fs_bind/rbind/test38
> @@ -1,5 +1,4 @@
> #!/bin/bash
> -
> #
> # Copyright (c) International Business Machines Corp., 2005
> # Author: Avantika Mathur (mathurav@us.ibm.com)
> @@ -82,10 +81,11 @@ trap '' ERR
> umount parent1/child1
> umount parent2/child1
> umount parent2/child1
> - umount parent2/child2
> umount parent2
> umount share1
> umount share1
> + umount share2
> + umount parent2/child2
>
> rm -rf parent* share*
> cleanup
> --
> 1.7.9.5
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup
2013-11-11 1:51 [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup Siva Padhy
2013-11-11 9:22 ` Jan Stancek
@ 2013-11-13 16:39 ` chrubis
1 sibling, 0 replies; 3+ messages in thread
From: chrubis @ 2013-11-13 16:39 UTC (permalink / raw)
To: Siva Padhy; +Cc: ltp-list
Hi!
> The fs_bind testcases creates the mount directories for testing.
> When the testcase exits, those directories were not properly unmounted.
> The reason of the issues are:
>
> 1. Some directories were kept mounted, even after the cleanup() routine, as the unmount code is missing.
> 2. Some "umount" command execution fails, as they are dependent on some other mounted directories.
>
> Error Report
> ------------
> rbind/test02 1 TPASS : rbind/test02: PASSED
> /kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test02 did not properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
>
> rbind/test38 1 TPASS : rbind/test38: PASSED
> /kvt.new/ltp/testscripts/test_fs_bind.sh 0 TWARN : rbind/test38 did not properly clean up "/tmp/ltp-XXXX9qdYqG/sandbox"
>
> This patch add/reorder the unmount code to fix the above TWARN messages.
>
> Modified-by: Jan Stancek <jstancek@redhat.com>
> Signed-off-by: Siva <siva.padhy@lge.com>
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-13 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 1:51 [LTP] [PATCH V2] BindMounts: fix to properly unmount during cleanup Siva Padhy
2013-11-11 9:22 ` Jan Stancek
2013-11-13 16:39 ` chrubis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.