diff --git a/0029-string-input-visitor-Fix-uint64-par.patch b/0029-string-input-visitor-Fix-uint64-par.patch index cc0a7817..d407b7c5 100644 --- a/0029-string-input-visitor-Fix-uint64-par.patch +++ b/0029-string-input-visitor-Fix-uint64-par.patch @@ -97,13 +97,13 @@ index 67a0a4a58b..1c73e5aeae 100644 + error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null", + "integer"); + return; -+ } + } + + parse_str(siv, name, true, errp); + + if (!siv->ranges) { + goto error; - } ++ } + + if (!siv->cur_range) { + Range *r; diff --git a/0030-test-string-input-visitor-Add-int-t.patch b/0030-test-string-input-visitor-Add-int-t.patch index f179fb24..fad79b6b 100644 --- a/0030-test-string-input-visitor-Add-int-t.patch +++ b/0030-test-string-input-visitor-Add-int-t.patch @@ -17,18 +17,18 @@ diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor index 79313a7f7a..e00194a649 100644 --- a/tests/test-string-input-visitor.c +++ b/tests/test-string-input-visitor.c -@@ -55,6 +55,14 @@ static void test_visitor_in_int(TestInputVisitorData *data, - - v = visitor_input_test_init(data, "-42"); - -+ visit_type_int(v, NULL, &res, &err); -+ g_assert(!err); -+ g_assert_cmpint(res, ==, value); +@@ -58,6 +58,14 @@ static void test_visitor_in_int(TestInputVisitorData *data, + visit_type_int(v, NULL, &res, &err); + g_assert(!err); + g_assert_cmpint(res, ==, value); + visitor_input_teardown(data, unused); + + value = INT64_MAX; + v = visitor_input_test_init(data, g_strdup_printf("%" PRId64, value)); + - visit_type_int(v, NULL, &res, &err); - g_assert(!err); - g_assert_cmpint(res, ==, value); ++ visit_type_int(v, NULL, &res, &err); ++ g_assert(!err); ++ g_assert_cmpint(res, ==, value); + + v = visitor_input_test_init(data, "not an int"); + diff --git a/qemu-supportconfig b/qemu-supportconfig new file mode 100644 index 00000000..0811113e --- /dev/null +++ b/qemu-supportconfig @@ -0,0 +1,78 @@ +#!/bin/bash +############################################################# +# Name: Supportconfig Plugin for QEMU/KVM +# Description: Gathers important troubleshooting information +# about QEMU +# Author: Jim Fehlig +############################################################# + +RCFILE="/usr/lib/supportconfig/resources/scplugin.rc" + +if [ -s $RCFILE ]; then + if ! source $RCFILE; then + echo "ERROR: Initializing resource file: $RCFILE" >&2 + exit 1 + fi +fi + +rpm_verify() { + thisrpm="$1" + local ret=0 + + echo + echo "#==[ Validating RPM ]=================================#" + if rpm -q "$thisrpm" >/dev/null 2>&1; then + echo "# rpm -V $thisrpm" + + if rpm -V "$thisrpm"; then + echo "Status: Passed" + else + echo "Status: WARNING" + fi + else + echo "package $thisrpm is not installed" + ret=1 + fi + echo + return $ret +} + +if ! rpm_verify qemu; then + echo "Skipped" + exit 0 +fi + +# skip if the host is xen +echo "#==[ Checking if booted Xen ]=================================#" +if [ -d /proc/xen ] && [ -e /proc/xen/capabilities ] && [ `cat /proc/xen/capabilities` = "control_d" ]; then + echo "Yes" + echo "Skipped" + exit 0 +else + echo "No" + echo +fi + +# basic system information +plugin_command "uname -r" +plugin_command "lscpu" +plugin_command "kvm_stat -1" +plugin_command "lsmod | grep ^kvm" +for MODULE in `lsmod | grep ^kvm | cut -d ' ' -f 1`; do + plugin_command "modinfo $MODULE" +done +plugin_command "ps -ef | grep qemu" + +# list contents of common config and image directories +plugin_command "ls -alR /var/lib/kvm/images/" + +# network-related info often useful for debugging +if [ systemctl is-enabled NetworkManager.service 2>&1 > /dev/null ]; then + echo "NOTE: NetworkManager should not be enabled on a KVM host" +fi +plugin_command "route -n" +plugin_command "arp -v" +plugin_command "ip link show type bridge" +plugin_command "bridge link show" + +echo "Done" diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 353272ce..addfedd6 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 31 18:34:27 UTC 2017 - jfehlig@suse.com + +- Add a supportconfig plugin + qemu-supportconfig + FATE#323661 + ------------------------------------------------------------------- Wed Aug 30 19:52:26 UTC 2017 - brogers@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index e208cf51..de704b7c 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -129,6 +129,7 @@ Source12: supported.x86.txt Source13: supported.s390.txt Source14: supported.arm.txt Source15: supported.ppc.txt +Source16: qemu-supportconfig # Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch # This patch queue is auto-generated from https://github.com/openSUSE/qemu Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch @@ -1201,6 +1202,9 @@ install -D -m 0644 %{SOURCE13} %{buildroot}%{_docdir}/qemu-s390/supported.txt install -D -m 0644 %{SOURCE14} %{buildroot}%{_docdir}/qemu-arm/supported.txt install -D -m 0644 %{SOURCE15} %{buildroot}%{_docdir}/qemu-ppc/supported.txt %endif +# install supportconfig plugin +mkdir -p %{buildroot}%{_libexecdir}/supportconfig/plugins +install -D -m 0755 %{SOURCE16} %{buildroot}%{_libexecdir}/supportconfig/plugins/qemu %if %{legacy_qemu_kvm} cat > %{buildroot}%{_bindir}/qemu-kvm << 'EOF' #!/bin/sh @@ -1363,6 +1367,9 @@ fi %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name %_datadir/%name/qemu-ifup +%dir %_libexecdir/supportconfig +%dir %_libexecdir/supportconfig/plugins +%_libexecdir/supportconfig/plugins/qemu %if %{kvm_available} %if 0%{?suse_version} <= 1320 %_bindir/kvm_stat diff --git a/qemu.changes b/qemu.changes index 353272ce..addfedd6 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 31 18:34:27 UTC 2017 - jfehlig@suse.com + +- Add a supportconfig plugin + qemu-supportconfig + FATE#323661 + ------------------------------------------------------------------- Wed Aug 30 19:52:26 UTC 2017 - brogers@suse.com diff --git a/qemu.spec b/qemu.spec index 6251292b..f9f9f3fb 100644 --- a/qemu.spec +++ b/qemu.spec @@ -129,6 +129,7 @@ Source12: supported.x86.txt Source13: supported.s390.txt Source14: supported.arm.txt Source15: supported.ppc.txt +Source16: qemu-supportconfig # Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch # This patch queue is auto-generated from https://github.com/openSUSE/qemu Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch @@ -1201,6 +1202,9 @@ install -D -m 0644 %{SOURCE13} %{buildroot}%{_docdir}/qemu-s390/supported.txt install -D -m 0644 %{SOURCE14} %{buildroot}%{_docdir}/qemu-arm/supported.txt install -D -m 0644 %{SOURCE15} %{buildroot}%{_docdir}/qemu-ppc/supported.txt %endif +# install supportconfig plugin +mkdir -p %{buildroot}%{_libexecdir}/supportconfig/plugins +install -D -m 0755 %{SOURCE16} %{buildroot}%{_libexecdir}/supportconfig/plugins/qemu %if %{legacy_qemu_kvm} cat > %{buildroot}%{_bindir}/qemu-kvm << 'EOF' #!/bin/sh @@ -1363,6 +1367,9 @@ fi %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name %_datadir/%name/qemu-ifup +%dir %_libexecdir/supportconfig +%dir %_libexecdir/supportconfig/plugins +%_libexecdir/supportconfig/plugins/qemu %if %{kvm_available} %if 0%{?suse_version} <= 1320 %_bindir/kvm_stat diff --git a/qemu.spec.in b/qemu.spec.in index eee1413c..078e83ef 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -129,6 +129,7 @@ Source12: supported.x86.txt Source13: supported.s390.txt Source14: supported.arm.txt Source15: supported.ppc.txt +Source16: qemu-supportconfig # Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch # This patch queue is auto-generated from https://github.com/openSUSE/qemu PATCH_FILES @@ -1137,6 +1138,9 @@ install -D -m 0644 %{SOURCE13} %{buildroot}%{_docdir}/qemu-s390/supported.txt install -D -m 0644 %{SOURCE14} %{buildroot}%{_docdir}/qemu-arm/supported.txt install -D -m 0644 %{SOURCE15} %{buildroot}%{_docdir}/qemu-ppc/supported.txt %endif +# install supportconfig plugin +mkdir -p %{buildroot}%{_libexecdir}/supportconfig/plugins +install -D -m 0755 %{SOURCE16} %{buildroot}%{_libexecdir}/supportconfig/plugins/qemu %if %{legacy_qemu_kvm} cat > %{buildroot}%{_bindir}/qemu-kvm << 'EOF' #!/bin/sh @@ -1299,6 +1303,9 @@ fi %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name %_datadir/%name/qemu-ifup +%dir %_libexecdir/supportconfig +%dir %_libexecdir/supportconfig/plugins +%_libexecdir/supportconfig/plugins/qemu %if %{kvm_available} %if 0%{?suse_version} <= 1320 %_bindir/kvm_stat