- Jan 12, 2021
-
-
Hao Wu authored
We add a qtest for the PWM in the previous patch. It proves it works as expected. Reviewed-by:
Havard Skinnemoen <hskinnemoen@google.com> Reviewed-by:
Tyrone Ting <kfting@nuvoton.com> Signed-off-by:
Hao Wu <wuhaotsh@google.com> Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Message-id: 20210108190945.949196-6-wuhaotsh@google.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Hao Wu authored
The ADC is part of NPCM7XX Module. Its behavior is controled by the ADC_CON register. It converts one of the eight analog inputs into a digital input and stores it in the ADC_DATA register when enabled. Users can alter input value by using qom-set QMP command. Reviewed-by:
Havard Skinnemoen <hskinnemoen@google.com> Reviewed-by:
Tyrone Ting <kfting@nuvoton.com> Signed-off-by:
Hao Wu <wuhaotsh@google.com> Message-id: 20210108190945.949196-4-wuhaotsh@google.com [PMM: Added missing hw/adc/trace.h file] Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Jan 11, 2021
-
-
Alexander Bulekov authored
Prior to this patch, the fuzzer found inputs to map PCI device BARs and enable the device. While it is nice that the fuzzer can do this, it added significant overhead, since the fuzzer needs to map all the BARs (regenerating the memory topology), at the start of each input. With this patch, we do this once, before fuzzing, mitigating some of this overhead. Signed-off-by:
Alexander Bulekov <alxndr@bu.edu> Reviewed-by:
Darren Kenny <darren.kenny@oracle.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201221181203.1853-1-alxndr@bu.edu> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
There was a race condition in the first test where there was already the "crw" output in the dmesg, but the "0.0.4711" entry has not been created in the /sys fs yet. Fix it by waiting until it is there. The second test has even more problems on gitlab-CI. Even after adding some more synchronization points (that wait for some messages in the "dmesg" output to make sure that the modules got loaded correctly), there are still occasionally some hangs in this test when it is running in the gitlab-CI. So far I was unable to reproduce these hangs locally on my computer, so this issue might take a while to debug. Thus disable the 2nd test in the gitlab-CI until the problems are better understood and fixed. Signed-off-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Message-Id: <20210108185645.86351-1-thuth@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Gan Qixin authored
When the length of mname is less than 5, memcpy("xenfv", mname, 5) will cause heap buffer overflow. Therefore, use strncmp to avoid this problem. The asan showed stack: ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000f2f4 at pc 0x7f65d8cc2225 bp 0x7ffe93cc5a60 sp 0x7ffe93cc5208 READ of size 5 at 0x60200000f2f4 thread T0 #0 0x7f65d8cc2224 in memcmp (/lib64/libasan.so.5+0xdf224) #1 0x5632c20be95b in qtest_cb_for_every_machine tests/qtest/libqtest.c:1282 #2 0x5632c20b7995 in main tests/qtest/test-hmp.c:160 #3 0x7f65d88fed42 in __libc_start_main (/lib64/libc.so.6+0x26d42) #4 0x5632c20b72cd in _start (build/tests/qtest/test-hmp+0x542cd) Reported-by:
Euler Robot <euler.robot@huawei.com> Signed-off-by:
Gan Qixin <ganqixin@huawei.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20210106050625.518041-1-ganqixin@huawei.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Cho, Yu-Chen authored
Add build-system-opensuse jobs and opensuse-leap.docker dockerfile. Use openSUSE Leap 15.2 container image in the gitlab-CI. Signed-off-by:
Cho, Yu-Chen <acho@suse.com> Tested-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201229085046.8536-1-acho@suse.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jan 06, 2021
-
-
Alex Bennée authored
The read binary data as text via a PPM export of the frame buffer seems a bit sketchy and it did blow up in the real world when the assertion failed: https://gitlab.com/qemu-project/qemu/-/jobs/943183183 However short of cleaning up the test to be more binary focused at least limit the attempt to dump the whole file as hexified zeros in the logs. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Acked-by:
Halil Pasic <pasic@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20210105124405.15424-1-alex.bennee@linaro.org>
-
Alex Bennée authored
The "auto" documentation states: That means they should run with every QEMU binary (also non-x86) which is not the case as the check-system-fedora build which only includes a rag tag group of rare and deprecated targets doesn't support the virtio device required. Fixes: ef9bba14 ("quorum: Implement bdrv_co_block_status()") Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210105100402.12350-1-alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
Include the 'ccache' package to speed up compilation. Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201213211601.253530-1-f4bug@amsat.org> Fixes: d6db2a1c ("docker: add debian-buster-arm64-cross") Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jan 04, 2021
-
-
Jiaxun Yang authored
The kernel comes from debian archive so it's trusted. Invoking the test can be done as follows: $ avocado --show=app,console run -t machine:fuloong2e tests/acceptance/ (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mips64el_fuloong2e: console: [ 0.000000] Initializing cgroup subsys cpuset console: [ 0.000000] Initializing cgroup subsys cpu console: [ 0.000000] Initializing cgroup subsys cpuacct console: [ 0.000000] Linux version 3.16.0-6-loongson-2e (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 Debian 3.16.56-1+deb8u1 (2018-05-08) console: [ 0.000000] memsize=256, highmemsize=0 console: [ 0.000000] CpuClock = 533080000 console: [ 0.000000] bootconsole [early0] enabled console: [ 0.000000] CPU0 revision is: 00006302 (ICT Loongson-2) console: [ 0.000000] FPU revision is: 00000501 console: [ 0.000000] Checking for the multiply/shift bug... no. console: [ 0.000000] Checking for the daddiu bug... no. console: [ 0.000000] Determined physical RAM map: console: [ 0.000000] memory: 0000000010000000 @ 0000000000000000 (usable) console: [ 0.000000] memory: 0000000004000000 @ 0000000010000000 (reserved) console: [ 0.000000] memory: 0000000003ffffff @ 000000001c000001 (reserved) console: [ 0.000000] Initrd not found or empty - disabling initrd console: [ 0.000000] Zone ranges: console: [ 0.000000] DMA [mem 0x00000000-0x00ffffff] console: [ 0.000000] Normal [mem 0x01000000-0x0fffffff] console: [ 0.000000] Movable zone start for each node console: [ 0.000000] Early memory node ranges console: [ 0.000000] node 0: [mem 0x00000000-0x0fffffff] console: [ 0.000000] Reserving 0MB of memory at 0MB for crashkernel console: [ 0.000000] Primary instruction cache 64kB, VIPT, direct mapped, linesize 32 bytes. console: [ 0.000000] Primary data cache 64kB, 4-way, VIPT, no aliases, linesize 32 bytes console: [ 0.000000] Unified secondary cache 512kB 4-way, linesize 32 bytes. console: [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16327 console: [ 0.000000] Kernel command line: printk.time=0 console=ttyS0 PASS (2.27 s) Signed-off-by:
Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Huacai Chen <chenhuacai@kernel.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201224031750.52146-9-jiaxun.yang@flygoat.com> [PMD: Added command line example] Signed-off-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- Jan 02, 2021
-
-
Daniele Buono authored
cfi-icall is a form of Control-Flow Integrity for indirect function calls implemented by llvm. It is enabled with a -fsanitize flag. iotests are currently disabled when -fsanitize options is used, with the exception of SafeStack. This patch implements a generic filtering mechanism to allow iotests with a set of known-to-be-safe -fsanitize option. Then marks SafeStack and the new options used for cfi-icall safe for iotests Signed-off-by:
Daniele Buono <dbuono@linux.vnet.ibm.com> Message-Id: <20201204230615.2392-4-dbuono@linux.vnet.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Eduardo Habkost authored
commit 1e419ee6 ("chardev: generate an internal id when none given") changed the reference ownership semantics of qemu_chardev_new(NULL, ...): now all chardevs created using qemu_chardev_new() are added to the /chardevs QOM container, and the caller does not own a reference to the newly created object. However, the code at char_file_test_internal() had not been updated and was calling object_unref() on a chardev object it didn't own. This makes the chardev be destroyed, but leaves a dangling pointer in the /chardev container children list, and seems to be the cause of the following char_serial_test() crash: Unexpected error in object_property_try_add() at ../qom/object.c:1220: \ attempt to add duplicate property 'serial-id' to object (type 'container') ERROR test-char - too few tests run (expected 38, got 9) Update the code to use object_unparent() at the end of char_file_test_internal(), to make sure the chardev will be correctly removed from the QOM tree. Fixes: 1e419ee6 ("chardev: generate an internal id when none given") Signed-off-by:
Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20201215224133.3545901-2-ehabkost@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Daniel P. Berrangé authored
This was intentionally renamed recently to be all lowercase: https://bugs.centos.org/view.php?id=17920 https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Yum_repo_file_and_repoid_changes Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Message-Id: <20201216141653.213980-1-berrange@redhat.com> [AJB: bump up FROM to trigger re-build, add diffutils] Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Thomas Huth authored
The Debian 9 containers have been removed a while ago, so we can delete the corresponding entries in the Makefile, too. Fixes: e3755276 ("tests/docker: Remove old Debian 9 containers") Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201215083318.92205-1-thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Thomas Huth authored
After adding some missing packages, it's possible to check 32-bit builds and tests with the fedora-i386-cross container in the gitlab-CI, too. Unfortunately, the code in subprojects/ ignores the --extra-cflags (on purpose), so the vhost-user part has to be disabled for this. While we're at it, update the container to Fedora 31. Unfortunately the gcc from the later versions emits some very dubious format-truncation warnings, so Fedora 32 and 33 are currently unsuitable for this job. Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201215083451.92322-1-thuth@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Alex Bennée authored
Hopefully this will guard against sloppy code getting into our tests. Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201210190417.31673-9-alex.bennee@linaro.org>
-
- Dec 22, 2020
-
-
Thomas Huth authored
This initrd contains a virtio-net and a virtio-gpu kernel module, so we can check that we can set a MAC address for the network device and whether we can hot-plug and -unplug a virtio-crypto device. But the most interesting part is maybe that we can also successfully write some stuff into the emulated framebuffer of the virtio-gpu device and make sure that we can read back that data from a screenshot. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201221143423.23607-1-thuth@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
- Dec 21, 2020
-
-
Thomas Huth authored
Inflate the balloon and check whether the size of the memory changes. Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201215183623.110128-4-thuth@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Thomas Huth authored
/dev/hwrng is only functional if virtio-rng is working right, so let's add a sanity check for this device node. Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201215183623.110128-3-thuth@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Thomas Huth authored
We will use this in more spots soon, so it's easier to put this into a separate function. Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20201215183623.110128-2-thuth@redhat.com> Signed-off-by:
Cornelia Huck <cohuck@redhat.com>
-
Cornelia Huck authored
Hotplug a virtio-net-ccw device, and then hotunplug it again. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Wainer dos Santos Moschetta <wainersm@redhat.com> Message-Id: <20201208122843.147186-1-cohuck@redhat.com>
-
- Dec 19, 2020
-
-
Markus Armbruster authored
The functions to modify a QString's string are all unused now. Drop them, and make the string immutable. Saves 16 bytes per QString on my system. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201211171152.146877-21-armbru@redhat.com>
-
Markus Armbruster authored
No users left outside tests/, and the ones in tests/ can just as well use qstring_get_str(). Do that, and drop the function. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201211171152.146877-14-armbru@redhat.com>
-
Markus Armbruster authored
qobject_to_json() and qobject_to_json_pretty() build a GString, then covert it to QString. Just one of the callers actually needs a QString: qemu_rbd_parse_filename(). A few others need a string they can modify: qmp_send_response(), qga's send_response(), to_json_str(), and qmp_fd_vsend_fds(). The remainder just need a string. Change qobject_to_json() and qobject_to_json_pretty() to return the GString. qemu_rbd_parse_filename() now has to convert to QString. All others save a QString temporary. to_json_str() actually becomes a bit simpler, because GString provides more convenient modification functions. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201211171152.146877-6-armbru@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201211171152.146877-4-armbru@redhat.com>
-
Markus Armbruster authored
test_primitives() uses union member intmax_t max to compare the integer members. Unspecified behavior. Has worked fine for many years, though. Clean it up. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-11-armbru@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-10-armbru@redhat.com>
-
Markus Armbruster authored
The string output visitor should serialize numbers so that the string input visitor deserializes them back to the same number. It fails to do so. print_type_number() uses format %f. This is prone to nasty rounding errors. For instance, numbers between 0 and 0.0000005 get flushed to zero. We currently use this visitor only for HMP info migrate, info network, info qtree, and info memdev. No double values occur there as far as I can tell. Fix anyway by formatting with %.17g. 17 decimal digits always suffice for IEEE double. See also recent commit "qobject: Fix qnum_to_string() to use sufficient precision". Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-9-armbru@redhat.com>
-
Markus Armbruster authored
This demonstrates rounding error due to insufficient precision: double 3.1415926535897932 gets converted to JSON 3.141593. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-8-armbru@redhat.com>
-
Markus Armbruster authored
We should serialize numbers to JSON so that they deserialize back to the same number. We fail to do so. The culprit is qnum_to_string(): it uses format %f with trailing '0' trimmed. Results in pretty output for "nice" numbers, but is prone to nasty rounding errors. For instance, numbers between 0 and 0.0000005 get flushed to zero. Where exactly the incorrect rounding can bite is tiresome to gauge. Here's my take. * In QMP output, type 'number': - query-blockstats value avg_rd_queue_depth - QMP query-migrate values mbps, cache-miss-rate, encoding-rate, busy-rate, compression-rate. Relatively harmless, I guess. * In tracing QMP input. Harmless. * In qemu-ga output, type 'number': guest-get-users value login-time. Harmless. * In output of HMP qom-get. Harmless. Not affected, because double values don't actually occur there (I think): * QMP output, type 'any': * qom-get value * qom-list, qom-list-properties value default-value * query-cpu-model-comparison, query-cpu-model-baseline, query-cpu-model-expansion value props. * qemu-img --output json output. * "json:" pseudo-filenames generated by bdrv_refresh_filename(). * The rbd block driver's "=keyvalue-pairs" hack. * In -object help on property default values. Aside: use of JSON feels inappropriate here. * Output of HMP qom-get. * Argument conversion to QemuOpts for qdev_device_add() and HMP with qemu_opts_from_qdict() QMP and HMP device_add, virtio-net failover primary creation, xen-usb "usb-host" creation, HMP netdev_add, object_add. * The uses of qobject_input_visitor_new_flat_confused() As far as I can tell, none of the visited types contain double values. * Dumping ImageInfoSpecific with dump_qobject() Fix by formatting with %.17g. 17 decimal digits always suffice for IEEE double. The change to expected test output illustrates the effect: the rounding errors are gone, but some seemingly "nice" numbers now get converted to not so nice strings, e.g. 0.42 to "0.41999999999999998". This is because 0.42 is not representable exactly in double. It's more accurate in this example than strictly necessary, though. If ugly accuracy bothers us, we can we can try using the least number of digits that still converts back to the same double. In this example, "0.42" would do. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-7-armbru@redhat.com>
-
Markus Armbruster authored
qnum_to_string() has a FIXME comment about rounding errors due to insufficient precision. Cover it: 2.718281828459045 gets converted to "2.718282". The next commit will fix it. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-6-armbru@redhat.com>
-
Markus Armbruster authored
Move one of large_number()'s three checks to uint_number(), and the other two to float_number(). Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-5-armbru@redhat.com>
-
Markus Armbruster authored
Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-4-armbru@redhat.com>
-
Markus Armbruster authored
simple_number() checks only qnum_get_try_int(). Also check qnum_get_try_uint() and qnum_get_double(). float_number() checks only qnum_get_double(). Also check qnum_get_try_int() and qnum_get_try_uint(). Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-3-armbru@redhat.com>
-
Markus Armbruster authored
simple_number() and float_number() convert from JSON to QNumber and back. simple_number() tests "-0", but skips the conversion back to JSON, because it yields "0", not "-0". Works as intended, so better cover it: don't skip, but expect the funny result. float_number() tests "-32.20e-10", but skips the conversion back to JSON, because it yields "-0". This is a known bug in qnum_to_string(), marked FIXME there. Cover the bug: don't skip, but expect the funny result. While there, switch from g_assert() to g_assert_cmpstr() & friends for friendlier test failures. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Message-Id: <20201210161452.2813491-2-armbru@redhat.com>
-
Eric Blake authored
Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use QAPI_LIST_PREPEND(). But places where we must keep the list in order by appending remain open-coded until later patches. Note that as a side effect, this also performs a cleanup of two minor issues in qga/commands-posix.c: the old code was performing new = g_malloc0(sizeof(*ret)); which 1) is confusing because you have to verify whether 'new' and 'ret' are variables with the same type, and 2) would conflict with C++ compilation (not an actual problem for this file, but makes copy-and-paste harder). Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20201113011340.463563-5-eblake@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> [Straightforward conflicts due to commit a8aa94b5 "qga: update schema for guest-get-disks 'dependents' field" and commit a10b453a "target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c" resolved. Commit message tweaked.] Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Dec 18, 2020
-
-
Hanna Reitz authored
With bash 5.1, the output of the following script changes: a=("double space") a=${a[@]:0:1} echo "$a" from "double space" to "double space", i.e. all white space is preserved as-is. This is probably what we actually want here (judging from the "...to accommodate pathnames with spaces" comment), but before 5.1, we would have to quote the ${} slice to get the same behavior. In any case, without quoting, the reference output of many iotests is different between bash 5.1 and pre-5.1, which is not very good. The output of 5.1 is what we want, so whatever we do to get pre-5.1 to the same result, it means we have to fix the reference output of basically all tests that invoke _send_qemu_cmd (except the ones that only use single spaces in the commands they invoke). Instead of quoting the ${} slice (cmd="${$@: 1:...}"), we can also just not use array slicing and replace the whole thing with a simple "cmd=$1; shift", which works because all callers quote the whole $cmd argument anyway. Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20201217153803.101231-3-mreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com>
-
Hanna Reitz authored
The first parameter passed to _send_qemu_cmd is supposed to be the $QEMU_HANDLE. 102 does not do so here, fix it. As a result, the output changes: Now we see the prompt this command is supposedly waiting for before the resize message - as it should be. Signed-off-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20201217153803.101231-2-mreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com>
-
Alberto Garcia authored
This simply calls bdrv_co_pwrite_zeroes() in all children. bs->supported_zero_flags is also set to the flags that are supported by all children. Signed-off-by:
Alberto Garcia <berto@igalia.com> Message-Id: <2f09c842781fe336b4c2e40036bba577b7430190.1605286097.git.berto@igalia.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Signed-off-by:
Max Reitz <mreitz@redhat.com>
-