提交 ace1ee22 编写于 作者: P Peter Krempa

test: qemuxml2argv: Mock virMemoryMaxValue to remove 32/64 bit difference

Always return LLONG_MAX even on 32 bit systems. The limitation
originates from our use of "unsigned long" in several APIs. The internal
data type is unsigned long long. Make the test suite deterministic by
removing the architecture difference.

Flaw was introduced in 64588113 where
I've added a test that uses too large numbers.
上级 81a110ed
......@@ -2658,6 +2658,8 @@ virMemoryLimitIsSet(unsigned long long value)
* @capped: whether the value must fit into unsigned long
* (long long is assumed otherwise)
*
* Note: This function is mocked in tests/qemuxml2argvmock.c for test stability
*
* Returns the maximum possible memory value in bytes.
*/
unsigned long long
......
......@@ -74,3 +74,13 @@ virTPMCreateCancelPath(const char *devpath)
return path;
}
/**
* Large values for memory would fail on 32 bit systems, despite having
* variables that support it.
*/
unsigned long long
virMemoryMaxValue(bool capped ATTRIBUTE_UNUSED)
{
return LLONG_MAX;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册