Report
error: invalid argument: requested vcpu '100' is not present in the domain
instead of
error: invalid argument: requested vcpu is higher than allocated vcpus
}
if (vcpu > virDomainDefGetVcpus(privdom->def)) {
- virReportError(VIR_ERR_INVALID_ARG, "%s",
- _("requested vcpu is higher than allocated vcpus"));
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("requested vcpu '%d' is not present in the domain"),
+ vcpu);
goto cleanup;
}
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
-error: invalid argument: requested vcpu is higher than allocated vcpus
+error: invalid argument: requested vcpu '100' is not present in the domain
EOF
compare exp out || fail=1