Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-06 Thread Paolo Bonzini
On 04/04/2018 04:51, Fam Zheng wrote:
> Docker testing on patchew has long suffered from 'make check' hangings. The
> cleanness of VM testing is the cure. Now let's add a CentOS 7 image to run the
> tests.  It's purely ad-hoc, but hopefully still easy to understand and use for
> everyone.
> 
> The first patch makes passing source code from host to the container in VM
> working, and is a nice clean up.
> 
> The second patch makes caches work, to speed up repetitive runs like on
> patchew.
> 
> The last patch adds the new image that does the job. Two out of three docker
> tests running on patchew.org are added to the image. I'll wait for Peter to 
> fix
> the 'docker-test-quick@centos6' hanging (oob test) before adding it too.

I think it's a good idea.  The tests are the same as before, only the
environment is more self-contained.

Paolo

> Fam
> 
> Fam Zheng (3):
>   archive-source.sh: Drop submodule code
>   tests: Add an option for snapshot (default: off)
>   tests: Add centos VM testing
> 
>  scripts/archive-source.sh | 47 +++
>  tests/vm/basevm.py|  7 +++-
>  tests/vm/centos   | 82 
> +++
>  3 files changed, 92 insertions(+), 44 deletions(-)
>  create mode 100755 tests/vm/centos
> 




Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-04 Thread Fam Zheng
On Wed, 04/04 09:19, Daniel P. Berrangé wrote:
> On Wed, Apr 04, 2018 at 10:51:58AM +0800, Fam Zheng wrote:
> > Docker testing on patchew has long suffered from 'make check' hangings. The
> > cleanness of VM testing is the cure. Now let's add a CentOS 7 image to run 
> > the
> > tests.  It's purely ad-hoc, but hopefully still easy to understand and use 
> > for
> > everyone.
> 
> If our automated tests are hanging, then developers could hit those hangs
> to, and depending on where the problem is, end users could hit the hangs
> in production deployment.
> 
> IOW, hangs in the testing aren't something we should just hide away by
> changing the way we run tests - we need to identify & fix the hangs.

This will not hide anything. It just helps how we clean up everything
(especially the hanging test process in patchew) when timeout, and doesn't
affect how we identify and report timeouts.

Fam



Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-04 Thread Daniel P . Berrangé
On Wed, Apr 04, 2018 at 10:51:58AM +0800, Fam Zheng wrote:
> Docker testing on patchew has long suffered from 'make check' hangings. The
> cleanness of VM testing is the cure. Now let's add a CentOS 7 image to run the
> tests.  It's purely ad-hoc, but hopefully still easy to understand and use for
> everyone.

If our automated tests are hanging, then developers could hit those hangs
to, and depending on where the problem is, end users could hit the hangs
in production deployment.

