Re: [Qemu-devel] [PULL 00/33] virtio, pc: fixes and features

2016-10-11 Thread Sascha Silbe
Dear Thomas, Thomas Huth writes: > On 11.10.2016 10:27, Sascha Silbe wrote: [pxe-test failing during "make check"] >> There's a race condition in the tests. Both the "i386" and the "x86_64" >> set of tests are creating and removing the same set

Re: [Qemu-devel] [PULL 00/33] virtio, pc: fixes and features

2016-10-11 Thread Sascha Silbe
.c). FWIW, it's not obvious at first sight that the tests added to check-qtest-i386-y will also be included in check-qtest-x86_64-y. The line responsible for that is hiding in the midst of other assignments, without even a blank line separating it from the rest. Assigning to a common variable

[Qemu-devel] [PATCH v2 0/2] virtio-serial: virtio console emergency write support

2016-09-27 Thread Sascha Silbe
d conflict: virtio-pci page-per-vq compat property) - split into two patches; no code changes (requested by Amit) Sascha Silbe (2): virtio-serial: add plumbing for virtio console emergency write support virtio-serial: enable virtio console emergency write feature hw/char/virtio-se

[Qemu-devel] [PATCH v2 2/2] virtio-serial: enable virtio console emergency write feature

2016-09-27 Thread Sascha Silbe
feature to existing guests. As required by the virtio 1.0 spec, the emergency write functionality is available to the guest even if the guest doesn't negotatiate the feature, as well as before feature negotation. Reviewed-by: Cornelia Huck Signed-off-by: Sascha Silbe --- v1→v2: - rebased on

[Qemu-devel] [PATCH v2 1/2] virtio-serial: add plumbing for virtio console emergency write support

2016-09-27 Thread Sascha Silbe
Add the infrastructure required for the virtio 1.0 "emergency write" (VIRTIO_CONSOLE_F_EMERG_WRITE) feature. Because we don't touch the size of the configuration area, guests will not be able to actually make use of this without further patches. Reviewed-by: Cornelia Huck Signed

Re: [Qemu-devel] [PATCH] virtio-serial: virtio console emergency write support

2016-09-27 Thread Sascha Silbe
Dear Amit, Amit Shah writes: > On (Wed) 21 Sep 2016 [14:17:48], Sascha Silbe wrote: >> Add support for the virtio 1.0 "emergency write" >> (VIRTIO_CONSOLE_F_EMERG_WRITE) feature. This is useful for early guest >> debugging and might be used in cases where the gu

[Qemu-devel] [PATCH] virtio-serial: virtio console emergency write support

2016-09-21 Thread Sascha Silbe
feature to existing guests. Reviewed-by: Cornelia Huck Signed-off-by: Sascha Silbe --- hw/char/virtio-serial-bus.c | 49 --- include/hw/compat.h | 6 - include/hw/virtio/virtio-serial.h | 2 ++ 3 files changed, 53 insertions(+), 4 deletion

Re: [Qemu-devel] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-15 Thread Sascha Silbe
27; result = self.vm.qmp('blockdev-change-medium', **qmp_args) FWIW these days I tend to use Python magics (like *args / **kwargs) only if there's a _significant_ improvement in either functionality or readability; especially for code bases that are being worked on by developers

Re: [Qemu-devel] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-15 Thread Sascha Silbe
Dear Eric, Sascha Silbe writes: > result = self.vm.qmp('blockdev-change-medium', > id=self.device_name or 'drive0', > filename=new_img, > format=iotests.imgfmt) Sorry, my eyes deceived me.

