[2/4] qemu-iotests: remove forceful execution success from library files
diff mbox series

Message ID 20190927141728.7137-3-crosa@redhat.com
State New
Headers show
Series
  • iotests: trivial cleanups
Related show

Commit Message

Cleber Rosa Sept. 27, 2019, 2:17 p.m. UTC
Should not be necessary on files that are not executed standalone.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/qemu-iotests/common.config | 3 ---
 tests/qemu-iotests/common.filter | 3 ---
 tests/qemu-iotests/common.rc     | 3 ---
 3 files changed, 9 deletions(-)

Comments

Eric Blake Sept. 27, 2019, 4:47 p.m. UTC | #1
On 9/27/19 9:17 AM, Cleber Rosa wrote:
> Should not be necessary on files that are not executed standalone.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>   tests/qemu-iotests/common.config | 3 ---
>   tests/qemu-iotests/common.filter | 3 ---
>   tests/qemu-iotests/common.rc     | 3 ---
>   3 files changed, 9 deletions(-)
> 
> diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
> index 6956d38d4c..0a24d960ff 100644
> --- a/tests/qemu-iotests/common.config
> +++ b/tests/qemu-iotests/common.config
> @@ -34,6 +34,3 @@ _optstr_add()
>           echo "$2"
>       fi
>   }
> -
> -# make sure this script returns success
> -true

The exit status of the source command in the caller depends on the last 
command executed here.

However, you also have the point that if you delete this line, the last 
command executed is a function definition which is successful (for all 3 
files touched).  So there is no behavior change in dropping this line.

Reviewed-by: Eric Blake <eblake@redhat.com>

Patch
diff mbox series

diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 6956d38d4c..0a24d960ff 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -34,6 +34,3 @@  _optstr_add()
         echo "$2"
     fi
 }
-
-# make sure this script returns success
-true
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 043c62c10c..55db15865a 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -221,6 +221,3 @@  _filter_qmp_empty_return()
 {
     grep -v '{"return": {}}'
 }
-
-# make sure this script returns success
-true
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 19bddacf11..d7e6456086 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -600,6 +600,3 @@  _require_drivers()
         fi
     done
 }
-
-# make sure this script returns success
-true