diff mbox

[v1,RFC,4/9] qemu-iotests: fix test 039

Message ID 1415875021-15248-5-git-send-email-maochuan@linux.vnet.ibm.com
State New
Headers show

Commit Message

Mao Chuan Li Nov. 13, 2014, 10:36 a.m. UTC
For successful execution of case 039, core dump need be
disabled. Just running "ulimit -c 0" command is not enough when the
/proc/sys/kernel/core_pattern indicates to pipe the dump to another
application. So we must erase the pattern in addition to the ulimit
command.

Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
---
 tests/qemu-iotests/039 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Max Reitz Nov. 13, 2014, 3:54 p.m. UTC | #1
On 2014-11-13 at 11:36, Mao Chuan Li wrote:
> For successful execution of case 039, core dump need be
> disabled. Just running "ulimit -c 0" command is not enough when the
> /proc/sys/kernel/core_pattern indicates to pipe the dump to another
> application. So we must erase the pattern in addition to the ulimit
> command.
>
> Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
> Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
> ---
>   tests/qemu-iotests/039 | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
> index 84c9167..bb9382a 100755
> --- a/tests/qemu-iotests/039
> +++ b/tests/qemu-iotests/039
> @@ -34,6 +34,7 @@ status=1	# failure is the default!
>   _cleanup()
>   {
>   	_cleanup_test_img
> +    _restore_core_pattern
>   }
>   trap "_cleanup; exit \$status" 0 1 2 3 15
>   
> @@ -41,6 +42,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>   . ./common.rc
>   . ./common.filter
>   
> +_erase_core_pattern
> +
>   _supported_fmt qcow2
>   _supported_proto file
>   _supported_os Linux

Do you really want the user to be root to execute the iotests?

Max
Michael Mueller Nov. 25, 2014, 6:07 p.m. UTC | #2
On Thu, 13 Nov 2014 18:36:56 +0800
Mao Chuan Li <maochuan@linux.vnet.ibm.com> wrote:

> For successful execution of case 039, core dump need be
> disabled. Just running "ulimit -c 0" command is not enough when the
> /proc/sys/kernel/core_pattern indicates to pipe the dump to another
> application. So we must erase the pattern in addition to the ulimit
> command.
> 
> Reviewed-by:   Michael Mueller <mimu@linux.vnet.ibm.com>
> Signed-off-by: Mao Chuan Li <maochuan@linux.vnet.ibm.com>
> ---
>  tests/qemu-iotests/039 | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
> index 84c9167..bb9382a 100755
> --- a/tests/qemu-iotests/039
> +++ b/tests/qemu-iotests/039
> @@ -34,6 +34,7 @@ status=1	# failure is the default!
>  _cleanup()
>  {
>  	_cleanup_test_img
> +    _restore_core_pattern
>  }
>  trap "_cleanup; exit \$status" 0 1 2 3 15
> 
> @@ -41,6 +42,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
>  . ./common.rc
>  . ./common.filter
> 
> +_erase_core_pattern
> +
>  _supported_fmt qcow2
>  _supported_proto file
>  _supported_os Linux

Mao,

you can skip this a and the previous (3/9) patch from the series, please have a look to the patch
Max has posted to solve the issue.

Thanks
Michael
diff mbox

Patch

diff --git a/tests/qemu-iotests/039 b/tests/qemu-iotests/039
index 84c9167..bb9382a 100755
--- a/tests/qemu-iotests/039
+++ b/tests/qemu-iotests/039
@@ -34,6 +34,7 @@  status=1	# failure is the default!
 _cleanup()
 {
 	_cleanup_test_img
+    _restore_core_pattern
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
@@ -41,6 +42,8 @@  trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
+_erase_core_pattern
+
 _supported_fmt qcow2
 _supported_proto file
 _supported_os Linux