Re: [Qemu-devel] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-15 Thread Sascha Silbe
to other languages). Actually there is a direct equivalent of "?:" (which unfortunately isn't in C11) in Python: "or". So you can use: result = self.vm.qmp('blockdev-change-medium', id=self.device_name or 'drive0', filename=new_img, format=iotests.imgfmt) Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67

2016-09-07 Thread Sascha Silbe
ion sort support (introduced in 1997) and neglected to update it for POSIX.1-2008 compliance [1]? Guess using "-c" and redirecting stderr to /dev/null is our only option then. Feel free to fix that up when applying. Thanks for pointing out these portability issues! Sascha [1] http://pubs.

[Qemu-devel] [PATCH v3 2/8] docker: avoid dependency on 'realpath' package

2016-09-06 Thread Sascha Silbe
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe -

[Qemu-devel] [PATCH v3 4/8] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-09-06 Thread Sascha Silbe
sing or erroring out because we cannot cd to the mirror URL. Signed-off-by: Sascha Silbe --- v2→v3: - send error messages to stderr tests/docker/dockerfiles/debian-bootstrap.pre | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/docker/dockerfiles/debian-bootstrap

[Qemu-devel] [PATCH v3 3/8] docker: debian-bootstrap.pre: print error messages to stderr

2016-09-06 Thread Sascha Silbe
Send error messages where they belong so they're seen even if stdout is redirected to /dev/null. Signed-off-by: Sascha Silbe --- v2→v3: - new patch tests/docker/dockerfiles/debian-bootstrap.pre | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/d

[Qemu-devel] [PATCH v3 8/8] docker: silence debootstrap when --quiet is given

2016-09-06 Thread Sascha Silbe
-off-by: Sascha Silbe --- tests/docker/docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index efb2bf4..b85c165 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -239,8 +239,9 @@ class BuildCommand

[Qemu-devel] [PATCH v3 5/8] docker: print warning if EXECUTABLE is not set when building debootstrap image

2016-09-06 Thread Sascha Silbe
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: Sascha Silbe --- tests/docker/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/te

[Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67

2016-09-06 Thread Sascha Silbe
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255 Signed-off-by: Sascha Silbe --- v2→v3: - fix unbalanced white space

[Qemu-devel] [PATCH v3 7/8] docker: build debootstrap after cloning

2016-09-06 Thread Sascha Silbe
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: Sascha Silbe

[Qemu-devel] [PATCH v3 0/8] docker tests fixes

2016-09-06 Thread Sascha Silbe
the debian-debootstrap image Sascha Silbe (8): docker.py: don't hang on large docker output docker: avoid dependency on 'realpath' package docker: debian-bootstrap.pre: print error messages to stderr docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE

[Qemu-devel] [PATCH v3 1/8] docker.py: don't hang on large docker output

2016-09-06 Thread Sascha Silbe
this issue. Signed-off-by: Sascha Silbe Reviewed-by: Janosch Frank --- This fixes a hang for me when building the Ubuntu docker image (empty docker image cache). tests/docker/docker.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker

Re: [Qemu-devel] [PATCH v2 3/7] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-09-06 Thread Sascha Silbe
to send output to stderr and added a new patch that fixes up the existing messages that are "fatal" (i.e. those directly prior to an exit_and_skip). Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH v2 5/7] docker: make sure debootstrap is at least 1.0.67

2016-09-06 Thread Sascha Silbe
Dear Fam, Fam Zheng writes: > On Wed, 08/24 20:31, Sascha Silbe wrote: [tests/docker/dockerfiles/debian-bootstrap.pre] >> +# debootstrap < 1.0.67 generates empty sources.list, see Debian#732255 >> +MIN_DEBOOTSTRAP_VERSION=1.0.67 [...] >> if [ -z

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Sascha Silbe
Dear Fam, Fam Zheng writes: > On Wed, 08/24 20:30, Sascha Silbe wrote: [tests/docker/docker.py] >> @@ -25,6 +25,10 @@ from tarfile import TarFile, TarInfo >> from StringIO import StringIO >> from shutil import copy, rmtree >> >> + >> +DEVNULL = open(o

Re: [Qemu-devel] [PATCH v3 1/3] qemu-nbd: Add --fork option

2016-08-29 Thread Sascha Silbe
ons and that future versions may stop doing so (i.e. users should use either --verbose --foreground or --verbose --daemon). 3. At some point in the future (qemu 3.0?) we can stop having --verbose imply --foreground. I can give it a try if it's out of scope for your current task

Re: [Qemu-devel] [PATCH for-2.7] wxx: Fix broken build (mkdtemp unavailable)

2016-08-29 Thread Sascha Silbe
Dear Peter, Peter Maydell writes: > On 25 August 2016 at 10:36, Peter Maydell wrote: >> On 23 August 2016 at 16:01, Sascha Silbe wrote: >>> Glad to hear. It would be possibly to support the combination of glib < >>> 2.30.0 AND windows, but only by copying

Re: [Qemu-devel] [PATCH v2] iotests: Do not rely on unavailable domains in 162

2016-08-25 Thread Sascha Silbe
e positive, not a bug) and the test randomly failing because the implementation is racy (→ true positive, bug). Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH v2 5/7] docker: make sure debootstrap is at least 1.0.67

