All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/10] qemu-binfmt-conf.sh
@ 2020-03-09 19:12 Unai Martinez-Corral
  2020-03-09 19:18 ` [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency Unai Martinez-Corral
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Hi,

This series reworks qemu-binfmt-conf.sh:

* Argument <CPU> from option '--systemd' is generalized to <TARGETS>, and it is
  accepted for any mode (default, debian or systemd). It can be a single target
  arch or a list of them.
* Option '-r|--clear' is added, which allows to remove an already registered
  target interpreter or a list of them. The implementation is functional but
  partial. Please, see the corresponding commit.
* Option '-t|--test' is added, which allows to execute the CHECK according
  to the provided arguments, but no interpreter is configured.
* Support to set options through environment variables: QEMU_TARGETS, QEMU_PATH,
  QEMU_SUFFIX, QEMU_PERSISTENT, QEMU_CREDENTIAL, QEMU_CLEAR and QEMU_TEST.

The following changes are not backward compatible:

* Option '--persistent' no longer requires/accepts an argument.
* Option '--credential' no longer requires/accepts an argument.
* Option '--systemd' no longer requires/accepts an argument.
* Option '--qemu-path' is renamed to '--path'.
* Option '--qemu-suffix' is renamed to '--suffix'.

The functionality of all of them is untouched. Changes are related to syntax only.

v10

* Split style related commit

v9

* Make style coherent with the dominant pattern

v8:

* Fix typos and address review comments

v7:

* Check that a interpreter exists before trying to remove it.

v6:

* Don't need to use "find".
* Put the ";;" at the same position.
* Set BINFMT_CLEAR to ':', to allow --test to work with --clear.
* Do not show DEBIANDIR and SYSTEMDDIR in the Env-variable column.

Based on:

* [PATCH v5 0/10] qemu-binfmt-conf.sh
   * should have been [PATCH v5 0/9] qemu-binfmt-conf.sh
* [PATCH v4 0/10] qemu-binfmt-conf.sh
* [PATCH v3 0/10] qemu-binfmt-conf.sh
* [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg)
* [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg)
* scripts/qemu-binfmt-conf.sh: allow clearing of entries

Regards

Unai Martinez-Corral (10):
      qemu-binfmt-conf.sh: enforce style consistency
      qemu-binfmt-conf.sh: enforce safe tests
      qemu-binfmt-conf.sh: make opts -p and -c boolean
      qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
      qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
      qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
      qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
      qemu-binfmt-conf.sh: generalize <CPU> to positional TARGETS
      qemu-binfmt-conf.sh: add option --clear
      qemu-binfmt-conf.sh: add --test

scripts/qemu-binfmt-conf.sh | 221
1 file changed, 138 insertions(+), 83 deletions(-i)


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
@ 2020-03-09 19:18 ` Unai Martinez-Corral
  2020-03-09 19:30   ` Eric Blake
  2020-03-09 19:19 ` [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests Unai Martinez-Corral
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:18 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Spaces are removed before '; then', for consistency with other scripts
in the project.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 9f1580a91c..c728443ba2 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -215,7 +215,7 @@ EOF
 }
 
 qemu_check_access() {
-    if [ ! -w "$1" ] ; then
+    if [ ! -w "$1" ]; then
         echo "ERROR: cannot write to $1" 1>&2
         exit 1
     fi
@@ -224,12 +224,12 @@ qemu_check_access() {
 qemu_check_bintfmt_misc() {
     # load the binfmt_misc module
     if [ ! -d /proc/sys/fs/binfmt_misc ]; then
-      if ! /sbin/modprobe binfmt_misc ; then
+      if ! /sbin/modprobe binfmt_misc; then
           exit 1
       fi
     fi
     if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
-      if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ; then
+      if ! mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc; then
           exit 1
       fi
     fi
@@ -242,16 +242,16 @@ installed_dpkg() {
 }
 
 qemu_check_debian() {
-    if [ ! -e /etc/debian_version ] ; then
+    if [ ! -e /etc/debian_version ]; then
         echo "WARNING: your system is not a Debian based distro" 1>&2
-    elif ! installed_dpkg binfmt-support ; then
+    elif ! installed_dpkg binfmt-support; then
         echo "WARNING: package binfmt-support is needed" 1>&2
     fi
     qemu_check_access "$EXPORTDIR"
 }
 
 qemu_check_systemd() {
-    if ! systemctl -q is-enabled systemd-binfmt.service ; then
+    if ! systemctl -q is-enabled systemd-binfmt.service; then
         echo "WARNING: systemd-binfmt.service is missing or disabled" 1>&2
     fi
     qemu_check_access "$EXPORTDIR"
@@ -259,10 +259,10 @@ qemu_check_systemd() {
 
 qemu_generate_register() {
     flags=""
-    if [ "$CREDENTIAL" = "yes" ] ; then
+    if [ "$CREDENTIAL" = "yes" ]; then
         flags="OC"
     fi
-    if [ "$PERSISTENT" = "yes" ] ; then
+    if [ "$PERSISTENT" = "yes" ]; then
         flags="${flags}F"
     fi
 
@@ -295,23 +295,23 @@ qemu_set_binfmts() {
 
     # register the interpreter for each cpu except for the native one
 
-    for cpu in ${qemu_target_list} ; do
+    for cpu in ${qemu_target_list}; do
         magic=$(eval echo \$${cpu}_magic)
         mask=$(eval echo \$${cpu}_mask)
         family=$(eval echo \$${cpu}_family)
 
-        if [ "$magic" = "" ] || [ "$mask" = "" ] || [ "$family" = "" ] ; then
+        if [ "$magic" = "" ] || [ "$mask" = "" ] || [ "$family" = "" ]; then
             echo "INTERNAL ERROR: unknown cpu $cpu" 1>&2
             continue
         fi
 
         qemu="$QEMU_PATH/qemu-$cpu"
-        if [ "$cpu" = "i486" ] ; then
+        if [ "$cpu" = "i486" ]; then
             qemu="$QEMU_PATH/qemu-i386"
         fi
 
         qemu="$qemu$QEMU_SUFFIX"
-        if [ "$host_family" != "$family" ] ; then
+        if [ "$host_family" != "$family" ]; then
             $BINFMT_SET
         fi
     done
@@ -331,7 +331,7 @@ QEMU_SUFFIX=""
 options=$(getopt -o ds:Q:S:e:hc:p: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent: -- "$@")
 eval set -- "$options"
 
-while true ; do
+while true; do
     case "$1" in
     -d|--debian)
         CHECK=qemu_check_debian
@@ -344,14 +344,14 @@ while true ; do
         EXPORTDIR=${EXPORTDIR:-$SYSTEMDDIR}
         shift
         # check given cpu is in the supported CPU list
-        if [ "$1" != "ALL" ] ; then
-            for cpu in ${qemu_target_list} ; do
-                if [ "$cpu" = "$1" ] ; then
+        if [ "$1" != "ALL" ]; then
+            for cpu in ${qemu_target_list}; do
+                if [ "$cpu" = "$1" ]; then
                     break
                 fi
             done
 
-            if [ "$cpu" = "$1" ] ; then
+            if [ "$cpu" = "$1" ]; then
                 qemu_target_list="$1"
             else
                 echo "ERROR: unknown CPU \"$1\"" 1>&2
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
  2020-03-09 19:18 ` [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency Unai Martinez-Corral
@ 2020-03-09 19:19 ` Unai Martinez-Corral
  2020-03-09 19:31   ` Eric Blake
  2020-03-10  8:28   ` Laurent Vivier
  2020-03-09 19:19 ` [PATCH v10 03/10] qemu-binfmt-conf.sh: make opts -p and -c boolean Unai Martinez-Corral
                   ` (9 subsequent siblings)
  11 siblings, 2 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

All the tests are prefixed with 'x', in order to avoid risky comparisons
(i.e. a user deliberately trying to provoke a syntax error).

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index c728443ba2..98401f4e7c 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -259,10 +259,10 @@ qemu_check_systemd() {
 
 qemu_generate_register() {
     flags=""
-    if [ "$CREDENTIAL" = "yes" ]; then
+    if [ "x$CREDENTIAL" = "xyes" ]; then
         flags="OC"
     fi
-    if [ "$PERSISTENT" = "yes" ]; then
+    if [ "x$PERSISTENT" = "xyes" ]; then
         flags="${flags}F"
     fi
 
@@ -300,18 +300,18 @@ qemu_set_binfmts() {
         mask=$(eval echo \$${cpu}_mask)
         family=$(eval echo \$${cpu}_family)
 
-        if [ "$magic" = "" ] || [ "$mask" = "" ] || [ "$family" = "" ]; then
+        if [ "x$magic" = "x" ] || [ "x$mask" = "x" ] || [ "x$family" = "x" ]; then
             echo "INTERNAL ERROR: unknown cpu $cpu" 1>&2
             continue
         fi
 
         qemu="$QEMU_PATH/qemu-$cpu"
-        if [ "$cpu" = "i486" ]; then
+        if [ "x$cpu" = "xi486" ]; then
             qemu="$QEMU_PATH/qemu-i386"
         fi
 
         qemu="$qemu$QEMU_SUFFIX"
-        if [ "$host_family" != "$family" ]; then
+        if [ "x$host_family" != "x$family" ]; then
             $BINFMT_SET
         fi
     done
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 03/10] qemu-binfmt-conf.sh: make opts -p and -c boolean
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
  2020-03-09 19:18 ` [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency Unai Martinez-Corral
  2020-03-09 19:19 ` [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests Unai Martinez-Corral
@ 2020-03-09 19:19 ` Unai Martinez-Corral
  2020-03-09 19:20 ` [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT Unai Martinez-Corral
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

This patch breaks backward compatibility.

Both '--persistent' and '--credential' default to 'no'. Hence, '-p no'
or '-c no' are redundant. Overall, accepting an argument might be
misleading because options are, indeed, boolean. This patch makes both
options boolean in getopt, so if any of them is provided the corresponding
variable is set to true.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 98401f4e7c..285ce528d1 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -172,8 +172,8 @@ qemu_get_family() {
 usage() {
     cat <<EOF
 Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
-                           [--help][--credential yes|no][--exportdir PATH]
-                           [--persistent yes|no][--qemu-suffix SUFFIX]
+                           [--help][--credential][--exportdir PATH]
+                           [--persistent][--qemu-suffix SUFFIX]
 
        Configure binfmt_misc to use qemu interpreter
 
@@ -188,9 +188,9 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
                       file for all known cpus
        --exportdir:   define where to write configuration files
                       (default: $SYSTEMDDIR or $DEBIANDIR)
-       --credential:  if yes, credential and security tokens are
+       --credential:  if present, credential and security tokens are
                       calculated according to the binary to interpret
-       --persistent:  if yes, the interpreter is loaded when binfmt is
+       --persistent:  if present, the interpreter is loaded when binfmt is
                       configured and remains in memory. All future uses
                       are cloned from the open file.
 
@@ -328,7 +328,7 @@ CREDENTIAL=no
 PERSISTENT=no
 QEMU_SUFFIX=""
 
-options=$(getopt -o ds:Q:S:e:hc:p: -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential:,persistent: -- "$@")
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
 while true; do
@@ -377,12 +377,10 @@ while true; do
         exit 1
         ;;
     -c|--credential)
-        shift
-        CREDENTIAL="$1"
+        CREDENTIAL="yes"
         ;;
     -p|--persistent)
-        shift
-        PERSISTENT="$1"
+        PERSISTENT="yes"
         ;;
     *)
         break
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (2 preceding siblings ...)
  2020-03-09 19:19 ` [PATCH v10 03/10] qemu-binfmt-conf.sh: make opts -p and -c boolean Unai Martinez-Corral
@ 2020-03-09 19:20 ` Unai Martinez-Corral
  2020-03-10  8:20   ` Laurent Vivier
  2020-03-09 19:20 ` [PATCH v10 05/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-* Unai Martinez-Corral
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Allow to set options '--persistent' and/or '--credential' through
environment variables. If not defined, defaults are used ('no').
Anyway, command-line arguments have priority over environment variables.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 285ce528d1..0c28db5ca4 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -190,9 +190,11 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
                       (default: $SYSTEMDDIR or $DEBIANDIR)
        --credential:  if present, credential and security tokens are
                       calculated according to the binary to interpret
+                      (QEMU_CREDENTIAL=yes)
        --persistent:  if present, the interpreter is loaded when binfmt is
                       configured and remains in memory. All future uses
                       are cloned from the open file.
+                      (QEMU_PERSISTENT=yes)
 
     To import templates with update-binfmts, use :
 
@@ -259,10 +261,10 @@ qemu_check_systemd() {
 
 qemu_generate_register() {
     flags=""
-    if [ "x$CREDENTIAL" = "xyes" ]; then
+    if [ "x$QEMU_CREDENTIAL" = "xyes" ]; then
         flags="OC"
     fi
-    if [ "x$PERSISTENT" = "xyes" ]; then
+    if [ "x$QEMU_PERSISTENT" = "xyes" ]; then
         flags="${flags}F"
     fi
 
@@ -285,7 +287,7 @@ package qemu-$cpu
 interpreter $qemu
 magic $magic
 mask $mask
-credential $CREDENTIAL
+credential $QEMU_CREDENTIAL
 EOF
 }
 
@@ -324,8 +326,10 @@ SYSTEMDDIR="/etc/binfmt.d"
 DEBIANDIR="/usr/share/binfmts"
 
 QEMU_PATH=/usr/local/bin
-CREDENTIAL=no
-PERSISTENT=no
+
+QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
+QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
+
 QEMU_SUFFIX=""
 
 options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")
@@ -377,10 +381,10 @@ while true; do
         exit 1
         ;;
     -c|--credential)
-        CREDENTIAL="yes"
+        QEMU_CREDENTIAL="yes"
         ;;
     -p|--persistent)
-        PERSISTENT="yes"
+        QEMU_PERSISTENT="yes"
         ;;
     *)
         break
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 05/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (3 preceding siblings ...)
  2020-03-09 19:20 ` [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT Unai Martinez-Corral
@ 2020-03-09 19:20 ` Unai Martinez-Corral
  2020-03-09 19:22 ` [PATCH v10 06/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options Unai Martinez-Corral
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 63 +++++++++++++++++++------------------
 1 file changed, 32 insertions(+), 31 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 0c28db5ca4..870815fb22 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -171,47 +171,48 @@ qemu_get_family() {
 
 usage() {
     cat <<EOF
-Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
-                           [--help][--credential][--exportdir PATH]
-                           [--persistent][--qemu-suffix SUFFIX]
+Usage: qemu-binfmt-conf.sh [options]
 
-       Configure binfmt_misc to use qemu interpreter
+Configure binfmt_misc to use qemu interpreter
 
-       --help:        display this usage
-       --qemu-path:   set path to qemu interpreter ($QEMU_PATH)
-       --qemu-suffix: add a suffix to the default interpreter name
-       --debian:      don't write into /proc,
-                      instead generate update-binfmts templates
-       --systemd:     don't write into /proc,
-                      instead generate file for systemd-binfmt.service
-                      for the given CPU. If CPU is "ALL", generate a
-                      file for all known cpus
-       --exportdir:   define where to write configuration files
-                      (default: $SYSTEMDDIR or $DEBIANDIR)
-       --credential:  if present, credential and security tokens are
-                      calculated according to the binary to interpret
-                      (QEMU_CREDENTIAL=yes)
-       --persistent:  if present, the interpreter is loaded when binfmt is
-                      configured and remains in memory. All future uses
-                      are cloned from the open file.
-                      (QEMU_PERSISTENT=yes)
+Options and associated environment variables:
 
-    To import templates with update-binfmts, use :
+Argument             Env-variable     Description
+-h|--help                             display this usage
+-Q|--qemu-path PATH  QEMU_PATH        set path to qemu interpreter
+-F|--qemu-suffix SUFFIX               add a suffix to the default interpreter name
+-p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future
+                                      uses are cloned from the open file.
+-c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according
+                                      to the binary to interpret
+-e|--exportdir PATH                   define where to write configuration files
+                                      (default: $SYSTEMDDIR or $DEBIANDIR)
+-s|--systemd CPU                      don't write into /proc, generate file for
+                                      systemd-binfmt.service for the given CPU; if CPU is "ALL",
+                                      generate a file for all known cpus.
+-d|--debian                           don't write into /proc, generate update-binfmts templates
 
-        sudo update-binfmts --importdir ${EXPORTDIR:-$DEBIANDIR} --import qemu-CPU
+Defaults:
+QEMU_PATH=$QEMU_PATH
+QEMU_PERSISTENT=$QEMU_PERSISTENT
+QEMU_CREDENTIAL=$QEMU_CREDENTIAL
 
-    To remove interpreter, use :
+To import templates with update-binfmts, use :
 
-        sudo update-binfmts --package qemu-CPU --remove qemu-CPU $QEMU_PATH
+    sudo update-binfmts --importdir ${EXPORTDIR:-$DEBIANDIR} --import qemu-CPU
 
-    With systemd, binfmt files are loaded by systemd-binfmt.service
+To remove interpreter, use :
 
-    The environment variable HOST_ARCH allows to override 'uname' to generate
-    configuration files for a different architecture than the current one.
+    sudo update-binfmts --package qemu-CPU --remove qemu-CPU $QEMU_PATH
 
-    where CPU is one of:
+With systemd, binfmt files are loaded by systemd-binfmt.service
 
-        $qemu_target_list
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for a
+different architecture than the current one.
+
+where CPU is one of:
+
+    $qemu_target_list
 
 EOF
 }
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 06/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (4 preceding siblings ...)
  2020-03-09 19:20 ` [PATCH v10 05/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-* Unai Martinez-Corral
@ 2020-03-09 19:22 ` Unai Martinez-Corral
  2020-03-09 19:22 ` [PATCH v10 07/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX Unai Martinez-Corral
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

This breaks backward compatibility.

Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is
not present in other option names ('debian', 'systemd', 'persistent',
'credential'...). In order to keep consistency, the prefix is removed.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 870815fb22..5cc6db6aed 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -171,6 +171,7 @@ qemu_get_family() {
 
 usage() {
     cat <<EOF
+
 Usage: qemu-binfmt-conf.sh [options]
 
 Configure binfmt_misc to use qemu interpreter
@@ -179,8 +180,8 @@ Options and associated environment variables:
 
 Argument             Env-variable     Description
 -h|--help                             display this usage
--Q|--qemu-path PATH  QEMU_PATH        set path to qemu interpreter
--F|--qemu-suffix SUFFIX               add a suffix to the default interpreter name
+-Q|--path PATH       QEMU_PATH        set path to qemu interpreter(s)
+-F|--suffix SUFFIX                    add a suffix to the default interpreter name
 -p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future
                                       uses are cloned from the open file.
 -c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according
@@ -333,7 +334,7 @@ QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
 
 QEMU_SUFFIX=""
 
-options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
 while true; do
@@ -365,11 +366,11 @@ while true; do
             fi
         fi
         ;;
-    -Q|--qemu-path)
+    -Q|--path)
         shift
         QEMU_PATH="$1"
         ;;
-    -F|--qemu-suffix)
+    -F|--suffix)
         shift
         QEMU_SUFFIX="$1"
         ;;
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 07/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (5 preceding siblings ...)
  2020-03-09 19:22 ` [PATCH v10 06/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options Unai Martinez-Corral
@ 2020-03-09 19:22 ` Unai Martinez-Corral
  2020-03-09 19:23 ` [PATCH v10 08/10] qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS] Unai Martinez-Corral
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:22 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Allow to set 'path' or 'suffix' through environment variables,
consistently with 'persistent' and 'credential'.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 5cc6db6aed..b1a54aa470 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -181,7 +181,7 @@ Options and associated environment variables:
 Argument             Env-variable     Description
 -h|--help                             display this usage
 -Q|--path PATH       QEMU_PATH        set path to qemu interpreter(s)
--F|--suffix SUFFIX                    add a suffix to the default interpreter name
+-F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name
 -p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future
                                       uses are cloned from the open file.
 -c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according
@@ -195,6 +195,7 @@ Argument             Env-variable     Description
 
 Defaults:
 QEMU_PATH=$QEMU_PATH
+QEMU_SUFFIX=$QEMU_SUFFIX
 QEMU_PERSISTENT=$QEMU_PERSISTENT
 QEMU_CREDENTIAL=$QEMU_CREDENTIAL
 
@@ -327,13 +328,11 @@ BINFMT_SET=qemu_register_interpreter
 SYSTEMDDIR="/etc/binfmt.d"
 DEBIANDIR="/usr/share/binfmts"
 
-QEMU_PATH=/usr/local/bin
-
+QEMU_PATH="${QEMU_PATH:-/usr/local/bin}"
+QEMU_SUFFIX="${QEMU_SUFFIX:-}"
 QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
 QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
 
-QEMU_SUFFIX=""
-
 options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 08/10] qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS]
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (6 preceding siblings ...)
  2020-03-09 19:22 ` [PATCH v10 07/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX Unai Martinez-Corral
@ 2020-03-09 19:23 ` Unai Martinez-Corral
  2020-03-09 19:23 ` [PATCH v10 09/10] qemu-binfmt-conf.sh: add option --clear Unai Martinez-Corral
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

This breaks brackward compatibility.

Option '--systemd CPU' allows to register binfmt interpreters for a
single target architecture or for 'ALL' (of them). This patch
generalizes the approach to support it in any mode (default, '--debian'
or '--systemd'). To do so, option 'systemd' is changed to be boolean
(no args). Then, all the positional arguments are considered to be a
list of target architectures.

If no positional arguments are provided, all of the architectures in
qemu_target_list are registered. Conversely, argument value 'NONE'
allows to make a 'dry run' of the script. I.e., checks are executed
according to the mode, but no interpreter is registered.

Support QEMU_TARGETS environment variable, consistently with 'path',
'suffix', 'persistent' and 'credential', The supported formats are
the same as for positional arguments, which have priority. If both
the variable and the list of positional arguments are empty, defaults
to qemu_target_list.

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 80 +++++++++++++++++++++----------------
 1 file changed, 46 insertions(+), 34 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index b1a54aa470..538ef4aec0 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -6,6 +6,28 @@ ppc ppc64 ppc64le m68k mips mipsel mipsn32 mipsn32el mips64 mips64el \
 sh4 sh4eb s390x aarch64 aarch64_be hppa riscv32 riscv64 xtensa xtensaeb \
 microblaze microblazeel or1k x86_64"
 
+# check if given TARGETS is/are in the supported target list
+qemu_check_target_list() {
+    if [ $# -eq 0 ]; then
+      checked_target_list="$qemu_target_list"
+      return
+    fi
+    unset checked_target_list
+    for target; do
+        for cpu in $qemu_target_list; do
+            if [ "x$cpu" = "x$target" ]; then
+                checked_target_list="$checked_target_list $target"
+                break
+            fi
+        done
+        if [ "x$cpu" != "x$target" ]; then
+            echo "ERROR: unknown CPU \"$target\"" 1>&2
+            usage
+            exit 1
+        fi
+    done
+}
+
 i386_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00'
 i386_mask='\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
 i386_family=i386
@@ -171,14 +193,16 @@ qemu_get_family() {
 
 usage() {
     cat <<EOF
+Usage: qemu-binfmt-conf.sh [options] [TARGETS]
 
-Usage: qemu-binfmt-conf.sh [options]
-
-Configure binfmt_misc to use qemu interpreter
+Configure binfmt_misc to use qemu interpreter for the given TARGETS.
 
 Options and associated environment variables:
 
 Argument             Env-variable     Description
+TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);
+                                      if empty, configure all known targets;
+                                      if 'NONE', no interpreter is configured.
 -h|--help                             display this usage
 -Q|--path PATH       QEMU_PATH        set path to qemu interpreter(s)
 -F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name
@@ -188,12 +212,12 @@ Argument             Env-variable     Description
                                       to the binary to interpret
 -e|--exportdir PATH                   define where to write configuration files
                                       (default: $SYSTEMDDIR or $DEBIANDIR)
--s|--systemd CPU                      don't write into /proc, generate file for
-                                      systemd-binfmt.service for the given CPU; if CPU is "ALL",
-                                      generate a file for all known cpus.
+-s|--systemd                          don't write into /proc, generate file(s) for
+                                      systemd-binfmt.service;
 -d|--debian                           don't write into /proc, generate update-binfmts templates
 
 Defaults:
+QEMU_TARGETS=$QEMU_TARGETS
 QEMU_PATH=$QEMU_PATH
 QEMU_SUFFIX=$QEMU_SUFFIX
 QEMU_PERSISTENT=$QEMU_PERSISTENT
@@ -207,14 +231,10 @@ To remove interpreter, use :
 
     sudo update-binfmts --package qemu-CPU --remove qemu-CPU $QEMU_PATH
 
-With systemd, binfmt files are loaded by systemd-binfmt.service
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for
+a different architecture than the current one.
 
-The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for a
-different architecture than the current one.
-
-where CPU is one of:
-
-    $qemu_target_list
+QEMU target list: $qemu_target_list
 
 EOF
 }
@@ -298,9 +318,15 @@ qemu_set_binfmts() {
     # probe cpu type
     host_family=$(qemu_get_family)
 
-    # register the interpreter for each cpu except for the native one
+    # reduce the list of target interpreters to those given in the CLI
+    targets=${@:-$QEMU_TARGET}
+    if [ "x$targets" = "xNONE" ]; then
+      return
+    fi
+    qemu_check_target_list $targets
 
-    for cpu in ${qemu_target_list}; do
+    # register the interpreter for each target except for the native one
+    for cpu in $checked_target_list; do
         magic=$(eval echo \$${cpu}_magic)
         mask=$(eval echo \$${cpu}_mask)
         family=$(eval echo \$${cpu}_family)
@@ -328,12 +354,13 @@ BINFMT_SET=qemu_register_interpreter
 SYSTEMDDIR="/etc/binfmt.d"
 DEBIANDIR="/usr/share/binfmts"
 
+QEMU_TARGETS="${QEMU_TARGETS:-}"
 QEMU_PATH="${QEMU_PATH:-/usr/local/bin}"
 QEMU_SUFFIX="${QEMU_SUFFIX:-}"
 QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
 QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
 
-options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
+options=$(getopt -o dsQ:S:e:hcp -l debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
 while true; do
@@ -347,23 +374,6 @@ while true; do
         CHECK=qemu_check_systemd
         BINFMT_SET=qemu_generate_systemd
         EXPORTDIR=${EXPORTDIR:-$SYSTEMDDIR}
-        shift
-        # check given cpu is in the supported CPU list
-        if [ "$1" != "ALL" ]; then
-            for cpu in ${qemu_target_list}; do
-                if [ "$cpu" = "$1" ]; then
-                    break
-                fi
-            done
-
-            if [ "$cpu" = "$1" ]; then
-                qemu_target_list="$1"
-            else
-                echo "ERROR: unknown CPU \"$1\"" 1>&2
-                usage
-                exit 1
-            fi
-        fi
         ;;
     -Q|--path)
         shift
@@ -394,5 +404,7 @@ while true; do
     shift
 done
 
+shift
+
 $CHECK
-qemu_set_binfmts
+qemu_set_binfmts "$@"
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 09/10] qemu-binfmt-conf.sh: add option --clear
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (7 preceding siblings ...)
  2020-03-09 19:23 ` [PATCH v10 08/10] qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS] Unai Martinez-Corral
@ 2020-03-09 19:23 ` Unai Martinez-Corral
  2020-03-09 19:24 ` [PATCH v10 10/10] qemu-binfmt-conf.sh: add --test Unai Martinez-Corral
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

This is a partial implementation.

Allows to remove a single or a list of already registered binfmt
interpreters. Valid values are those in qemu_target_list.
If TARGETS is empty, all the existing 'qemu-*' interpreters are
removed.

This is partial because 'debian' and 'systemd' configurations are not
supported. The script will exit with error 'option clear not
implemented for this mode yet'.

Removal is done by printing '-1' as explained at:
https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 538ef4aec0..55224a68e1 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -201,7 +201,7 @@ Options and associated environment variables:
 
 Argument             Env-variable     Description
 TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);
-                                      if empty, configure all known targets;
+                                      if empty, configure/clear all known targets;
                                       if 'NONE', no interpreter is configured.
 -h|--help                             display this usage
 -Q|--path PATH       QEMU_PATH        set path to qemu interpreter(s)
@@ -210,6 +210,8 @@ TARGETS              QEMU_TARGETS     A single arch name or a list of them (see
                                       uses are cloned from the open file.
 -c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according
                                       to the binary to interpret
+-r|--clear           QEMU_CLEAR       (yes) remove registered interpreters for target TARGETS;
+                                      then exit.
 -e|--exportdir PATH                   define where to write configuration files
                                       (default: $SYSTEMDDIR or $DEBIANDIR)
 -s|--systemd                          don't write into /proc, generate file(s) for
@@ -222,6 +224,7 @@ QEMU_PATH=$QEMU_PATH
 QEMU_SUFFIX=$QEMU_SUFFIX
 QEMU_PERSISTENT=$QEMU_PERSISTENT
 QEMU_CREDENTIAL=$QEMU_CREDENTIAL
+QEMU_CLEAR=$QEMU_CLEAR
 
 To import templates with update-binfmts, use :
 
@@ -348,8 +351,22 @@ qemu_set_binfmts() {
     done
 }
 
+qemu_clear_notimplemented() {
+    echo "ERROR: option clear not implemented for this mode yet" 1>&2
+    usage
+    exit 1
+}
+
+qemu_clear_interpreter() {
+    p="/proc/sys/fs/binfmt_misc/$1"
+    if [ -f "$p" ]; then
+      printf %s -1 > "$p"
+    fi
+}
+
 CHECK=qemu_check_bintfmt_misc
 BINFMT_SET=qemu_register_interpreter
+BINFMT_CLEAR=qemu_clear_interpreter
 
 SYSTEMDDIR="/etc/binfmt.d"
 DEBIANDIR="/usr/share/binfmts"
@@ -359,20 +376,26 @@ QEMU_PATH="${QEMU_PATH:-/usr/local/bin}"
 QEMU_SUFFIX="${QEMU_SUFFIX:-}"
 QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
 QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
+QEMU_CLEAR="${QEMU_CLEAR:-no}"
 
-options=$(getopt -o dsQ:S:e:hcp -l debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
+options=$(getopt -o rdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
 while true; do
     case "$1" in
+    -r|--clear)
+        QEMU_CLEAR="yes"
+        ;;
     -d|--debian)
         CHECK=qemu_check_debian
         BINFMT_SET=qemu_generate_debian
+        BINFMT_CLEAR=qemu_clear_notimplemented
         EXPORTDIR=${EXPORTDIR:-$DEBIANDIR}
         ;;
     -s|--systemd)
         CHECK=qemu_check_systemd
         BINFMT_SET=qemu_generate_systemd
+        BINFMT_CLEAR=qemu_clear_notimplemented
         EXPORTDIR=${EXPORTDIR:-$SYSTEMDDIR}
         ;;
     -Q|--path)
@@ -407,4 +430,13 @@ done
 shift
 
 $CHECK
+
+if [ "x$QEMU_CLEAR" = "xyes" ]; then
+    qemu_check_target_list "$@"
+    for t in $checked_target_list; do
+        $BINFMT_CLEAR "qemu-$t"
+    done
+    exit
+fi
+
 qemu_set_binfmts "$@"
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v10 10/10] qemu-binfmt-conf.sh: add --test
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (8 preceding siblings ...)
  2020-03-09 19:23 ` [PATCH v10 09/10] qemu-binfmt-conf.sh: add option --clear Unai Martinez-Corral
@ 2020-03-09 19:24 ` Unai Martinez-Corral
  2020-03-09 19:58 ` [PATCH v10 0/10] qemu-binfmt-conf.sh no-reply
  2020-03-09 20:05 ` no-reply
  11 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez-Corral @ 2020-03-09 19:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, laurent

Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index 55224a68e1..21c8f63916 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -201,8 +201,7 @@ Options and associated environment variables:
 
 Argument             Env-variable     Description
 TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);
-                                      if empty, configure/clear all known targets;
-                                      if 'NONE', no interpreter is configured.
+                                      if empty, configure/clear all known targets.
 -h|--help                             display this usage
 -Q|--path PATH       QEMU_PATH        set path to qemu interpreter(s)
 -F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name
@@ -212,6 +211,8 @@ TARGETS              QEMU_TARGETS     A single arch name or a list of them (see
                                       to the binary to interpret
 -r|--clear           QEMU_CLEAR       (yes) remove registered interpreters for target TARGETS;
                                       then exit.
+-t|--test            QEMU_TEST        (yes) test the setup with the provided arguments, but do not
+                                      configure any of the interpreters.
 -e|--exportdir PATH                   define where to write configuration files
                                       (default: $SYSTEMDDIR or $DEBIANDIR)
 -s|--systemd                          don't write into /proc, generate file(s) for
@@ -225,6 +226,7 @@ QEMU_SUFFIX=$QEMU_SUFFIX
 QEMU_PERSISTENT=$QEMU_PERSISTENT
 QEMU_CREDENTIAL=$QEMU_CREDENTIAL
 QEMU_CLEAR=$QEMU_CLEAR
+QEMU_TEST=$QEMU_TEST
 
 To import templates with update-binfmts, use :
 
@@ -323,9 +325,6 @@ qemu_set_binfmts() {
 
     # reduce the list of target interpreters to those given in the CLI
     targets=${@:-$QEMU_TARGET}
-    if [ "x$targets" = "xNONE" ]; then
-      return
-    fi
     qemu_check_target_list $targets
 
     # register the interpreter for each target except for the native one
@@ -377,12 +376,16 @@ QEMU_SUFFIX="${QEMU_SUFFIX:-}"
 QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
 QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
 QEMU_CLEAR="${QEMU_CLEAR:-no}"
+QEMU_TEST="${QEMU_TEST:-no}"
 
-options=$(getopt -o rdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
+options=$(getopt -o trdsQ:S:e:hcp -l test,clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")
 eval set -- "$options"
 
 while true; do
     case "$1" in
+    -t|--test)
+        QEMU_TEST="yes"
+        ;;
     -r|--clear)
         QEMU_CLEAR="yes"
         ;;
@@ -431,6 +434,11 @@ shift
 
 $CHECK
 
+if [ "x$QEMU_TEST" = "xyes" ]; then
+    BINFMT_SET=:
+    BINFMT_CLEAR=:
+fi
+
 if [ "x$QEMU_CLEAR" = "xyes" ]; then
     qemu_check_target_list "$@"
     for t in $checked_target_list; do
-- 
2.25.1




^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency
  2020-03-09 19:18 ` [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency Unai Martinez-Corral
@ 2020-03-09 19:30   ` Eric Blake
  2020-03-09 19:36     ` Unai Martinez Corral
  0 siblings, 1 reply; 22+ messages in thread
From: Eric Blake @ 2020-03-09 19:30 UTC (permalink / raw)
  To: Unai Martinez-Corral, qemu-devel; +Cc: riku.voipio, laurent

On 3/9/20 2:18 PM, Unai Martinez-Corral wrote:
> Spaces are removed before '; then', for consistency with other scripts
> in the project.
> 
> Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Technically, since this change is different than what Laurent previously 
reviewed, it might have been better to drop the R-b to make sure 
everything is still okay.  But I'll let Laurent chime in, no need to 
respin just yet.

> ---
>   scripts/qemu-binfmt-conf.sh | 34 +++++++++++++++++-----------------
>   1 file changed, 17 insertions(+), 17 deletions(-)

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

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests
  2020-03-09 19:19 ` [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests Unai Martinez-Corral
@ 2020-03-09 19:31   ` Eric Blake
  2020-03-10  8:28   ` Laurent Vivier
  1 sibling, 0 replies; 22+ messages in thread
From: Eric Blake @ 2020-03-09 19:31 UTC (permalink / raw)
  To: Unai Martinez-Corral, qemu-devel; +Cc: riku.voipio, laurent

On 3/9/20 2:19 PM, Unai Martinez-Corral wrote:
> All the tests are prefixed with 'x', in order to avoid risky comparisons
> (i.e. a user deliberately trying to provoke a syntax error).
> 
> Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>   scripts/qemu-binfmt-conf.sh | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 

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

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency
  2020-03-09 19:30   ` Eric Blake
@ 2020-03-09 19:36     ` Unai Martinez Corral
  2020-03-10  8:39       ` Laurent Vivier
  0 siblings, 1 reply; 22+ messages in thread
From: Unai Martinez Corral @ 2020-03-09 19:36 UTC (permalink / raw)
  To: Eric Blake; +Cc: Unai Martinez-Corral, riku.voipio, qemu-devel, Laurent Vivier

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

2020/3/9 20:30, Eric Blake:

> On 3/9/20 2:18 PM, Unai Martinez-Corral wrote:
> > Spaces are removed before '; then', for consistency with other scripts
> > in the project.
> >
> > Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
> > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
>
> Technically, since this change is different than what Laurent previously
> reviewed, it might have been better to drop the R-b to make sure
> everything is still okay.  But I'll let Laurent chime in, no need to
> respin just yet.
>

Thanks for clarifying. Honestly, I was not sure about how to proceed.

[-- Attachment #2: Type: text/html, Size: 993 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 0/10] qemu-binfmt-conf.sh
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (9 preceding siblings ...)
  2020-03-09 19:24 ` [PATCH v10 10/10] qemu-binfmt-conf.sh: add --test Unai Martinez-Corral
@ 2020-03-09 19:58 ` no-reply
  2020-03-09 20:05 ` no-reply
  11 siblings, 0 replies; 22+ messages in thread
From: no-reply @ 2020-03-09 19:58 UTC (permalink / raw)
  To: unai.martinezcorral; +Cc: riku.voipio, qemu-devel, laurent

Patchew URL: https://patchew.org/QEMU/20200309191200.GA60@669c1c222ef4/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

PASS 1 fdc-test /x86_64/fdc/cmos
PASS 2 fdc-test /x86_64/fdc/no_media_on_start
PASS 3 fdc-test /x86_64/fdc/read_without_media
==6139==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 fdc-test /x86_64/fdc/media_change
PASS 5 fdc-test /x86_64/fdc/sense_interrupt
PASS 6 fdc-test /x86_64/fdc/relative_seek
---
PASS 32 test-opts-visitor /visitor/opts/range/beyond
PASS 33 test-opts-visitor /visitor/opts/dict/unvisited
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-coroutine -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-coroutine" 
==6197==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6197==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffd60075000; bottom 0x7f0e73720000; size: 0x00eeec955000 (1026171424768)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-coroutine /basic/no-dangling-access
---
PASS 12 fdc-test /x86_64/fdc/read_no_dma_19
PASS 13 fdc-test /x86_64/fdc/fuzz-registers
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/ide-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="ide-test" 
==6212==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 test-aio /aio/timer/schedule
PASS 15 test-aio /aio/coroutine/queue-chaining
PASS 16 test-aio /aio-gsource/flush
---
PASS 25 test-aio /aio-gsource/event/wait
PASS 26 test-aio /aio-gsource/event/flush
PASS 27 test-aio /aio-gsource/event/wait/no-flush-cb
==6220==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 ide-test /x86_64/ide/identify
==6226==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 ide-test /x86_64/ide/flush
PASS 28 test-aio /aio-gsource/timer/schedule
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-aio-multithread -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-aio-multithread" 
==6235==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-aio-multithread /aio/multi/lifecycle
==6232==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 ide-test /x86_64/ide/bmdma/simple_rw
==6252==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 test-aio-multithread /aio/multi/schedule
PASS 4 ide-test /x86_64/ide/bmdma/trim
==6263==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-aio-multithread /aio/multi/mutex/contended
PASS 4 test-aio-multithread /aio/multi/mutex/handoff
PASS 5 test-aio-multithread /aio/multi/mutex/mcs
==6284==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 6 test-aio-multithread /aio/multi/mutex/pthread
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-throttle -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-throttle" 
==6291==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-throttle /throttle/leak_bucket
PASS 2 test-throttle /throttle/compute_wait
PASS 3 test-throttle /throttle/init
---
PASS 14 test-throttle /throttle/config/max
PASS 15 test-throttle /throttle/config/iops_size
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-thread-pool -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-thread-pool" 
==6295==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-thread-pool /thread-pool/submit
PASS 2 test-thread-pool /thread-pool/submit-aio
PASS 3 test-thread-pool /thread-pool/submit-co
---
PASS 3 test-hbitmap /hbitmap/size/unaligned
PASS 4 test-hbitmap /hbitmap/iter/empty
PASS 5 test-hbitmap /hbitmap/iter/partial
==6366==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 6 test-hbitmap /hbitmap/iter/granularity
PASS 7 test-hbitmap /hbitmap/iter/iter_and_reset
PASS 8 test-hbitmap /hbitmap/get/all
---
PASS 28 test-hbitmap /hbitmap/truncate/shrink/medium
PASS 29 test-hbitmap /hbitmap/truncate/shrink/large
PASS 30 test-hbitmap /hbitmap/meta/zero
==6372==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 31 test-hbitmap /hbitmap/meta/one
PASS 32 test-hbitmap /hbitmap/meta/byte
PASS 33 test-hbitmap /hbitmap/meta/word
---
PASS 44 test-hbitmap /hbitmap/next_dirty_area/next_dirty_area_4
PASS 45 test-hbitmap /hbitmap/next_dirty_area/next_dirty_area_after_truncate
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bdrv-drain -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bdrv-drain" 
==6379==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-bdrv-drain /bdrv-drain/nested
PASS 2 test-bdrv-drain /bdrv-drain/multiparent
PASS 3 test-bdrv-drain /bdrv-drain/set_aio_context
---
PASS 41 test-bdrv-drain /bdrv-drain/bdrv_drop_intermediate/poll
PASS 42 test-bdrv-drain /bdrv-drain/replace_child/mid-drain
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bdrv-graph-mod -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bdrv-graph-mod" 
==6418==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-bdrv-graph-mod /bdrv-graph-mod/update-perm-tree
PASS 2 test-bdrv-graph-mod /bdrv-graph-mod/should-update-child
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-blockjob -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-blockjob" 
==6424==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-blockjob /blockjob/ids
PASS 2 test-blockjob /blockjob/cancel/created
PASS 3 test-blockjob /blockjob/cancel/running
---
PASS 7 test-blockjob /blockjob/cancel/pending
PASS 8 test-blockjob /blockjob/cancel/concluded
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-blockjob-txn -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-blockjob-txn" 
==6428==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-blockjob-txn /single/success
PASS 2 test-blockjob-txn /single/failure
PASS 3 test-blockjob-txn /single/cancel
---
PASS 6 test-blockjob-txn /pair/cancel
PASS 7 test-blockjob-txn /pair/fail-cancel-race
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-block-backend -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-block-backend" 
==6420==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6435==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-block-backend /block-backend/drain_aio_error
PASS 2 test-block-backend /block-backend/drain_all_aio_error
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-block-iothread -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-block-iothread" 
==6440==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-block-iothread /sync-op/pread
PASS 2 test-block-iothread /sync-op/pwrite
PASS 3 test-block-iothread /sync-op/load_vmstate
---
PASS 15 test-block-iothread /propagate/diamond
PASS 16 test-block-iothread /propagate/mirror
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-image-locking -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-image-locking" 
==6460==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-image-locking /image-locking/basic
PASS 2 test-image-locking /image-locking/set-perm-abort
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-x86-cpuid -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-x86-cpuid" 
---
PASS 1 rcutorture /rcu/torture/1reader
PASS 2 rcutorture /rcu/torture/10readers
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-list -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-list" 
==6512==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-rcu-list /rcu/qlist/single-threaded
PASS 2 test-rcu-list /rcu/qlist/short-few
PASS 3 test-rcu-list /rcu/qlist/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-simpleq -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-simpleq" 
PASS 1 test-rcu-simpleq /rcu/qsimpleq/single-threaded
==6557==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 test-rcu-simpleq /rcu/qsimpleq/short-few
PASS 3 test-rcu-simpleq /rcu/qsimpleq/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-tailq -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-tailq" 
PASS 1 test-rcu-tailq /rcu/qtailq/single-threaded
PASS 2 test-rcu-tailq /rcu/qtailq/short-few
==6602==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-rcu-tailq /rcu/qtailq/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-rcu-slist -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-rcu-slist" 
PASS 1 test-rcu-slist /rcu/qslist/single-threaded
PASS 2 test-rcu-slist /rcu/qslist/short-few
==6662==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-rcu-slist /rcu/qslist/long-many
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qdist -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qdist" 
PASS 1 test-qdist /qdist/none
---
PASS 8 test-qdist /qdist/binning/shrink
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qht -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qht" 
PASS 5 ide-test /x86_64/ide/bmdma/various_prdts
==6675==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6675==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe15e8e000; bottom 0x7f5756546000; size: 0x00a6bf948000 (716178751488)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 6 ide-test /x86_64/ide/bmdma/no_busmaster
PASS 7 ide-test /x86_64/ide/flush/nodev
==6686==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 ide-test /x86_64/ide/flush/empty_drive
==6691==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 9 ide-test /x86_64/ide/flush/retry_pci
==6697==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 10 ide-test /x86_64/ide/flush/retry_isa
==6703==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 11 ide-test /x86_64/ide/cdrom/pio
==6709==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 ide-test /x86_64/ide/cdrom/pio_large
==6715==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 ide-test /x86_64/ide/cdrom/dma
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/ahci-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="ahci-test" 
==6729==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 ahci-test /x86_64/ahci/sanity
==6735==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qht /qht/mode/default
PASS 2 ahci-test /x86_64/ahci/pci_spec
PASS 2 test-qht /qht/mode/resize
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qht-par -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qht-par" 
==6741==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 ahci-test /x86_64/ahci/pci_enable
==6756==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qht-par /qht/parallel/2threads-0%updates-1s
PASS 4 ahci-test /x86_64/ahci/hba_spec
==6768==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 test-qht-par /qht/parallel/2threads-20%updates-1s
PASS 5 ahci-test /x86_64/ahci/hba_enable
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bitops -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bitops" 
---
PASS 2 test-bitcnt /bitcnt/ctpop16
PASS 3 test-bitcnt /bitcnt/ctpop32
PASS 4 test-bitcnt /bitcnt/ctpop64
==6775==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qdev-global-props -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qdev-global-props" 
PASS 1 test-qdev-global-props /qdev/properties/static/default
PASS 2 test-qdev-global-props /qdev/properties/static/global
---
PASS 8 check-qom-proplist /qom/proplist/delchild
PASS 9 check-qom-proplist /qom/resolve/partial
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qemu-opts -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qemu-opts" 
==6803==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qemu-opts /qemu-opts/find_unknown_opts
PASS 2 test-qemu-opts /qemu-opts/find_opts
PASS 3 test-qemu-opts /qemu-opts/opts_create
---
PASS 4 test-write-threshold /write-threshold/not-trigger
PASS 5 test-write-threshold /write-threshold/trigger
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-hash -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-hash" 
==6822==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-hash /crypto/hash/iov
PASS 2 test-crypto-hash /crypto/hash/alloc
PASS 3 test-crypto-hash /crypto/hash/prealloc
---
PASS 15 test-crypto-secret /crypto/secret/crypt/missingiv
PASS 16 test-crypto-secret /crypto/secret/crypt/badiv
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-tlscredsx509 -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-tlscredsx509" 
==6848==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6848==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcf35dc000; bottom 0x7fde33bfe000; size: 0x001ebf9de000 (132063813632)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 9 ahci-test /x86_64/ahci/io/pio/lba28/simple/zero
PASS 1 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/perfectserver
PASS 2 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/perfectclient
==6858==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6858==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffe14e43000; bottom 0x7fa59abfe000; size: 0x00587a245000 (380006322176)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 10 ahci-test /x86_64/ahci/io/pio/lba28/simple/low
==6864==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca1
==6864==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffde75df000; bottom 0x7f48249fe000; size: 0x00b5c2be1000 (780656316416)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 4 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca2
PASS 11 ahci-test /x86_64/ahci/io/pio/lba28/simple/high
==6870==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6870==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffda0ebb000; bottom 0x7f84727fe000; size: 0x00792e6bd000 (520469860352)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 5 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodca3
---
PASS 8 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/badca3
PASS 12 ahci-test /x86_64/ahci/io/pio/lba28/double/zero
PASS 9 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver1
==6876==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6876==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffce26eb000; bottom 0x7f3553ffe000; size: 0x00c78e6ed000 (857088118784)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 13 ahci-test /x86_64/ahci/io/pio/lba28/double/low
PASS 10 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver2
==6882==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6882==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc7f847000; bottom 0x7f87de3fe000; size: 0x0074a1449000 (500921831424)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 14 ahci-test /x86_64/ahci/io/pio/lba28/double/high
PASS 11 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver3
==6888==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6888==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fffcfb34000; bottom 0x7fd475bfe000; size: 0x002b59f36000 (186192715776)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 15 ahci-test /x86_64/ahci/io/pio/lba28/long/zero
==6894==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver4
==6894==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffea9b8c000; bottom 0x7f1a0877c000; size: 0x00e4a1410000 (981957935104)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 13 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver5
PASS 16 ahci-test /x86_64/ahci/io/pio/lba28/long/low
==6900==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6900==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffde0c27000; bottom 0x7f408d5fe000; size: 0x00bd53629000 (813147787264)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 17 ahci-test /x86_64/ahci/io/pio/lba28/long/high
==6906==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver6
PASS 18 ahci-test /x86_64/ahci/io/pio/lba28/short/zero
PASS 15 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/goodserver7
---
PASS 32 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/inactive1
PASS 33 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/inactive2
PASS 34 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/inactive3
==6912==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 35 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/chain1
PASS 36 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/chain2
PASS 37 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/missingca
---
PASS 39 test-crypto-tlscredsx509 /qcrypto/tlscredsx509/missingclient
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-tlssession -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-tlssession" 
PASS 19 ahci-test /x86_64/ahci/io/pio/lba28/short/low
==6922==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 20 ahci-test /x86_64/ahci/io/pio/lba28/short/high
==6928==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6928==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff0e022000; bottom 0x7f6da9dfe000; size: 0x009164224000 (624450224128)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 21 ahci-test /x86_64/ahci/io/pio/lba48/simple/zero
PASS 1 test-crypto-tlssession /qcrypto/tlssession/psk
==6934==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6934==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff2f7ce000; bottom 0x7fcc4c5fe000; size: 0x0032e31d0000 (218558693376)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 22 ahci-test /x86_64/ahci/io/pio/lba48/simple/low
PASS 2 test-crypto-tlssession /qcrypto/tlssession/basicca
==6940==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 test-crypto-tlssession /qcrypto/tlssession/differentca
==6940==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcee086000; bottom 0x7fafe79fe000; size: 0x004d06688000 (330819993600)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 23 ahci-test /x86_64/ahci/io/pio/lba48/simple/high
PASS 4 test-crypto-tlssession /qcrypto/tlssession/altname1
PASS 5 test-crypto-tlssession /qcrypto/tlssession/altname2
==6946==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6946==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff398bc000; bottom 0x7f39997fe000; size: 0x00c5a00be000 (848793690112)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 24 ahci-test /x86_64/ahci/io/pio/lba48/double/zero
PASS 6 test-crypto-tlssession /qcrypto/tlssession/altname3
==6952==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 7 test-crypto-tlssession /qcrypto/tlssession/altname4
==6952==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffca3a68000; bottom 0x7f00421fe000; size: 0x00fc6186a000 (1083967971328)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 25 ahci-test /x86_64/ahci/io/pio/lba48/double/low
==6958==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 test-crypto-tlssession /qcrypto/tlssession/altname5
==6958==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fffe4137000; bottom 0x7fba18dfe000; size: 0x0045cb339000 (299761897472)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 26 ahci-test /x86_64/ahci/io/pio/lba48/double/high
==6964==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6964==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffca45f3000; bottom 0x7faf39f7c000; size: 0x004d6a677000 (332497645568)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 27 ahci-test /x86_64/ahci/io/pio/lba48/long/zero
PASS 9 test-crypto-tlssession /qcrypto/tlssession/altname6
==6970==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6970==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffcf429e000; bottom 0x7f1d05b24000; size: 0x00dfee77a000 (961778524160)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 28 ahci-test /x86_64/ahci/io/pio/lba48/long/low
PASS 10 test-crypto-tlssession /qcrypto/tlssession/wildcard1
==6976==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==6976==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffdda3c8000; bottom 0x7fb450724000; size: 0x004989ca4000 (315844345856)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 11 test-crypto-tlssession /qcrypto/tlssession/wildcard2
PASS 29 ahci-test /x86_64/ahci/io/pio/lba48/long/high
PASS 12 test-crypto-tlssession /qcrypto/tlssession/wildcard3
==6982==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 test-crypto-tlssession /qcrypto/tlssession/wildcard4
PASS 30 ahci-test /x86_64/ahci/io/pio/lba48/short/zero
PASS 14 test-crypto-tlssession /qcrypto/tlssession/wildcard5
==6988==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 15 test-crypto-tlssession /qcrypto/tlssession/wildcard6
PASS 31 ahci-test /x86_64/ahci/io/pio/lba48/short/low
PASS 16 test-crypto-tlssession /qcrypto/tlssession/cachain
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qga -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qga" 
==6994==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 32 ahci-test /x86_64/ahci/io/pio/lba48/short/high
PASS 1 test-qga /qga/sync-delimited
PASS 2 test-qga /qga/sync
---
PASS 15 test-qga /qga/invalid-cmd
PASS 16 test-qga /qga/invalid-args
PASS 17 test-qga /qga/fsfreeze-status
==7008==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 33 ahci-test /x86_64/ahci/io/dma/lba28/fragmented
PASS 18 test-qga /qga/blacklist
PASS 19 test-qga /qga/config
==7017==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 20 test-qga /qga/guest-exec
PASS 21 test-qga /qga/guest-exec-invalid
PASS 34 ahci-test /x86_64/ahci/io/dma/lba28/retry
==7035==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 22 test-qga /qga/guest-get-osinfo
PASS 23 test-qga /qga/guest-get-host-name
PASS 24 test-qga /qga/guest-get-timezone
---
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-util-filemonitor -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-util-filemonitor" 
PASS 1 test-util-filemonitor /util/filemonitor
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-util-sockets -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-util-sockets" 
==7045==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-util-sockets /util/socket/is-socket/bad
PASS 2 test-util-sockets /util/socket/is-socket/good
PASS 3 test-util-sockets /socket/fd-pass/name/good
---
PASS 5 test-authz-list /auth/list/explicit/deny
PASS 6 test-authz-list /auth/list/explicit/allow
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-authz-listfile -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-authz-listfile" 
==7065==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-authz-listfile /auth/list/complex
PASS 2 test-authz-listfile /auth/list/default/deny
PASS 3 test-authz-listfile /auth/list/default/allow
---
PASS 4 test-io-channel-file /io/channel/pipe/sync
PASS 5 test-io-channel-file /io/channel/pipe/async
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-io-channel-tls -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-io-channel-tls" 
==7091==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 38 ahci-test /x86_64/ahci/io/dma/lba28/double/zero
PASS 1 test-io-channel-tls /qio/channel/tls/basic
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-io-channel-command -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-io-channel-command" 
==7143==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-io-channel-command /io/channel/command/fifo/sync
PASS 2 test-io-channel-command /io/channel/command/fifo/async
PASS 3 test-io-channel-command /io/channel/command/echo/sync
---
PASS 3 test-base64 /util/base64/not-nul-terminated
PASS 4 test-base64 /util/base64/invalid-chars
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-pbkdf -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-pbkdf" 
==7161==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-pbkdf /crypto/pbkdf/rfc3962/sha1/iter1
PASS 2 test-crypto-pbkdf /crypto/pbkdf/rfc3962/sha1/iter2
PASS 3 test-crypto-pbkdf /crypto/pbkdf/rfc3962/sha1/iter1200a
---
PASS 8 test-crypto-ivgen /crypto/ivgen/essiv/1f2e3d4c
PASS 9 test-crypto-ivgen /crypto/ivgen/essiv/1f2e3d4c5b6a7988
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-afsplit -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-afsplit" 
==7178==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-crypto-afsplit /crypto/afsplit/sha256/5
PASS 2 test-crypto-afsplit /crypto/afsplit/sha256/5000
PASS 3 test-crypto-afsplit /crypto/afsplit/sha256/big
---
PASS 17 test-crypto-xts /crypto/xts/t-21-key-32-ptx-31/basic
PASS 18 test-crypto-xts /crypto/xts/t-21-key-32-ptx-31/unaligned
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-crypto-block -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-crypto-block" 
==7178==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffd7b2b4000; bottom 0x7fc735f7b000; size: 0x003645339000 (233089241088)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 1 test-crypto-block /crypto/block/qcow
---
PASS 3 test-logging /logging/logfile_write_path
PASS 4 test-logging /logging/logfile_lock_path
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-replication -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-replication" 
==7204==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7201==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-replication /replication/primary/read
==7201==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff73c28000; bottom 0x7fa31e1fd000; size: 0x005c55a2b000 (396573716480)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 2 test-replication /replication/primary/write
PASS 42 ahci-test /x86_64/ahci/io/dma/lba28/long/low
==7213==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7213==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffeff3e8000; bottom 0x7fa9873fd000; size: 0x005577feb000 (367085400064)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 3 test-replication /replication/primary/start
---
PASS 5 test-replication /replication/primary/do_checkpoint
PASS 6 test-replication /replication/primary/get_error_all
PASS 43 ahci-test /x86_64/ahci/io/dma/lba28/long/high
==7220==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 7 test-replication /replication/secondary/read
PASS 44 ahci-test /x86_64/ahci/io/dma/lba28/short/zero
==7226==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 8 test-replication /replication/secondary/write
PASS 45 ahci-test /x86_64/ahci/io/dma/lba28/short/low
==7232==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 46 ahci-test /x86_64/ahci/io/dma/lba28/short/high
==7238==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 47 ahci-test /x86_64/ahci/io/dma/lba48/simple/zero
==7204==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffdf8739000; bottom 0x7f842ea2b000; size: 0x0079c9d0e000 (523076952064)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
==7262==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 9 test-replication /replication/secondary/start
PASS 48 ahci-test /x86_64/ahci/io/dma/lba48/simple/low
==7268==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 49 ahci-test /x86_64/ahci/io/dma/lba48/simple/high
==7274==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 50 ahci-test /x86_64/ahci/io/dma/lba48/double/zero
==7280==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 51 ahci-test /x86_64/ahci/io/dma/lba48/double/low
PASS 10 test-replication /replication/secondary/stop
==7286==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 52 ahci-test /x86_64/ahci/io/dma/lba48/double/high
==7292==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7292==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffdde98e000; bottom 0x7f5893ffd000; size: 0x00a54a991000 (709921148928)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 53 ahci-test /x86_64/ahci/io/dma/lba48/long/zero
==7299==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7299==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc3923a000; bottom 0x7ff5c797b000; size: 0x0006718bf000 (27674800128)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 54 ahci-test /x86_64/ahci/io/dma/lba48/long/low
PASS 11 test-replication /replication/secondary/continuous_replication
==7306==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7306==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc10a7e000; bottom 0x7f7ad35fd000; size: 0x00813d481000 (555078914048)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 55 ahci-test /x86_64/ahci/io/dma/lba48/long/high
==7313==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 56 ahci-test /x86_64/ahci/io/dma/lba48/short/zero
==7319==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 test-replication /replication/secondary/do_checkpoint
PASS 57 ahci-test /x86_64/ahci/io/dma/lba48/short/low
==7325==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 test-replication /replication/secondary/get_error_all
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-bufferiszero -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-bufferiszero" 
PASS 58 ahci-test /x86_64/ahci/io/dma/lba48/short/high
==7334==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 59 ahci-test /x86_64/ahci/io/ncq/simple
==7340==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 60 ahci-test /x86_64/ahci/io/ncq/retry
==7346==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 61 ahci-test /x86_64/ahci/flush/simple
==7352==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 62 ahci-test /x86_64/ahci/flush/retry
==7358==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7364==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 63 ahci-test /x86_64/ahci/flush/migrate
==7372==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7378==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 64 ahci-test /x86_64/ahci/migrate/sanity
==7386==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7392==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 65 ahci-test /x86_64/ahci/migrate/dma/simple
==7400==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7406==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 66 ahci-test /x86_64/ahci/migrate/dma/halted
==7414==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7420==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 67 ahci-test /x86_64/ahci/migrate/ncq/simple
==7428==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7434==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 68 ahci-test /x86_64/ahci/migrate/ncq/halted
==7442==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 69 ahci-test /x86_64/ahci/cdrom/eject
==7447==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 70 ahci-test /x86_64/ahci/cdrom/dma/single
==7453==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 71 ahci-test /x86_64/ahci/cdrom/dma/multi
==7459==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 72 ahci-test /x86_64/ahci/cdrom/pio/single
==7465==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7465==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7ffc37a2e000; bottom 0x7f68873fe000; size: 0x0093b0630000 (634319470592)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
PASS 73 ahci-test /x86_64/ahci/cdrom/pio/multi
==7471==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 74 ahci-test /x86_64/ahci/cdrom/pio/bcl
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/hd-geo-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="hd-geo-test" 
PASS 1 hd-geo-test /x86_64/hd-geo/ide/none
==7485==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 2 hd-geo-test /x86_64/hd-geo/ide/drive/cd_0
==7491==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/blank
==7497==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/lba
==7503==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 5 hd-geo-test /x86_64/hd-geo/ide/drive/mbr/chs
==7509==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 6 hd-geo-test /x86_64/hd-geo/ide/device/mbr/blank
==7515==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 7 hd-geo-test /x86_64/hd-geo/ide/device/mbr/lba
PASS 1 test-bufferiszero /cutils/bufferiszero
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-uuid -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-uuid" 
==7521==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-uuid /uuid/is_null
PASS 2 test-uuid /uuid/generate
PASS 3 test-uuid /uuid/parse
---
PASS 1 test-qapi-util /qapi/util/qapi_enum_parse
PASS 2 test-qapi-util /qapi/util/parse_qapi_name
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  tests/test-qgraph -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="test-qgraph" 
==7533==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 1 test-qgraph /qgraph/init_nop
PASS 2 test-qgraph /qgraph/test_machine
PASS 3 test-qgraph /qgraph/test_contains
---
PASS 22 test-qgraph /qgraph/test_test_in_path
PASS 23 test-qgraph /qgraph/test_double_edge
PASS 9 hd-geo-test /x86_64/hd-geo/ide/device/user/chs
==7545==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 10 hd-geo-test /x86_64/hd-geo/ide/device/user/chst
==7551==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7555==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7559==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7563==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7567==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7571==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7575==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7579==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7582==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 11 hd-geo-test /x86_64/hd-geo/override/ide
==7589==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7593==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7597==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7601==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7605==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7609==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7613==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7617==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7620==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 12 hd-geo-test /x86_64/hd-geo/override/scsi
==7627==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7631==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7635==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7639==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7643==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7647==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7651==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7655==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7658==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 13 hd-geo-test /x86_64/hd-geo/override/scsi_2_controllers
==7665==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7669==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7673==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7677==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7680==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 14 hd-geo-test /x86_64/hd-geo/override/virtio_blk
==7687==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7691==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7694==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 15 hd-geo-test /x86_64/hd-geo/override/zero_chs
==7701==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7705==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7709==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7713==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7716==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 16 hd-geo-test /x86_64/hd-geo/override/scsi_hot_unplug
==7723==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7727==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7731==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7735==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
==7738==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 17 hd-geo-test /x86_64/hd-geo/override/virtio_hot_unplug
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/boot-order-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="boot-order-test" 
PASS 1 boot-order-test /x86_64/boot-order/pc
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7807==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP'
Using expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7813==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP'
Using expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7819==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.bridge'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7825==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.ipmikcs'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7831==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.cphp'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7838==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.memhp'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7844==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.numamem'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7850==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.dimmpxm'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7859==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/pc/FACP.acpihmat'
Looking for expected file 'tests/data/acpi/pc/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7866==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.bridge'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7872==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.mmio64'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7878==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.ipmibt'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7884==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.cphp'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7891==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.memhp'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7897==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.numamem'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7903==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.dimmpxm'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
Could not access KVM kernel module: No such file or directory
qemu-system-x86_64: -accel kvm: failed to initialize kvm: No such file or directory
qemu-system-x86_64: falling back to tcg
==7912==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!

Looking for expected file 'tests/data/acpi/q35/FACP.acpihmat'
Looking for expected file 'tests/data/acpi/q35/FACP'
---
PASS 1 i440fx-test /x86_64/i440fx/defaults
PASS 2 i440fx-test /x86_64/i440fx/pam
PASS 3 i440fx-test /x86_64/i440fx/firmware/bios
==8004==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 4 i440fx-test /x86_64/i440fx/firmware/pflash
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/fw_cfg-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="fw_cfg-test" 
PASS 1 fw_cfg-test /x86_64/fw_cfg/signature
---
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/drive_del-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="drive_del-test" 
PASS 1 drive_del-test /x86_64/drive_del/without-dev
PASS 2 drive_del-test /x86_64/drive_del/after_failed_device_add
==8097==WARNING: ASan doesn't fully support makecontext/swapcontext functions and may produce false positives in some cases!
PASS 3 drive_del-test /x86_64/blockdev/drive_del_device_del
MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}  QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 QTEST_QEMU_IMG=qemu-img tests/qtest/wdt_ib700-test -m=quick -k --tap < /dev/null | ./scripts/tap-driver.pl --test-name="wdt_ib700-test" 
PASS 1 wdt_ib700-test /x86_64/wdt_ib700/pause
---
dbus-daemon[8267]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

**
ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18)
cleaning up pid 8267
ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/dbus-vmstate-test.c:114:get_connection: assertion failed (err == NULL): The connection is closed (g-io-error-quark, 18)
make: *** [/tmp/qemu-test/src/tests/Makefile.include:632: check-qtest-x86_64] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=462fface003d4288bbb812b14f237870', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-tk5zhj8y/src/docker-src.2020-03-09-15.31.02.20474:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=462fface003d4288bbb812b14f237870
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-tk5zhj8y/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    27m16.735s
user    0m8.713s


The full log is available at
http://patchew.org/logs/20200309191200.GA60@669c1c222ef4/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 0/10] qemu-binfmt-conf.sh
  2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
                   ` (10 preceding siblings ...)
  2020-03-09 19:58 ` [PATCH v10 0/10] qemu-binfmt-conf.sh no-reply
@ 2020-03-09 20:05 ` no-reply
  11 siblings, 0 replies; 22+ messages in thread
From: no-reply @ 2020-03-09 20:05 UTC (permalink / raw)
  To: unai.martinezcorral; +Cc: riku.voipio, qemu-devel, laurent

Patchew URL: https://patchew.org/QEMU/20200309191200.GA60@669c1c222ef4/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH v10 0/10] qemu-binfmt-conf.sh
Message-id: 20200309191200.GA60@669c1c222ef4
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
6998456 qemu-binfmt-conf.sh: add --test
de76b37 qemu-binfmt-conf.sh: add option --clear
a8799ef qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS]
2ca95ad qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX
f2eb778 qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options
d224143 qemu-binfmt-conf.sh: use the same presentation format as for qemu-*
8b9b845 qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
ccf9eb4 qemu-binfmt-conf.sh: make opts -p and -c boolean
ee0df83 qemu-binfmt-conf.sh: enforce safe tests
ffea590 qemu-binfmt-conf.sh: enforce style consistency

=== OUTPUT BEGIN ===
1/10 Checking commit ffea590f36f3 (qemu-binfmt-conf.sh: enforce style consistency)
2/10 Checking commit ee0df830faad (qemu-binfmt-conf.sh: enforce safe tests)
WARNING: line over 80 characters
#36: FILE: scripts/qemu-binfmt-conf.sh:303:
+        if [ "x$magic" = "x" ] || [ "x$mask" = "x" ] || [ "x$family" = "x" ]; then

total: 0 errors, 1 warnings, 33 lines checked

Patch 2/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/10 Checking commit ccf9eb486013 (qemu-binfmt-conf.sh: make opts -p and -c boolean)
ERROR: line over 90 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:331:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 0 warnings, 43 lines checked

Patch 3/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/10 Checking commit 8b9b8451b921 (qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT)
5/10 Checking commit d22414312ea8 (qemu-binfmt-conf.sh: use the same presentation format as for qemu-*)
WARNING: line over 80 characters
#51: FILE: scripts/qemu-binfmt-conf.sh:183:
+-F|--qemu-suffix SUFFIX               add a suffix to the default interpreter name

ERROR: line over 90 characters
#52: FILE: scripts/qemu-binfmt-conf.sh:184:
+-p|--persistent      QEMU_PERSISTENT  (yes) load the interpreter and keep it in memory; all future

ERROR: line over 90 characters
#54: FILE: scripts/qemu-binfmt-conf.sh:186:
+-c|--credential      QEMU_CREDENTIAL  (yes) credential and security tokens are calculated according

ERROR: line over 90 characters
#59: FILE: scripts/qemu-binfmt-conf.sh:191:
+                                      systemd-binfmt.service for the given CPU; if CPU is "ALL",

ERROR: line over 90 characters
#61: FILE: scripts/qemu-binfmt-conf.sh:193:
+-d|--debian                           don't write into /proc, generate update-binfmts templates

ERROR: line over 90 characters
#86: FILE: scripts/qemu-binfmt-conf.sh:210:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for a

total: 5 errors, 1 warnings, 79 lines checked

Patch 5/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

6/10 Checking commit f2eb778de91d (qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options)
WARNING: line over 80 characters
#36: FILE: scripts/qemu-binfmt-conf.sh:184:
+-F|--suffix SUFFIX                    add a suffix to the default interpreter name

ERROR: line over 90 characters
#45: FILE: scripts/qemu-binfmt-conf.sh:337:
+options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 1 errors, 1 warnings, 38 lines checked

Patch 6/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/10 Checking commit 2ca95ad872f1 (qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX)
WARNING: line over 80 characters
#23: FILE: scripts/qemu-binfmt-conf.sh:184:
+-F|--suffix SUFFIX   QEMU_SUFFIX      add a suffix to the default interpreter name

total: 0 errors, 1 warnings, 30 lines checked

Patch 7/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
8/10 Checking commit a8799ef441b1 (qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS])
ERROR: line over 90 characters
#78: FILE: scripts/qemu-binfmt-conf.sh:203:
+TARGETS              QEMU_TARGETS     A single arch name or a list of them (see all names below);

WARNING: line over 80 characters
#91: FILE: scripts/qemu-binfmt-conf.sh:215:
+-s|--systemd                          don't write into /proc, generate file(s) for

ERROR: line over 90 characters
#105: FILE: scripts/qemu-binfmt-conf.sh:234:
+The environment variable HOST_ARCH allows to override 'uname' to generate configuration files for

ERROR: line over 90 characters
#147: FILE: scripts/qemu-binfmt-conf.sh:363:
+options=$(getopt -o dsQ:S:e:hcp -l debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 3 errors, 1 warnings, 141 lines checked

Patch 8/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

9/10 Checking commit de76b378ab3e (qemu-binfmt-conf.sh: add option --clear)
WARNING: line over 80 characters
#34: FILE: scripts/qemu-binfmt-conf.sh:204:
+                                      if empty, configure/clear all known targets;

ERROR: line over 90 characters
#42: FILE: scripts/qemu-binfmt-conf.sh:213:
+-r|--clear           QEMU_CLEAR       (yes) remove registered interpreters for target TARGETS;

ERROR: line over 90 characters
#85: FILE: scripts/qemu-binfmt-conf.sh:381:
+options=$(getopt -o rdsQ:S:e:hcp -l clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 85 lines checked

Patch 9/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

10/10 Checking commit 69984567b97d (qemu-binfmt-conf.sh: add --test)
WARNING: line over 80 characters
#21: FILE: scripts/qemu-binfmt-conf.sh:204:
+                                      if empty, configure/clear all known targets.

ERROR: line over 90 characters
#29: FILE: scripts/qemu-binfmt-conf.sh:214:
+-t|--test            QEMU_TEST        (yes) test the setup with the provided arguments, but do not

ERROR: line over 90 characters
#59: FILE: scripts/qemu-binfmt-conf.sh:381:
+options=$(getopt -o trdsQ:S:e:hcp -l test,clear,debian,systemd,path:,suffix:,exportdir:,help,credential,persistent -- "$@")

total: 2 errors, 1 warnings, 61 lines checked

Patch 10/10 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200309191200.GA60@669c1c222ef4/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
  2020-03-09 19:20 ` [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT Unai Martinez-Corral
@ 2020-03-10  8:20   ` Laurent Vivier
  2020-03-13  0:09     ` Unai Martinez Corral
  0 siblings, 1 reply; 22+ messages in thread
From: Laurent Vivier @ 2020-03-10  8:20 UTC (permalink / raw)
  To: Unai Martinez-Corral, qemu-devel; +Cc: riku.voipio

Le 09/03/2020 à 20:20, Unai Martinez-Corral a écrit :
> Allow to set options '--persistent' and/or '--credential' through
> environment variables. If not defined, defaults are used ('no').
> Anyway, command-line arguments have priority over environment variables.

If variable are set to 'yes', how do you force the value to no with the
command line?

Please, refresh my memory, why do we need these variables?
Do you have an use case?

Thanks,
Laurent

> Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  scripts/qemu-binfmt-conf.sh | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
> index 285ce528d1..0c28db5ca4 100755
> --- a/scripts/qemu-binfmt-conf.sh
> +++ b/scripts/qemu-binfmt-conf.sh
> @@ -190,9 +190,11 @@ Usage: qemu-binfmt-conf.sh [--qemu-path PATH][--debian][--systemd CPU]
>                        (default: $SYSTEMDDIR or $DEBIANDIR)
>         --credential:  if present, credential and security tokens are
>                        calculated according to the binary to interpret
> +                      (QEMU_CREDENTIAL=yes)
>         --persistent:  if present, the interpreter is loaded when binfmt is
>                        configured and remains in memory. All future uses
>                        are cloned from the open file.
> +                      (QEMU_PERSISTENT=yes)
>  
>      To import templates with update-binfmts, use :
>  
> @@ -259,10 +261,10 @@ qemu_check_systemd() {
>  
>  qemu_generate_register() {
>      flags=""
> -    if [ "x$CREDENTIAL" = "xyes" ]; then
> +    if [ "x$QEMU_CREDENTIAL" = "xyes" ]; then
>          flags="OC"
>      fi
> -    if [ "x$PERSISTENT" = "xyes" ]; then
> +    if [ "x$QEMU_PERSISTENT" = "xyes" ]; then
>          flags="${flags}F"
>      fi
>  
> @@ -285,7 +287,7 @@ package qemu-$cpu
>  interpreter $qemu
>  magic $magic
>  mask $mask
> -credential $CREDENTIAL
> +credential $QEMU_CREDENTIAL
>  EOF
>  }
>  
> @@ -324,8 +326,10 @@ SYSTEMDDIR="/etc/binfmt.d"
>  DEBIANDIR="/usr/share/binfmts"
>  
>  QEMU_PATH=/usr/local/bin
> -CREDENTIAL=no
> -PERSISTENT=no
> +
> +QEMU_PERSISTENT="${QEMU_PERSISTENT:-no}"
> +QEMU_CREDENTIAL="${QEMU_CREDENTIAL:-no}"
> +
>  QEMU_SUFFIX=""
>  
>  options=$(getopt -o ds:Q:S:e:hcp -l debian,systemd:,qemu-path:,qemu-suffix:,exportdir:,help,credential,persistent -- "$@")
> @@ -377,10 +381,10 @@ while true; do
>          exit 1
>          ;;
>      -c|--credential)
> -        CREDENTIAL="yes"
> +        QEMU_CREDENTIAL="yes"
>          ;;
>      -p|--persistent)
> -        PERSISTENT="yes"
> +        QEMU_PERSISTENT="yes"
>          ;;
>      *)
>          break
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests
  2020-03-09 19:19 ` [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests Unai Martinez-Corral
  2020-03-09 19:31   ` Eric Blake
@ 2020-03-10  8:28   ` Laurent Vivier
  2020-03-10 11:47     ` Eric Blake
  1 sibling, 1 reply; 22+ messages in thread
From: Laurent Vivier @ 2020-03-10  8:28 UTC (permalink / raw)
  To: Unai Martinez-Corral, qemu-devel; +Cc: riku.voipio

Le 09/03/2020 à 20:19, Unai Martinez-Corral a écrit :
> All the tests are prefixed with 'x', in order to avoid risky comparisons
> (i.e. a user deliberately trying to provoke a syntax error).

With the quotes I don't see how we can provoke a syntax error.
Could you provide an example?

Thanks,
Laurent

> Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  scripts/qemu-binfmt-conf.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
> index c728443ba2..98401f4e7c 100755
> --- a/scripts/qemu-binfmt-conf.sh
> +++ b/scripts/qemu-binfmt-conf.sh
> @@ -259,10 +259,10 @@ qemu_check_systemd() {
>  
>  qemu_generate_register() {
>      flags=""
> -    if [ "$CREDENTIAL" = "yes" ]; then
> +    if [ "x$CREDENTIAL" = "xyes" ]; then
>          flags="OC"
>      fi
> -    if [ "$PERSISTENT" = "yes" ]; then
> +    if [ "x$PERSISTENT" = "xyes" ]; then
>          flags="${flags}F"
>      fi
>  
> @@ -300,18 +300,18 @@ qemu_set_binfmts() {
>          mask=$(eval echo \$${cpu}_mask)
>          family=$(eval echo \$${cpu}_family)
>  
> -        if [ "$magic" = "" ] || [ "$mask" = "" ] || [ "$family" = "" ]; then
> +        if [ "x$magic" = "x" ] || [ "x$mask" = "x" ] || [ "x$family" = "x" ]; then
>              echo "INTERNAL ERROR: unknown cpu $cpu" 1>&2
>              continue
>          fi
>  
>          qemu="$QEMU_PATH/qemu-$cpu"
> -        if [ "$cpu" = "i486" ]; then
> +        if [ "x$cpu" = "xi486" ]; then
>              qemu="$QEMU_PATH/qemu-i386"
>          fi
>  
>          qemu="$qemu$QEMU_SUFFIX"
> -        if [ "$host_family" != "$family" ]; then
> +        if [ "x$host_family" != "x$family" ]; then
>              $BINFMT_SET
>          fi
>      done
> 



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency
  2020-03-09 19:36     ` Unai Martinez Corral
@ 2020-03-10  8:39       ` Laurent Vivier
  0 siblings, 0 replies; 22+ messages in thread
From: Laurent Vivier @ 2020-03-10  8:39 UTC (permalink / raw)
  To: unai.martinezcorral, Eric Blake; +Cc: riku.voipio, qemu-devel

Le 09/03/2020 à 20:36, Unai Martinez Corral a écrit :
> 2020/3/9 20:30, Eric Blake:
> 
>     On 3/9/20 2:18 PM, Unai Martinez-Corral wrote:
>     > Spaces are removed before '; then', for consistency with other scripts
>     > in the project.
>     >
>     > Signed-off-by: Unai Martinez-Corral <unai.martinezcorral@ehu.eus>
>     > Reviewed-by: Laurent Vivier <laurent@vivier.eu
>     <mailto:laurent@vivier.eu>>
> 
>     Technically, since this change is different than what Laurent
>     previously
>     reviewed, it might have been better to drop the R-b to make sure
>     everything is still okay.  But I'll let Laurent chime in, no need to
>     respin just yet.
> 
> 
> Thanks for clarifying. Honestly, I was not sure about how to proceed.
> 

Yes, it's better to drop the R-b if you change something that could
impact the review.

But this patch seems good, so you can let my R-b now.

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests
  2020-03-10  8:28   ` Laurent Vivier
@ 2020-03-10 11:47     ` Eric Blake
  2020-03-13  0:15       ` Unai Martinez Corral
  0 siblings, 1 reply; 22+ messages in thread
From: Eric Blake @ 2020-03-10 11:47 UTC (permalink / raw)
  To: Laurent Vivier, Unai Martinez-Corral, qemu-devel; +Cc: riku.voipio

On 3/10/20 3:28 AM, Laurent Vivier wrote:
> Le 09/03/2020 à 20:19, Unai Martinez-Corral a écrit :
>> All the tests are prefixed with 'x', in order to avoid risky comparisons
>> (i.e. a user deliberately trying to provoke a syntax error).
> 
> With the quotes I don't see how we can provoke a syntax error.
> Could you provide an example?

Historically, in some shells:

foo=\(
bar=\)
if [ "$foo" = "$bar" ]; then echo hello world; fi

could output 'hello world' (by parsing a parenthesized one-argument 
test, and the string '=' is non-empty), but:

if [ "x$foo" = "x$bar" ]; then echo goodbye; fi

did not (since no operator begins with 'x', you have guaranteed the 
syntax that [ will parse).  Similarly, if foo=! or foo=-a, you could get 
syntax errors (if [ tried to treat the expansion of $foo as an operator 
and got thrown off by the remaining arguments not matching an expected 
pattern).

These days, POSIX says that with three arguments when the 2nd is a 
binary operator, there is no ambiguity (the binary operator takes 
precedence over the ( and ) around the non-empty string test), and 
modern bash obeys the POSIX rule without needing the x prefix.  But it 
is still better to prefix with x for copy-paste portability to older 
shells that do not match current POSIX rules.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT
  2020-03-10  8:20   ` Laurent Vivier
@ 2020-03-13  0:09     ` Unai Martinez Corral
  0 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez Corral @ 2020-03-13  0:09 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: Unai Martinez-Corral, riku.voipio, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

2020/03/10 9:20, Laurent Vivier:

> If variable are set to 'yes', how do you force the value to no with the
> command line?
>

I believe you cannot. Do you mean the explanation should be reworded? Or
that the feature should be implemented?


> Please, refresh my memory, why do we need these variables?
> Do you have an use case?
>

See
https://patchew.org/QEMU/20190306031221.GA53@03612eec87fc/20190306044620.GC75@03612eec87fc/
I copy the relevant explanation below:

The main use case is to provide defaults when this script is included
> in a docker container. There are three actors involved:
>
> - Developers of QEMU providing some defaults in the script.
> - Developer of a docker image including the script from upstream but
> changing some defaults by setting envvars inside the container.
> - User of the container that might want to override the settings
> either by setting the envvars or through the command line.
>
> If the entrypoint to the docker image is any script that executes
> qemu-binfmt-conf.sh at some point, the user cannot provide options
> through the command line. Envvars allow to do so, without requiring
> the user to customize the docker image.

[-- Attachment #2: Type: text/html, Size: 1887 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests
  2020-03-10 11:47     ` Eric Blake
@ 2020-03-13  0:15       ` Unai Martinez Corral
  0 siblings, 0 replies; 22+ messages in thread
From: Unai Martinez Corral @ 2020-03-13  0:15 UTC (permalink / raw)
  To: Eric Blake; +Cc: Unai Martinez-Corral, riku.voipio, Laurent Vivier, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

Laurent, as Eric explained, this commit (as well as the homogeneisation of
spacing) are fixes to pre-existing issues in the script, in order to better
match other bash sources in the codebase. It would be possible to pick 1/10
and 2/10 as a separate patchset.

El mar., 10 mar. 2020 a las 12:47, Eric Blake (<eblake@redhat.com>)
escribió:

> On 3/10/20 3:28 AM, Laurent Vivier wrote:
> > Le 09/03/2020 à 20:19, Unai Martinez-Corral a écrit :
> >> All the tests are prefixed with 'x', in order to avoid risky comparisons
> >> (i.e. a user deliberately trying to provoke a syntax error).
> >
> > With the quotes I don't see how we can provoke a syntax error.
> > Could you provide an example?
>
> Historically, in some shells:
>
> foo=\(
> bar=\)
> if [ "$foo" = "$bar" ]; then echo hello world; fi
>
> could output 'hello world' (by parsing a parenthesized one-argument
> test, and the string '=' is non-empty), but:
>
> if [ "x$foo" = "x$bar" ]; then echo goodbye; fi
>
> did not (since no operator begins with 'x', you have guaranteed the
> syntax that [ will parse).  Similarly, if foo=! or foo=-a, you could get
> syntax errors (if [ tried to treat the expansion of $foo as an operator
> and got thrown off by the remaining arguments not matching an expected
> pattern).
>
> These days, POSIX says that with three arguments when the 2nd is a
> binary operator, there is no ambiguity (the binary operator takes
> precedence over the ( and ) around the non-empty string test), and
> modern bash obeys the POSIX rule without needing the x prefix.  But it
> is still better to prefix with x for copy-paste portability to older
> shells that do not match current POSIX rules.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3226
> Virtualization:  qemu.org | libvirt.org
>
>

[-- Attachment #2: Type: text/html, Size: 2463 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-03-13  0:16 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 19:12 [PATCH v10 0/10] qemu-binfmt-conf.sh Unai Martinez-Corral
2020-03-09 19:18 ` [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency Unai Martinez-Corral
2020-03-09 19:30   ` Eric Blake
2020-03-09 19:36     ` Unai Martinez Corral
2020-03-10  8:39       ` Laurent Vivier
2020-03-09 19:19 ` [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests Unai Martinez-Corral
2020-03-09 19:31   ` Eric Blake
2020-03-10  8:28   ` Laurent Vivier
2020-03-10 11:47     ` Eric Blake
2020-03-13  0:15       ` Unai Martinez Corral
2020-03-09 19:19 ` [PATCH v10 03/10] qemu-binfmt-conf.sh: make opts -p and -c boolean Unai Martinez-Corral
2020-03-09 19:20 ` [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT Unai Martinez-Corral
2020-03-10  8:20   ` Laurent Vivier
2020-03-13  0:09     ` Unai Martinez Corral
2020-03-09 19:20 ` [PATCH v10 05/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-* Unai Martinez-Corral
2020-03-09 19:22 ` [PATCH v10 06/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options Unai Martinez-Corral
2020-03-09 19:22 ` [PATCH v10 07/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX Unai Martinez-Corral
2020-03-09 19:23 ` [PATCH v10 08/10] qemu-binfmt-conf.sh: generalize <CPU> to positional [TARGETS] Unai Martinez-Corral
2020-03-09 19:23 ` [PATCH v10 09/10] qemu-binfmt-conf.sh: add option --clear Unai Martinez-Corral
2020-03-09 19:24 ` [PATCH v10 10/10] qemu-binfmt-conf.sh: add --test Unai Martinez-Corral
2020-03-09 19:58 ` [PATCH v10 0/10] qemu-binfmt-conf.sh no-reply
2020-03-09 20:05 ` no-reply

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.