提交 7141fc7a 编写于 作者: P Peter Krempa

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
上级 f82a8014
......@@ -2508,8 +2508,9 @@ static int testDomainPinVcpu(virDomainPtr domain,
}
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;
}
......
......@@ -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
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册