test: Touch up error message when attempting to pin invalid vCPU

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
This commit is contained in:
Peter Krempa 2016-01-04 19:46:31 +01:00
parent f82a8014c0
commit 7141fc7a27
2 changed files with 4 additions and 3 deletions

View File

@ -2508,8 +2508,9 @@ static int testDomainPinVcpu(virDomainPtr domain,
} }
if (vcpu > virDomainDefGetVcpus(privdom->def)) { if (vcpu > virDomainDefGetVcpus(privdom->def)) {
virReportError(VIR_ERR_INVALID_ARG, "%s", virReportError(VIR_ERR_INVALID_ARG,
_("requested vcpu is higher than allocated vcpus")); _("requested vcpu '%d' is not present in the domain"),
vcpu);
goto cleanup; goto cleanup;
} }

View File

@ -43,7 +43,7 @@ compare exp out || fail=1
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1 $abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1
test $? = 1 || fail=1 test $? = 1 || fail=1
cat <<\EOF > exp || 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 EOF
compare exp out || fail=1 compare exp out || fail=1