2016-08-24 Thread Sascha Silbe
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255 Signed-off-by: Sascha Silbe --- Not sure if this used to work in even

[Qemu-devel] [PATCH v2 2/7] docker: avoid dependency on 'realpath' package

2016-08-24 Thread Sascha Silbe
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe -

[Qemu-devel] [PATCH v2 6/7] docker: build debootstrap after cloning

2016-08-24 Thread Sascha Silbe
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: Sascha Silbe

[Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-08-24 Thread Sascha Silbe
this issue. Signed-off-by: Sascha Silbe Reviewed-by: Janosch Frank --- This fixes a hang for me when building the Ubuntu docker image (empty docker image cache). tests/docker/docker.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker

[Qemu-devel] [PATCH v2 4/7] docker: print warning if EXECUTABLE is not set when building debootstrap image

2016-08-24 Thread Sascha Silbe
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: Sascha Silbe --- tests/docker/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/te

[Qemu-devel] [PATCH v2 7/7] docker: silence debootstrap when --quiet is given

2016-08-24 Thread Sascha Silbe
-off-by: Sascha Silbe --- tests/docker/docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index efb2bf4..b85c165 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -239,8 +239,9 @@ class BuildCommand

[Qemu-devel] [PATCH v2 0/7] docker tests fixes

2016-08-24 Thread Sascha Silbe
ode. v1→v2: - found a good place to stick the warning about EXECUTABLE - additional fixes for the debian-debootstrap image Sascha Silbe (7): docker.py: don't hang on large docker output docker: avoid dependency on 'realpath' package docker: debian-bootstrap.pre: print

[Qemu-devel] [PATCH v2 3/7] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-08-24 Thread Sascha Silbe
sing or erroring out because we cannot cd to the mirror URL. Signed-off-by: Sascha Silbe --- tests/docker/dockerfiles/debian-bootstrap.pre | 13 + 1 file changed, 13 insertions(+) diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstr

Re: [Qemu-devel] [PATCH for-2.7] wxx: Fix broken build (mkdtemp unavailable)

2016-08-23 Thread Sascha Silbe
Dear Stefan, Stefan Weil writes: > On 08/23/16 21:00, Sascha Silbe wrote: >> Stefan Weil writes: >> >>> Commit 50455700092412d90ffaf57ee5d00f38f7d1cc5b added new code which >>> does not compile for Windows. >> [...] >> This worked fine in my cr

Re: [Qemu-devel] [PATCH for-2.8] iotests: Do not rely on unavailable domains in 162

2016-08-23 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 2016-08-23 at 10:17, Sascha Silbe wrote: >> Max Reitz writes: [tests/qemu-iotests/162] >>> Good idea. We can just let the script generate a random port; >>> $(($RANDOM+32768)) should do the trick. >> >> Which will fail j

Re: [Qemu-devel] [PATCH for-2.7] wxx: Fix broken build (mkdtemp unavailable)

2016-08-23 Thread Sascha Silbe
lding qemu itself, but building test-logging should still be broken. Unlike some other tests, it isn't built on POSIX or Linux only. Did "make check" work before my patch in your environment? Sascha [1] http://www.gtk.org/download/windows.php [2] https://github.com/msys2/MINGW-

Re: [Qemu-devel] [PATCH for-2.8] iotests: Do not rely on unavailable domains in 162

2016-08-23 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 2016-08-23 at 07:44, Sascha Silbe wrote: >> Max Reitz writes: [tests/qemu-iotests/162] >> Using a fixed port number means multiple users won't be able to run this >> in parallel. That it's only open for a short time actually ma

Re: [Qemu-devel] [PATCH 0/3] docker tests fixes

2016-08-23 Thread Sascha Silbe
Dear Alex, Alex Bennée writes: > Sascha Silbe writes: > >> A couple of fixes for issues encountered while trying out the new >> docker test support. The debian-bootstrap image still doesn't build >> for me, but that's a problem for another day. > > Can

Re: [Qemu-devel] [PATCH v2 1/2] glib: add compatibility implementation for g_dir_make_tmp()

2016-08-23 Thread Sascha Silbe
valid identifiers even for external C language linkage names; there's only an exception for attributes, not for non-C++ language linkage. [From second mail] > Applied to master (with minor fixup to patch 1); thanks. Thanks! Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH for-2.8] iotests: Do not rely on unavailable domains in 162

2016-08-23 Thread Sascha Silbe
ally makes the issue a bit worse as it's hard to understand just why the test failed intermittently. Is there a way to have qemu-nbd use a random port and print the port number? Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH 3/3] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-08-18 Thread Sascha Silbe
sing or erroring out because we cannot cd to the mirror URL. Signed-off-by: Sascha Silbe --- I haven't figured out a good way to warn about qemu-user-* being missing because EXECUTABLE isn't set. debian-bootstrap.pre runs before docker.py copies the executable so I cannot check in de

[Qemu-devel] [PATCH 2/3] docker: avoid dependency on 'realpath' package

2016-08-18 Thread Sascha Silbe
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe -

[Qemu-devel] [PATCH 0/3] docker tests fixes

2016-08-18 Thread Sascha Silbe
lib < 2.30 compatibility code. Sascha Silbe (3): docker.py: don't hang on large docker output docker: avoid dependency on 'realpath' package docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset tests/docker/Makefile.include |

[Qemu-devel] [PATCH 1/3] docker.py: don't hang on large docker output

2016-08-18 Thread Sascha Silbe
this issue. Signed-off-by: Sascha Silbe --- This fixes a hang for me when building the Ubuntu docker image (empty docker image cache). tests/docker/docker.py | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 222a105..efb2

[Qemu-devel] [PATCH v2 1/2] glib: add compatibility implementation for g_dir_make_tmp()

2016-08-18 Thread Sascha Silbe
Signed-off-by: Sascha Silbe --- v1→v2: - new patch include/glib-compat.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index 01aa7b3..de64ac2 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -48,

[Qemu-devel] [PATCH v2 2/2] test-logging: don't hard-code paths in /tmp

2016-08-18 Thread Sascha Silbe
n attacker to overwrite files that are writable to the developer running "make check". Instead of hard-coding the paths, create a temporary directory using g_dir_make_tmp() and clean it up afterwards. Fixes: f6880b7f ("qemu-log: support simple pid substitution for logs") Signed-o

[Qemu-devel] [PATCH for-v2.7 v2 0/2] test-logging: don't hard-code paths in /tmp

2016-08-18 Thread Sascha Silbe
onal fixup required to land this in rc4; I might not be around again until Tuesday. Sascha Silbe (2): glib: add compatibility implementation for g_dir_make_tmp() test-logging: don't hard-code paths in /tmp include/glib-compat.h | 21 + tests/test-

Re: [Qemu-devel] [PATCH] test-logging: don't hard-code paths in /tmp

2016-08-18 Thread Sascha Silbe
land in 2.8 so I wasn't in a hurry. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH] test-logging: don't hard-code paths in /tmp

2016-08-15 Thread Sascha Silbe
Dear Peter, Peter Maydell writes: > On 15 July 2016 at 17:24, Sascha Silbe wrote: [...] >> Instead of hard-coding the paths, create a temporary directory using >> g_dir_make_tmp() and clean it up afterwards. >> >> Fixes: f6880b7f ("qemu-log: support simple pid s

Re: [Qemu-devel] [PATCH 2/2] iotests: fix 109

2016-08-04 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 03.08.2016 17:22, Sascha Silbe wrote: [...] >> What are the exact semantics of the "offset" field for >> BLOCK_JOB_COMPLETED? >> >> docs/qmp-events.txt is rather vague. As an API consumer I'd have assumed >>

Re: [Qemu-devel] [PATCH 2/2] iotests: fix 109

2016-08-03 Thread Sascha Silbe
e": "src", "len": 2560, "offset": > OFFSET, "speed": 0, "type": "mirror", "error": "Operation not permitted"}} What are the exact semantics of the "offset" field for BLOCK_JOB_COMPLETED? docs/qmp-events.txt is rather vague. As an API consumer I'd have assumed that everything up to offset has been completed successfully. If that interpretation is correct, offset must be 0 for this test because the very first sector wasn't mirrored successfully. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved

2016-07-28 Thread Sascha Silbe
propagate(), error_setg_file_open(), error_set() preserve errno. Optionally also the other functions listed in include/qapi/error.h and include/qemu/error-report.h. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-27 Thread Sascha Silbe
Dear Markus, Markus Armbruster writes: > Sascha Silbe writes: > >> As a general policy, we want callers to save errno >> themselves. error_setg_internal() currently goes out of its way to >> preserve errno, > > In other words, "error_setg_errno(): errno may

[Qemu-devel] [PATCH] error: error_setg_errno(): errno gets preserved

2016-07-27 Thread Sascha Silbe
. error_setg_errno() already takes care of preserving errno and some functions rely on that, so just promise that we continue to do so in the future. Signed-off-by: Sascha Silbe --- Alternative approach to "error: error_setg_errno(): errno may be clobbered" [1]. [1] mid:1469558699-23314-

Re: [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open

2016-07-26 Thread Sascha Silbe
gt; > Thanks, that sounds good to me. Great, sent out as a patch [1]. Sascha [1] mid:1469558699-23314-1-git-send-email-si...@linux.vnet.ibm.com "[PATCH] error: error_setg_errno(): errno may be clobbered" by Sascha Silbe , sent on 2016-07-26. -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH] error: error_setg_errno(): errno may be clobbered

2016-07-26 Thread Sascha Silbe
want to make that promise. Signed-off-by: Sascha Silbe --- This came up during review of Halil's patch "block: improve error handling in raw_open" [1]. [1] mid:1469532873-78542-1-git-send-email-pa...@linux.vnet.ibm.com "[Qemu-devel] [PATCH v2 1/1] block: improve error han

Re: [Qemu-devel] [PATCH v2 1/1] block: improve error handling in raw_open

2016-07-26 Thread Sascha Silbe
(os_error), (fmt), ## __VA_ARGS__) (I can prepare a proper patch if you agree with the above.) Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH] test-logging: don't hard-code paths in /tmp

2016-07-15 Thread Sascha Silbe
n attacker to overwrite files that are writable to the developer running "make check". Instead of hard-coding the paths, create a temporary directory using g_dir_make_tmp() and clean it up afterwards. Fixes: f6880b7f ("qemu-log: support simple pid substitution for logs"

Re: [Qemu-devel] [PATCH 1/1] Improve block job rate limiting for small bandwidth values

2016-07-05 Thread Sascha Silbe
gt; On 04.07.2016 16:30, Sascha Silbe wrote: >> Max Reitz writes: [...] [include/qemu/ratelimit.h] >>>> static inline int64_t ratelimit_calculate_delay(RateLimit *limit, >>>> uint64_t n) >>>> { >>>> int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REA

Re: [Qemu-devel] [PATCH RFC v3 1/5] tests: New make target check-source

2016-07-05 Thread Sascha Silbe
; +/* FIXME Does not pass make check-headers, yet! */ Probably never will. Looks like it's meant to be included only by some magic preprocessor code. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH] quorum: Only compile when supported

2016-07-05 Thread Sascha Silbe
Dear Alberto, Alberto Garcia writes: > On Tue 05 Jul 2016 09:58:25 AM CEST, Sascha Silbe wrote: > >> The quorum driver needs SHA256 which was introduced in gnutls 2.11.1. > > Are you sure about that? > > * Version 1.7.4 (released 2007-02-05) > > [...] &g

Re: [Qemu-devel] [PATCH] quorum: Only compile when supported

2016-07-05 Thread Sascha Silbe
present. You should either bump the version in configure or add an explicit configure check for SHA256. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH 1/1] Improve block job rate limiting for small bandwidth values

2016-07-04 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 28.06.2016 17:28, Sascha Silbe wrote: [block/mirror.c] >> @@ -416,7 +416,9 @@ static uint64_t coroutine_fn >> mirror_iteration(MirrorBlockJob *s) >> assert(io_sectors); >> sector_num += io_sectors; >>

Re: [Qemu-devel] [PATCH RFC] fixup! tests: New make target check-source

2016-07-04 Thread Sascha Silbe
ll all the latest experimental dependencies, fewer submitters will use it. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH RFC] fixup! tests: New make target check-source

2016-06-30 Thread Sascha Silbe
No such file or directory #include ^ compilation terminated. make: *** [tests/headers/include/ui/shader.o] Error 1 rm tests/headers/include/ui/shader.c $ grep OPENGL config-host.* Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg htt

[Qemu-devel] [PATCH 1/1] Improve block job rate limiting for small bandwidth values

2016-06-28 Thread Sascha Silbe
anely loaded systems. Signed-off-by: Sascha Silbe --- block/commit.c | 13 + block/mirror.c | 4 +++- block/stream.c | 12 include/qemu/ratelimit.h | 43 ++- 4 files changed, 46 insertions(+), 26 dele

[Qemu-devel] [PATCH 0/1] Fix iotests race condition by fixing block job rate limiting

2016-06-28 Thread Sascha Silbe
their own rate limiting implementation. There was some hope [1] this would land in 2.7, but since it's not in master yet (at least as of commit a01aef5d) I prepared an alternative fix that can go into 2.7. Sascha Silbe (1): Improve block job rate limiting for small bandwidth values bloc

Re: [Qemu-devel] [PATCH RFC v2 0/5] Baby steps towards saner headers

2016-06-27 Thread Sascha Silbe
quot;. Still no dice. The egrep error messages don't occur when running "make check-source" after a full "make" run, but the audio.o error still happens: $ make check-source make: *** No rule to make target `tests/headers/audio/audio.o', needed by `check-headers'. Stop. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH RFC v2 0/5] Baby steps towards saner headers

2016-06-27 Thread Sascha Silbe
make target `tests/headers/audio/audio.o', needed by `check-headers'. Stop. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] Channel paths

2016-06-07 Thread Sascha Silbe
Dear Daniel, [CC += libvir-list, didn't notice before this thread is on qemu-devel only] "Daniel P. Berrange" writes: > On Thu, Jun 02, 2016 at 09:27:45PM +0200, Sascha Silbe wrote: >> Since 71408079 [qemu: Don't bother user with libvirt-internal paths], >&g

[Qemu-devel] Channel paths (was: Re: [RFC Patch 0/3] Accept passed in socket 'fd' open from outside for unix socket)

2016-06-02 Thread Sascha Silbe
that anything outside /var/lib/libvirt/qemu is not guaranteed to work due to e.g. the SELinux policy configured by libvirt... Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ

2016-06-02 Thread Sascha Silbe
ameter will be unused anyway. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-20 Thread Sascha Silbe
Dear Kevin, Kevin Wolf writes: > At this point in the 2.6 release cycle, this series is 2.7 material > anyway. It's critical fixes only now. Fair enough. Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-20 Thread Sascha Silbe
nvironment variables must be set and there may be other things that the tests may expect to have been set up. See what the 'check' script does if you want to invoke the tests some other way than running 'check'.", but I don't really see the additional value to the user. S

Re: [Qemu-devel] [for-2.6] Re: [PATCH] qmp-commands.hx: document minimum speed for block jobs

2016-04-19 Thread Sascha Silbe
nding review). OK, thanks for the clarification! Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH for-2.6? v2] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
" anyway, including setting the two environment variables we check. Whereas a regular developer just trying to invoke the tests usually won't have both of these defined in their environment so we can catch their mistake and give out useful advice. Signed-off-by: Sascha Silbe Reviewed-by: Bo

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 19.04.2016 14:22, Sascha Silbe wrote: [...] >> # We are using TEST_DIR and QEMU_DEFAULT_MACHINE as proxies to >> # indicate that we're not being run via "check". There may be >> # other things set up by &qu

