mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
virBitmapParse: Fix behavior in case of error and fix up callers
Re-arrange the code so that the returned bitmap is always initialized to NULL even on early failures and return an error message as some callers are already expecting it. Fix up the rest not to shadow the error.
This commit is contained in:
1 parent
a0b6a36f94
commit
106a2ddaa7
8 files changed
+14
-27
No files matched your search
+1
-1
@@ -42,7 +42,7 @@ sed "s/vcpu placement='static'>/vcpu cpuset='aaa'>/" xml > xml-invalid || fail=1
|
||||
$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: XML error: topology cpuset syntax error
|
||||
error: invalid argument: Failed to parse bitmap 'aaa'
|
||||
|
||||
EOF
|
||||
compare exp out || fail=1
|
||||
|
||||
Reference in new issue
Block a user