IOW, hangs in the testing aren't something we should just hide away by
changing the way we run tests - we need to identify & fix the hangs.

Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-04 Thread Peter Xu
On Wed, Apr 04, 2018 at 01:03:47PM +0800, Peter Xu wrote:
> On Wed, Apr 04, 2018 at 10:51:58AM +0800, Fam Zheng wrote:
> > Docker testing on patchew has long suffered from 'make check' hangings. The
> > cleanness of VM testing is the cure. Now let's add a CentOS 7 image to run 
> > the
> > tests.  It's purely ad-hoc, but hopefully still easy to understand and use 
> > for
> > everyone.
> > 
> > The first patch makes passing source code from host to the container in VM
> > working, and is a nice clean up.
> > 
> > The second patch makes caches work, to speed up repetitive runs like on
> > patchew.
> > 
> > The last patch adds the new image that does the job. Two out of three docker
> > tests running on patchew.org are added to the image. I'll wait for Peter to 
> > fix
> > the 'docker-test-quick@centos6' hanging (oob test) before adding it too.
> 
> This hang does not happen on centos7 (tested myself manually).  I
> consider this can be related to different default versions of glib2:
> 
> centos6: glib2-2.28.8-9.el6.x86_64
> centos7: glib2-2.50.3-3.el7.x86_64
> 
> (both fetched from docker.io)
> 
> qmp-test hangs at oob-test, while QEMU failed to respond to SIGTERM
> when trying to take a lock:
> 
> #0  0x7f18eed02334 in __lll_lock_wait () from /lib64/libpthread.so.0
> #1  0x7f18eecfd5d8 in _L_lock_854 () from /lib64/libpthread.so.0
> #2  0x7f18eecfd4a7 in pthread_mutex_lock () from /lib64/libpthread.so.0
> #3  0x7f18eb476c9d in ?? () from /lib64/libglib-2.0.so.0
> #4  0x00aa6672 in aio_context_unref (ctx=0x225b600) at 
> /root/qemu/util/async.c:497
> #5  0x0065851c in iothread_instance_finalize (obj=0x225b380) at 
> /root/qemu/iothread.c:129
> #6  0x00962d79 in object_deinit (obj=0x225b380, type=0x2199960) at 
> /root/qemu/qom/object.c:462
> #7  0x00962e0d in object_finalize (data=0x225b380) at 
> /root/qemu/qom/object.c:476
> #8  0x00964146 in object_unref (obj=0x225b380) at 
> /root/qemu/qom/object.c:924
> #9  0x00965880 in object_finalize_child_property (obj=0x2257640, 
> name=0x225aca0 "mon_iothread", opaque=0x225b380) at 
> /root/qemu/qom/object.c:1436
> #10 0x00962c33 in object_property_del_child (obj=0x2257640, 
> child=0x225b380, errp=0x0) at /root/qemu/qom/object.c:436
> #11 0x00962d26 in object_unparent (obj=0x225b380) at 
> /root/qemu/qom/object.c:455
> #12 0x00658f00 in iothread_destroy (iothread=0x225b380) at 
> /root/qemu/iothread.c:365
> #13 0x004c67a8 in monitor_cleanup () at /root/qemu/monitor.c:4663
> #14 0x00669e27 in main (argc=16, argv=0x7ffe33ce3a08, 
> envp=0x7ffe33ce3a90) at /root/qemu/vl.c:4749
> 
> Currently I have no quick idea on why the lock was held by anyone
> else (I suppose that's the GMainContext's lock), and I'm not sure
> whether it could be a glib bug.

I posted a patch for this to workaround the possible glib bug:

  [PATCH for-2.12] iothread: workaround glib bug which hangs qmp-test

Let's see whether we can accept that.  Thanks,

-- 
Peter Xu



Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-03 Thread Peter Xu
On Wed, Apr 04, 2018 at 10:51:58AM +0800, Fam Zheng wrote:
> Docker testing on patchew has long suffered from 'make check' hangings. The
> cleanness of VM testing is the cure. Now let's add a CentOS 7 image to run the
> tests.  It's purely ad-hoc, but hopefully still easy to understand and use for
> everyone.
> 
> The first patch makes passing source code from host to the container in VM
> working, and is a nice clean up.
> 
> The second patch makes caches work, to speed up repetitive runs like on
> patchew.
> 
> The last patch adds the new image that does the job. Two out of three docker
> tests running on patchew.org are added to the image. I'll wait for Peter to 
> fix
> the 'docker-test-quick@centos6' hanging (oob test) before adding it too.

This hang does not happen on centos7 (tested myself manually).  I
consider this can be related to different default versions of glib2:

centos6: glib2-2.28.8-9.el6.x86_64
centos7: glib2-2.50.3-3.el7.x86_64

(both fetched from docker.io)

qmp-test hangs at oob-test, while QEMU failed to respond to SIGTERM
when trying to take a lock:

