[Qemu-devel] [PATCH v1 5/8] contrib/run_risu.sh: allow appending of QEMU_FLAGS

Alex Bennée posted 8 patches 7 years, 8 months ago
[Qemu-devel] [PATCH v1 5/8] contrib/run_risu.sh: allow appending of QEMU_FLAGS
Posted by Alex Bennée 7 years, 8 months ago
Useful if you want to disable a feature for your run. For example:

  set -x QEMU_FLAGS "-cpu fp16=off"

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 contrib/run_risu.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/run_risu.sh b/contrib/run_risu.sh
index 439cd36..63649dd 100755
--- a/contrib/run_risu.sh
+++ b/contrib/run_risu.sh
@@ -13,6 +13,7 @@
 #
 # Usage:
 #   (optional) export QEMU=/path/to/qemu
+#   (optional) export QEMU_FLAGS="-cpu any,fp16=off"
 #   (optional) export RISU=/path/to/risu
 #   ./run_risu.sh  ./testcases.aarch64/*.bin
 
@@ -29,9 +30,10 @@ fi
 
 for f in $@; do
     t="$f.trace"
-    echo "Running $f against $t"
+    CMD="${QEMU} ${QEMU_FLAGS} ${RISU} $f -t $t"
+    echo "Running: ${CMD}"
     if [ -e $t ]; then
-        ${QEMU} ${RISU} $f -t $t
+        ${CMD}
         if [ $? == 0 ]; then
             passed=( "${passed[@]}" $f )
         else
-- 
2.15.1


Re: [Qemu-devel] [PATCH v1 5/8] contrib/run_risu.sh: allow appending of QEMU_FLAGS
Posted by Peter Maydell 7 years, 8 months ago
On 23 February 2018 at 15:46, Alex Bennée <alex.bennee@linaro.org> wrote:
> Useful if you want to disable a feature for your run. For example:
>
>   set -x QEMU_FLAGS "-cpu fp16=off"
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  contrib/run_risu.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/contrib/run_risu.sh b/contrib/run_risu.sh
> index 439cd36..63649dd 100755
> --- a/contrib/run_risu.sh
> +++ b/contrib/run_risu.sh
> @@ -13,6 +13,7 @@
>  #
>  # Usage:
>  #   (optional) export QEMU=/path/to/qemu
> +#   (optional) export QEMU_FLAGS="-cpu any,fp16=off"
>  #   (optional) export RISU=/path/to/risu
>  #   ./run_risu.sh  ./testcases.aarch64/*.bin
>
> @@ -29,9 +30,10 @@ fi
>
>  for f in $@; do
>      t="$f.trace"
> -    echo "Running $f against $t"
> +    CMD="${QEMU} ${QEMU_FLAGS} ${RISU} $f -t $t"
> +    echo "Running: ${CMD}"
>      if [ -e $t ]; then
> -        ${QEMU} ${RISU} $f -t $t
> +        ${CMD}

Well, you used to be able to do this by setting
QEMU="path/to/qemu -cpu whatever", but now you can't :-)

thanks
-- PMM