Re: [Qemu-devel] [for-2.6] Re: [PATCH] qmp-commands.hx: document minimum speed for block jobs

2016-04-19 Thread Sascha Silbe
Interesting. What exactly is the relationship between qmp-commands.hx and qapi/block-core.json? At any rate, you're right that we should update both. See v2. (And I've forgot the for-2.6 prefix for the patch itself again. Bah.) Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraß

[Qemu-devel] [PATCH v2] QMP: document minimum speed for block jobs

2016-04-19 Thread Sascha Silbe
document it. Mention that this will be fixed in the future, otherwise some users might misguidedly rely on it or clamp their configuration settings to the documented value. Signed-off-by: Sascha Silbe --- v1→v2: - Change qapi/block-core.json, too. --- qapi/block-core.json | 36

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
y could even set an environment variable "I_AM_CHECK=yes" if that's part of the environment the tests expect). I'd be perfectly fine with defining the environment more clearly and possibly extending the implementation to allow individual test cases to be invoked di

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 14.04.2016 13:32, Sascha Silbe wrote: [tests/qemu-iotests/iotests.py] [...] >> def main(supported_fmts=[], supported_oses=['linux']): >> '''Run tests''' >> >> +if test_dir is None o

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-19 Thread Sascha Silbe
es that indicate we haven't been run via "check". They are the ones where there isn't any useful default value we could fall back, but without a full audit we can't tell what else some of the tests may expect that would normally be set up by "check" (or at least I can't). Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