#0  0x7f18eed02334 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x7f18eecfd5d8 in _L_lock_854 () from /lib64/libpthread.so.0
#2  0x7f18eecfd4a7 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x7f18eb476c9d in ?? () from /lib64/libglib-2.0.so.0
#4  0x00aa6672 in aio_context_unref (ctx=0x225b600) at 
/root/qemu/util/async.c:497
#5  0x0065851c in iothread_instance_finalize (obj=0x225b380) at 
/root/qemu/iothread.c:129
#6  0x00962d79 in object_deinit (obj=0x225b380, type=0x2199960) at 
/root/qemu/qom/object.c:462
#7  0x00962e0d in object_finalize (data=0x225b380) at 
/root/qemu/qom/object.c:476
#8  0x00964146 in object_unref (obj=0x225b380) at 
/root/qemu/qom/object.c:924
#9  0x00965880 in object_finalize_child_property (obj=0x2257640, 
name=0x225aca0 "mon_iothread", opaque=0x225b380) at /root/qemu/qom/object.c:1436
#10 0x00962c33 in object_property_del_child (obj=0x2257640, 
child=0x225b380, errp=0x0) at /root/qemu/qom/object.c:436
#11 0x00962d26 in object_unparent (obj=0x225b380) at 
/root/qemu/qom/object.c:455
#12 0x00658f00 in iothread_destroy (iothread=0x225b380) at 
/root/qemu/iothread.c:365
#13 0x004c67a8 in monitor_cleanup () at /root/qemu/monitor.c:4663
#14 0x00669e27 in main (argc=16, argv=0x7ffe33ce3a08, 
envp=0x7ffe33ce3a90) at /root/qemu/vl.c:4749

Currently I have no quick idea on why the lock was held by anyone
else (I suppose that's the GMainContext's lock), and I'm not sure
whether it could be a glib bug.

-- 
Peter Xu



Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-03 Thread no-reply
Hi,

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

Type: series
Message-id: 20180404025201.11921-1-f...@redhat.com
Subject: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
time make docker-test-mingw@fedora
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
99d3cb1498 tests: Add centos VM testing
a2d747b22b tests: Add an option for snapshot (default: off)
9410826528 archive-source.sh: Drop submodule code

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-d015hcwx/src/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
  BUILD   fedora
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-d015hcwx/src'
  GEN 
/var/tmp/patchew-tester-tmp-d015hcwx/src/docker-src.2018-04-03-22.58.48.13379/qemu.tar
  COPYRUNNER
