diff --git a/tests/meson.build b/tests/meson.build
index b70fe7732e..35e8bd53bb 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -692,8 +692,6 @@ if conf.has('WITH_LIBVIRTD')
'libvirtd-pool',
'virsh-auth',
'virsh-checkpoint',
- 'virsh-cpuset',
- 'virsh-define-dev-segfault',
'virsh-int-overflow',
'virsh-read-bufsiz',
'virsh-read-non-seekable',
diff --git a/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args
new file mode 100644
index 0000000000..3738d252a4
--- /dev/null
+++ b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.args
@@ -0,0 +1,46 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-D \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-D/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-D/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-D/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=D,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-D/master-key.aes"}' \
+-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,pcspk-audiodev=audio1,acpi=on \
+-accel kvm \
+-cpu qemu64 \
+-m size=262144k \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":268435456}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
+-chardev pty,id=charserial0 \
+-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
+-chardev pty,id=charserial1 \
+-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
+-chardev pty,id=charserial2 \
+-device '{"driver":"isa-serial","chardev":"charserial2","id":"serial2","index":2}' \
+-chardev pty,id=charparallel0 \
+-device '{"driver":"isa-parallel","chardev":"charparallel0","id":"parallel0"}' \
+-chardev pty,id=charparallel1 \
+-device '{"driver":"isa-parallel","chardev":"charparallel1","id":"parallel1"}' \
+-chardev pty,id=charparallel2 \
+-device '{"driver":"isa-parallel","chardev":"charparallel2","id":"parallel2"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-device '{"driver":"ES1370","id":"sound1","audiodev":"audio1","bus":"pci.0","addr":"0x2"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml
new file mode 100644
index 0000000000..106d97b62f
--- /dev/null
+++ b/tests/qemuxmlconfdata/console-compat-crash.x86_64-latest.xml
@@ -0,0 +1,65 @@
+
+ D
+ aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
+ 262144
+ 262144
+ 1
+
+ hvm
+
+
+
+
+
+
+ qemu64
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/virsh-define-dev-segfault b/tests/qemuxmlconfdata/console-compat-crash.xml
old mode 100755
new mode 100644
similarity index 59%
rename from tests/virsh-define-dev-segfault
rename to tests/qemuxmlconfdata/console-compat-crash.xml
index cc5b461932..d8795c580e
--- a/tests/virsh-define-dev-segfault
+++ b/tests/qemuxmlconfdata/console-compat-crash.xml
@@ -1,26 +1,11 @@
-#!/bin/sh
-# Exercise a bug whereby defining a valid domain could kill libvirtd.
-# The bug can also be exercised with a simple define/dumpxml pair to virsh.
-
-. "$(dirname $0)/test-lib.sh"
-
-if test "$VERBOSE" = yes; then
- set -x
- $abs_top_builddir/tools/virsh --version
-fi
-
-fail=0
-
-# Domain definition from Cole Robinson.
-cat <<\EOF > D.xml || fail=1
-
+
D
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
- hvm
+ hvm
@@ -31,7 +16,7 @@ cat <<\EOF > D.xml || fail=1
restart
destroy
- /usr/bin/qemu-system-i386
+ /usr/bin/qemu-system-x86_64
@@ -59,18 +44,3 @@ cat <<\EOF > D.xml || fail=1
-EOF
-
-url=test:///default
-$abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1
-
-cat > exp <
+ QEMUGuest1
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219136
+ 2
+
+ hvm
+
+
+ /usr/bin/qemu-system-x86_64
+
+
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index 9e2c7da15a..42530555f3 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1799,6 +1799,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("console-compat");
DO_TEST_CAPS_LATEST("console-compat-auto");
+ DO_TEST_CAPS_LATEST("console-compat-crash");
DO_TEST_CAPS_LATEST("serial-vc-chardev");
DO_TEST_CAPS_LATEST("serial-pty-chardev");
@@ -2287,6 +2288,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("cputune-numatune");
DO_TEST_CAPS_LATEST("vcpu-placement-static");
DO_TEST_CAPS_LATEST("cputune-cpuset-big-id");
+ DO_TEST_CAPS_LATEST_PARSE_ERROR("cpuset-invalid");
DO_TEST_CAPS_LATEST_PARSE_ERROR("numatune-memory-invalid-nodeset");
DO_TEST_CAPS_VER("numatune-memnode", "5.2.0");
diff --git a/tests/virsh-cpuset b/tests/virsh-cpuset
deleted file mode 100755
index 66163013c2..0000000000
--- a/tests/virsh-cpuset
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-# ensure that defining with an invalid vCPU cpuset elicits a diagnostic
-
-# Copyright (C) 2008-2009 Red Hat, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# .
-
-. "$(dirname $0)/test-lib.sh"
-
-if test "$VERBOSE" = yes; then
- set -x
- $abs_top_builddir/tools/virsh --version
-fi
-
-fail=0
-
-# generate input
-$abs_top_builddir/tools/virsh --connect test:///default dumpxml 1 > xml || fail=1
-
-# require the presence of the string we'll transform
-grep ' /dev/null || fail=1
-
-sed "s/vcpu placement='static'>/vcpu cpuset='aaa'>/" xml > xml-invalid || fail=1
-
-# Require failure and a diagnostic.
-$abs_top_builddir/tools/virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1
-cat <<\EOF > exp || fail=1
-error: Failed to define domain from xml-invalid
-error: invalid argument: Failed to parse bitmap 'aaa'
-
-EOF
-compare exp out || fail=1
-
-(exit $fail); exit $fail