Re: [Qemu-devel] [PATCH for-2.6 0/4] qemu-iotests: don't use /tmp

2016-04-14 Thread Sascha Silbe
Dear Max, Max Reitz writes: [...] > Thanks Sascha, I applied the series to my block tree: Thanks! I've just sent out the last patch from my local queue (fixing =/var/tmp= usage). Barring further discoveries during testing, I'm done for 2.6 now. Sascha -- Softwareentwicklung

[Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-14 Thread Sascha Silbe
code paths if QEMU_DEFAULT_MACHINE is not set. This can lead to false negatives. Instead fail hard and tell the user we want to be run via "check". Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu --- It's possible to fix iotests.py to work even outside of check, but that requires

[Qemu-devel] [for-2.6] Re: [PATCH] qmp-commands.hx: document minimum speed for block jobs

2016-04-14 Thread Sascha Silbe
Dear developers, Sascha Silbe writes: > The current rate limit implementation for block jobs is ineffective > below a certain minimum rate. It will permit writes at least once per > time slice. The resulting minimum write speed (assuming source and > sink are fast enough in the fir

[Qemu-devel] [PATCH] qmp-commands.hx: document minimum speed for block jobs

2016-04-12 Thread Sascha Silbe
document it. Mention that this will be fixed in the future, otherwise some users might misguidedly rely on it or clamp their configuration settings to the documented value. Signed-off-by: Sascha Silbe --- Noticed this while figuring out why qemu-iotests #141 failed on one of my systems. I for one

[Qemu-devel] [PATCH 3/4] qemu-iotests: tests: do not set unused tmp variable

2016-04-12 Thread Sascha Silbe
The previous commit removed the last usage of ${tmp} inside the tests themselves; the only remaining users are sourced by check. So we can now drop this variable from the tests. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu --- tests/qemu-iotests/001 | 1 - tests/qemu-iotests/002 | 1 - tests

[Qemu-devel] [PATCH for-2.6 0/4] qemu-iotests: don't use /tmp

2016-04-12 Thread Sascha Silbe
separate patch. This series mostly removes dead code and addresses a potential security issue, all of that in the test suite rather than in production code. It should be applicable even during hard freeze. Sascha Silbe (4): qemu-iotests: drop unused _within_tolerance() filter qemu-iotests:

[Qemu-devel] [PATCH 4/4] qemu-iotests: place valgrind log file in scratch dir

2016-04-12 Thread Sascha Silbe
Do not place the valgrind log file at a predictable path in a world-writable location. Use the common scratch directory (${TEST_DIR}) instead. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu --- tests/qemu-iotests/common.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH 1/4] qemu-iotests: drop unused _within_tolerance() filter

2016-04-12 Thread Sascha Silbe
_within_tolerance() isn't used anymore and possibly creates temporary files at predictable, world-writable locations. Get rid of it. If it's needed again in the future it can be revived easily and fixed up to use TEST_DIR and / or safely created temporary files. Signed-off-by: Sa

[Qemu-devel] [PATCH 2/4] qemu-iotests: common.rc: drop unused _do()

2016-04-12 Thread Sascha Silbe
_do() was never used and possibly creates temporary files at predictable, world-writable locations. Get rid of it. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu --- tests/qemu-iotests/common.rc | 46 1 file changed, 46 deletions(-) diff --git a

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] next round of qemu-iotests fixes