RUN test-mingw in qemu:fedora 
Packages installed:
PyYAML-3.12-5.fc27.x86_64
SDL-devel-1.2.15-29.fc27.x86_64
bc-1.07.1-3.fc27.x86_64
bison-3.0.4-8.fc27.x86_64
bzip2-1.0.6-24.fc27.x86_64
ccache-3.3.6-1.fc27.x86_64
clang-5.0.1-3.fc27.x86_64
findutils-4.6.0-16.fc27.x86_64
flex-2.6.1-5.fc27.x86_64
gcc-7.3.1-5.fc27.x86_64
gcc-c++-7.3.1-5.fc27.x86_64
gettext-0.19.8.1-12.fc27.x86_64
git-2.14.3-3.fc27.x86_64
glib2-devel-2.54.3-2.fc27.x86_64
hostname-3.18-4.fc27.x86_64
libaio-devel-0.3.110-9.fc27.x86_64
libasan-7.3.1-5.fc27.x86_64
libfdt-devel-1.4.6-1.fc27.x86_64
libubsan-7.3.1-5.fc27.x86_64
llvm-5.0.1-3.fc27.x86_64
make-4.2.1-4.fc27.x86_64
mingw32-SDL-1.2.15-9.fc27.noarch
mingw32-bzip2-1.0.6-9.fc27.noarch
mingw32-curl-7.54.1-2.fc27.noarch
mingw32-glib2-2.54.1-1.fc27.noarch
mingw32-gmp-6.1.2-2.fc27.noarch
mingw32-gnutls-3.5.13-2.fc27.noarch
mingw32-gtk2-2.24.31-4.fc27.noarch
mingw32-gtk3-3.22.16-1.fc27.noarch
mingw32-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw32-libpng-1.6.29-2.fc27.noarch
mingw32-libssh2-1.8.0-3.fc27.noarch
mingw32-libtasn1-4.13-1.fc27.noarch
mingw32-nettle-3.3-3.fc27.noarch
mingw32-pixman-0.34.0-3.fc27.noarch
mingw32-pkg-config-0.28-9.fc27.x86_64
mingw64-SDL-1.2.15-9.fc27.noarch
mingw64-bzip2-1.0.6-9.fc27.noarch
mingw64-curl-7.54.1-2.fc27.noarch
mingw64-glib2-2.54.1-1.fc27.noarch
mingw64-gmp-6.1.2-2.fc27.noarch
mingw64-gnutls-3.5.13-2.fc27.noarch
mingw64-gtk2-2.24.31-4.fc27.noarch
mingw64-gtk3-3.22.16-1.fc27.noarch
mingw64-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw64-libpng-1.6.29-2.fc27.noarch
mingw64-libssh2-1.8.0-3.fc27.noarch
mingw64-libtasn1-4.13-1.fc27.noarch
mingw64-nettle-3.3-3.fc27.noarch
mingw64-pixman-0.34.0-3.fc27.noarch
mingw64-pkg-config-0.28-9.fc27.x86_64
nettle-devel-3.4-1.fc27.x86_64
perl-5.26.1-403.fc27.x86_64
pixman-devel-0.34.0-4.fc27.x86_64
python3-3.6.2-13.fc27.x86_64
sparse-0.5.1-2.fc27.x86_64
tar-1.29-7.fc27.x86_64
which-2.21-4.fc27.x86_64
zlib-devel-1.2.11-4.fc27.x86_64

Environment variables:
TARGET_LIST=
PACKAGES=ccache gettext git tar PyYAML sparse flex bison python3 bzip2 hostname 
glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel gcc gcc-c++ 
llvm clang make perl which bc findutils libaio-devel nettle-devel libasan 
libubsan mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL 
mingw32-pkg-config mingw32-gtk2 mingw32-gtk3 mingw32-gnutls mingw32-nettle 
mingw32-libtasn1 mingw32-libjpeg-turbo mingw32-libpng mingw32-curl 
mingw32-libssh2 mingw32-bzip2 mingw64-pixman mingw64-glib2 mingw64-gmp 
mingw64-SDL mingw64-pkg-config mingw64-gtk2 mingw64-gtk3 mingw64-gnutls 
mingw64-nettle mingw64-libtasn1 mingw64-libjpeg-turbo mingw64-libpng 
mingw64-curl mingw64-libssh2 mingw64-bzip2
J=8
V=
HOSTNAME=79564714ea88
DEBUG=
SHOW_ENV=1
PWD=/
HOME=/root
CCACHE_DIR=/var/tmp/ccache
DISTTAG=f27container
QEMU_CONFIGURE_OPTS=--python=/usr/bin/python3
FGC=f27
TEST_DIR=/tmp/qemu-test
SHLVL=1
FEATURES=mingw clang pyyaml asan dtc
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
MAKEFLAGS= -j8
EXTRA_CONFIGURE_OPTS=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu 
--prefix=/tmp/qemu-test/install --python=/usr/bin/python3 
--cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple 
--enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 
--enable-guest-agent --with-sdlabi=1.2 --with-gtkabi=2.0
Install prefix/tmp/qemu-test/install
BIOS directory/tmp/qemu-test/install
firmware path /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install
library directory /tmp/qemu-test/install/lib
module directory  /tmp/qemu-test/install/lib
libexec directory /tmp/qemu-test/install/libexec
include directory 

Re: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

2018-04-03 Thread no-reply
Hi,

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

