Trivial fixes and cleanups
cover Trivial fixes and cleanups
This is a collection of trivial fixes and cleanups. The only expected behavior change is in the output on config.log, as per the first patch.
Cleber Rosa(5):
configure: remove duplicate single quotes on config.log
qemu-iotests: get rid of _full_imgproto_details()
qemu-iotests: remove commented out variables
qemu-iotests: remove comment about root privileges
docs: fix broken paths to docs/interop dir
configure | 4 +--- docs/devel/writing-qmp-commands.txt | 2 +- qapi-schema.json | 2 +- tests/qemu-iotests/check | 13 +------------ tests/qemu-iotests/common.rc | 5 ----- 5 files changed, 4 insertions(+), 22 deletions(-)
PATCH 1/5 configure: remove duplicate single quotes on config.log header
The generation of the informational header on config.log contains two pairs of single quotes, which seems unintentional, and looks like this:
# QEMU configure log Thu Jul 26 08:17:15 EDT 2017
# Configured with: './configure' '--target-list=x86_64-softmmu'
With this change, the quotes comprehend the entire command line:
# QEMU configure log Mon Jul 26 08:17:35 EDT 2017
# Configured with: './configure --target-list=x86_64-softmmu'
--- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
configure +1 -3
@@ -35,9 +35,7 @@ rm -f config.log # Print a helpful header at the top of config.log echo "# QEMU configure log $(date)" >> config.log -printf "# Configured with:" >> config.log -printf " '%s'" "$0" "$@" >> config.log -echo >> config.log +echo "# Configured with: '$0 $@'" >> config.log echo "#" >> config.log print_error() {
Signature · 1 line
2.9.4
Re: [Qemu-devel] [PATCH 1/5] configure: remove duplicate single quotes on config.log header
Quoted 6 lines · Cleber Rosa
The generation of the informational header on config.log contains two pairs of single quotes, which seems unintentional, and looks like this:
# QEMU configure log Thu Jul 26 08:17:15 EDT 2017
# Configured with: './configure' '--target-list=x86_64-softmmu'
I think this is deliberate. The idea is that the string is a validly shell-quoted string that you can cut and paste into a shell prompt if you want to. (This is less important than it used to be now we have config.status.)
If your configure command has more than one line you get something like this:
# Configured with: '../../configure' '--target-list=arm-softmmu,aarch64-softmmu,arm-linux-user,aarch64-linux-user' '--enable-debug' '--cc=ccache gcc' '--audio-drv-list=pa'
...and note in particular how the '--cc=ccache gcc' argument is printed. Your change would give
# Configured with: '../../configure --target-list=arm-softmmu,aarch64-softmmu,arm-linux-user,aarch64-linux-user --enable-debug --cc=ccache gcc --audio-drv-list=pa'
which can't be cut and pasted, and is ambiguous.
thanks
-- PMM
Re: [Qemu-devel] [PATCH 1/5] configure: remove duplicate single quotes on config.log header
Quoted 11 lines · Peter Maydell
Quoted 6 lines · Cleber Rosa
The generation of the informational header on config.log contains two pairs of single quotes, which seems unintentional, and looks like this:
# QEMU configure log Thu Jul 26 08:17:15 EDT 2017
# Configured with: './configure' '--target-list=x86_64-softmmu'I think this is deliberate. The idea is that the string is a validly shell-quoted string that you can cut and paste into a shell prompt if you want to.
It IS deliberate. If you want, you could improve the code to only emit '' around arguments that require it rather than all arguments, but that requires more shell code (it's easier to quote everywhere, even when it looks strange because the quotes weren't necessary).
Quoted 2 lines
...and note in particular how the '--cc=ccache gcc' argument is printed.
Yes, that's a case where the quotes are necessary.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: [Qemu-devel] [PATCH 1/5] configure: remove duplicate single quotes on config.log header
Quoted 18 lines · Eric Blake
Quoted 11 lines · Peter Maydell
Quoted 6 lines · Cleber Rosa
The generation of the informational header on config.log contains two pairs of single quotes, which seems unintentional, and looks like this:
# QEMU configure log Thu Jul 26 08:17:15 EDT 2017
# Configured with: './configure' '--target-list=x86_64-softmmu'I think this is deliberate. The idea is that the string is a validly shell-quoted string that you can cut and paste into a shell prompt if you want to.
It IS deliberate. If you want, you could improve the code to only emit '' around arguments that require it rather than all arguments, but that requires more shell code (it's easier to quote everywhere, even when it looks strange because the quotes weren't necessary).
Quoted 5 lines
Quoted 2 lines
...and note in particular how the '--cc=ccache gcc' argument is printed.
Yes, that's a case where the quotes are necessary.
Right, now I can see why. Thanks for the review!
Signature · 4 lines
Cleber Rosa [ Sr Software Engineer - Virtualization Team - Red Hat ] [ Avocado Test Framework - avocado-framework.github.io ] [ 7ABB 96EB 8B46 B94D 5E0F E9BB 657E 8D33 A5F2 09F3 ]
PATCH 2/5 qemu-iotests: get rid of _full_imgproto_details()
In reply to Cleber RosaAlthough this function is used, its implementation does nothing besides echoing a variable name. There's no need to wrap this functionality in a function, and based on the one usage it has, it's not even required to adhere to a convention or code style.
--- tests/qemu-iotests/check | 3 +-- tests/qemu-iotests/common.rc | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-)
tests/qemu-iotests/check +1 -2
@@ -228,7 +228,6 @@ rm -f check.full [ -f $TIMESTAMP_FILE ] || touch $TIMESTAMP_FILE FULL_IMGFMT_DETAILS=`_full_imgfmt_details` -FULL_IMGPROTO_DETAILS=`_full_imgproto_details` FULL_HOST_DETAILS=`_full_platform_details` #FULL_MKFS_OPTIONS=`_scratch_mkfs_options` #FULL_MOUNT_OPTIONS=`_scratch_mount_options`
@@ -239,7 +238,7 @@ QEMU_IMG -- "$QEMU_IMG_PROG" $QEMU_IMG_OPTIONS QEMU_IO -- "$QEMU_IO_PROG" $QEMU_IO_OPTIONS QEMU_NBD -- "$QEMU_NBD_PROG" $QEMU_NBD_OPTIONS IMGFMT -- $FULL_IMGFMT_DETAILS -IMGPROTO -- $FULL_IMGPROTO_DETAILS +IMGPROTO -- $IMGPROTO PLATFORM -- $FULL_HOST_DETAILS TEST_DIR -- $TEST_DIR SOCKET_SCM_HELPER -- $SOCKET_SCM_HELPER
tests/qemu-iotests/common.rc +0 -5
@@ -479,11 +479,6 @@ _full_imgfmt_details() fi } -_full_imgproto_details() -{ - echo "$IMGPROTO" -} - _full_platform_details() { os=`uname -s`
Signature · 1 line
2.9.4
PATCH 3/5 qemu-iotests: remove commented out variables
In reply to Cleber RosaThe variables FULL_MKFS_OPTIONS and FULL_MOUNT_OPTIONS are commented out, never used, and even refer to functions that do exist. The last time these were touched was around 8 years ago, so I guess it's safe to assume outputting such information on test execution is still on the radar.
--- tests/qemu-iotests/check | 4 ---- 1 file changed, 4 deletions(-)
tests/qemu-iotests/check +0 -4
@@ -229,8 +229,6 @@ rm -f check.full FULL_IMGFMT_DETAILS=`_full_imgfmt_details` FULL_HOST_DETAILS=`_full_platform_details` -#FULL_MKFS_OPTIONS=`_scratch_mkfs_options` -#FULL_MOUNT_OPTIONS=`_scratch_mount_options` cat <<EOF QEMU -- "$QEMU_PROG" $QEMU_OPTIONS
@@ -244,8 +242,6 @@ TEST_DIR -- $TEST_DIR SOCKET_SCM_HELPER -- $SOCKET_SCM_HELPER EOF -#MKFS_OPTIONS -- $FULL_MKFS_OPTIONS -#MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS seq="check"
Signature · 1 line
2.9.4
Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: remove commented out variables
Quoted 10 lines · Cleber Rosa
The variables
FULL_MKFS_OPTIONSandFULL_MOUNT_OPTIONSare commented out, never used, and even refer to functions that do exist. The last time these were touched was around 8 years ago, so I guess it's safe to assume outputting such information on test execution is still on the radar.Signed-off-by Cleber Rosa <[email protected]>--- tests/qemu-iotests/check | 4 ---- 1 file changed, 4 deletions(-)
PATCH 4/5 qemu-iotests: remove comment about root privileges requirement
In reply to Cleber RosaThe check script contains a commented out root user requirement, probably because of its xfstests heritage. This requirement doesn't apply to qemu-iotests, so it better be gone.
--- tests/qemu-iotests/check | 6 ------ 1 file changed, 6 deletions(-)
tests/qemu-iotests/check +0 -6
@@ -123,12 +123,6 @@ fi # we need common . "$source_iotests/common" -#if [ `id -u` -ne 0 ] -#then -# echo "check: QA must be run as root" -# exit 1 -#fi - TIMESTAMP_FILE=check.time-$IMGPROTO-$IMGFMT tmp="${TEST_DIR}"/$$
Signature · 1 line
2.9.4
Re: [Qemu-devel] [PATCH 4/5] qemu-iotests: remove comment about root privileges requirement
Quoted 8 lines · Cleber Rosa
The check script contains a commented out root user requirement, probably because of its xfstests heritage. This requirement doesn't apply to qemu-iotests, so it better be gone.
Signed-off-by Cleber Rosa <[email protected]>--- tests/qemu-iotests/check | 6 ------ 1 file changed, 6 deletions(-)
PATCH 5/5 docs: fix broken paths to docs/interop dir
In reply to Cleber RosaWith the move of some docs to docs/interop on d59157e, a couple of references where not updated.
--- docs/devel/writing-qmp-commands.txt | 2 +- qapi-schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
docs/devel/writing-qmp-commands.txt +1 -1
@@ -8,7 +8,7 @@ into the QAPI framework implementation. For an in-depth introduction to the QAPI framework, please refer to docs/qapi-code-gen.txt. For documentation about the QMP protocol, -start with docs/qmp-intro.txt. +start with docs/interop/qmp-intro.txt. == Overview ==
qapi-schema.json +1 -1
@@ -23,7 +23,7 @@ # | -> data issued by the Client # | <- Server data response # -# Please, refer to the QMP specification (docs/qmp-spec.txt) for +# Please, refer to the QMP specification (docs/interop/qmp-spec.txt) for # detailed information on the Server command and response formats. # # = Stability Considerations
Signature · 1 line
2.9.4
Re: [Qemu-devel] [PATCH 5/5] docs: fix broken paths to docs/interop dir
Quoted 8 lines · Cleber Rosa
With the move of some docs to docs/interop on d59157e, a couple of references where not updated.
Signed-off-by Cleber Rosa <[email protected]>--- docs/devel/writing-qmp-commands.txt | 2 +- qapi-schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Safe for 2.10, but also okay if it slips to 2.11
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: [Qemu-devel] [PATCH 5/5] docs: fix broken paths to docs/interop dir
In reply to Cleber RosaQuoted 8 lines · Cleber Rosa
With the move of some docs to docs/interop on d59157e, a couple of references where not updated.
Signed-off-by Cleber Rosa <[email protected]>--- docs/devel/writing-qmp-commands.txt | 2 +- qapi-schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 11 lines · Cleber Rosa
This is a collection of trivial fixes and cleanups. The only expected behavior change is in the output on config.log, as per the first patch.
Cleber Rosa(5):
configure: remove duplicate single quotes on config.log
qemu-iotests: get rid of_full_imgproto_details()
qemu-iotests: remove commented out variables
qemu-iotests: remove comment about root privileges
docs: fix broken paths to docs/interop dir
Quoted 6 lines
configure | 4 +--- docs/devel/writing-qmp-commands.txt | 2 +- qapi-schema.json | 2 +- tests/qemu-iotests/check | 13 +------------ tests/qemu-iotests/common.rc | 5 ----- 5 files changed, 4 insertions(+), 22 deletions(-)
CCing Kevin Wolf for qemu-iotests changes.