2016-04-08 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 05.04.2016 11:21, Sascha Silbe wrote: >> With these fixes, qemu-iotests complete successfully on my test >> systems (s390x, x86_64) when used with QCOW2 or raw image formats. >> >> These are purely bug fixes for tests and most are tr

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Sascha Silbe
Dear Kevin, Kevin Wolf writes: > Am 08.04.2016 um 14:01 hat Sascha Silbe geschrieben: [...] >> The best approach probably would be to fix up the rate limit code to >> delay for multiple time slices if necessary. We should get rid of the >> artificial BDRV_SECTOR_SIZE gr

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Sascha Silbe
Dear Max, Sascha Silbe writes: > @Max: From a cursory glance at the code, maybe your 1 *byte* per second > rate limit is being rounded down to 0 *blocks* per second, with 0 > meaning no limit? See e.g. mirror_set_speed(). Though I must admit I > don't understand how spee

Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] qemu-iotests: iotests.VM: remove qtest socket on error

2016-04-07 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 05.04.2016 11:21, Sascha Silbe wrote: [...] [_remove_if_exists()] > Not sure about the leading underscore (it appears to be the only such > function in iotests.py besides __init__()), but I guess it's a test so > it doesn't really matter an

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-07 Thread Sascha Silbe
Dear Max, Max Reitz writes: > On 05.04.2016 11:21, Sascha Silbe wrote: >> On systems with fast IO, qemu-io may write more than 1 MiB before >> receiving the block-job-cancel command, causing the test case to fail. >> >> 141 is inherently racy, but we can at least r

Re: [Qemu-devel] [Qemu-block] [PATCH 1/7] qemu-iotests: check: don't place files with predictable names in /tmp

2016-04-07 Thread Sascha Silbe
hanks for the reviews! Sascha -- Softwareentwicklung Sascha Silbe, Niederhofenstraße 5/1, 71229 Leonberg https://se-silbe.de/ USt-IdNr. DE281696641

[Qemu-devel] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-05 Thread Sascha Silbe
just replace it with a fixed value globally (in _filter_qmp), the same way we handle timestamps. Signed-off-by: Sascha Silbe Reviewed-by: Bo Tu --- tests/qemu-iotests/141 | 11 ++- tests/qemu-iotests/141.out | 24 tests/qemu-iotests/common.filter

[Qemu-devel] [PATCH 0/7] next round of qemu-iotests fixes

2016-04-05 Thread Sascha Silbe
With these fixes, qemu-iotests complete successfully on my test systems (s390x, x86_64) when used with QCOW2 or raw image formats. These are purely bug fixes for tests and most are trivial, so they should be safe even for hard freeze. Sascha Silbe (7): qemu-iotests: check: don't place

  1   2   >