Type: series
Message-id: 20180404025201.11921-1-f...@redhat.com
Subject: [Qemu-devel] [PATCH 0/3] Add a CentOS test image to run docker tests

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
time make docker-test-build@min-glib
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
99d3cb1498 tests: Add centos VM testing
a2d747b22b tests: Add an option for snapshot (default: off)
9410826528 archive-source.sh: Drop submodule code

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-_g2ozc9x/src/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
  BUILD   min-glib
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-_g2ozc9x/src'
  GEN 
/var/tmp/patchew-tester-tmp-_g2ozc9x/src/docker-src.2018-04-03-23.02.08.16350/qemu.tar
  COPYRUNNER
RUN test-build in qemu:min-glib 
Environment variables:
HOSTNAME=c7583a32ef00
MAKEFLAGS= -j8
J=8
CCACHE_DIR=/var/tmp/ccache
EXTRA_CONFIGURE_OPTS=
V=
SHOW_ENV=1
PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/
TARGET_LIST=
SHLVL=1
HOME=/root
TEST_DIR=/tmp/qemu-test
FEATURES= dtc
DEBUG=
_=/usr/bin/env

Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu 
--prefix=/tmp/qemu-test/install
No C++ compiler available; disabling C++ specific optional code
Install prefix/tmp/qemu-test/install
BIOS directory/tmp/qemu-test/install/share/qemu
firmware path /tmp/qemu-test/install/share/qemu-firmware
binary directory  /tmp/qemu-test/install/bin
library directory /tmp/qemu-test/install/lib
module directory  /tmp/qemu-test/install/lib/qemu
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory  /tmp/qemu-test/install/etc
local state directory   /tmp/qemu-test/install/var
Manual directory  /tmp/qemu-test/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path   /tmp/qemu-test/src
GIT binarygit
GIT submodulesui/keycodemapdb dtc capstone
C compilercc
Host C compiler   cc
C++ compiler  
Objective-C compiler cc
ARFLAGS   rv
CFLAGS-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g 
QEMU_CFLAGS   -I/usr/include/pixman-1   -I$(SRC_PATH)/dtc/libfdt -pthread 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -fPIE -DPIE -m64 -mcx16 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes 
-fno-strict-aliasing -fno-common -fwrapv  -Wendif-labels 
-Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security 
-Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration 
-Wold-style-definition -Wtype-limits -fstack-protector-all -Wno-missing-braces 
-I$(SRC_PATH)/capstone/include
LDFLAGS   -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
make  make
install   install
pythonpython -B
smbd  /usr/sbin/smbd
module supportno
host CPU  x86_64
host big endian   no
target list   x86_64-softmmu aarch64-softmmu
gprof enabled no
sparse enabledno
strip binariesyes
profiler  no
static build  no
SDL support   yes (1.2.14)
GTK support   no 
GTK GL supportno
VTE support   no 
TLS priority  NORMAL
GNUTLS supportno
GNUTLS rndno
libgcrypt no
libgcrypt kdf no
nettleno 
nettle kdfno
libtasn1  no
curses supportno
virgl support no
curl support  no
mingw32 support   no
Audio drivers oss
Block whitelist (rw) 
Block whitelist (ro) 
VirtFS supportno
Multipath support no
VNC support   yes
VNC SASL support  no
VNC JPEG support  no
VNC PNG support   no
xen support   no
brlapi supportno
bluez  supportno
Documentation no
PIE   yes
vde support   no
netmap supportno
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support   yes
HAX support   no
HVF support   no
WHPX support  no
TCG support   yes
TCG debug enabled no
TCG interpreter   no
malloc trim support yes
RDMA support  no
fdt support   yes
membarrierno
preadv supportyes
fdatasync yes
madvise   yes
posix_madvise yes
posix_memalignyes
libcap-ng support no
vhost-net support yes
vhost-crypto support yes
vhost-scsi support yes
vhost-vsock support yes
vhost-user support yes
Trace backendslog
spice support no 
rbd support   no
xfsctl supportno
smartcard support no
libusb