diff --git a/src/util/virutil.c b/src/util/virutil.c index 177f9d75fb1d79efcc183caa9d8b3fe07d93ad63..bb9604a0c1ffb9c99e454e84878a8c376f773046 100644 --- a/src/util/virutil.c +++ b/src/util/virutil.c @@ -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 diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index e58b8ce8b565825a4b9d767823ca3b04a2a49c42..8426108b29ed2dd59cb84743cd968ee2e6cac8d5 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -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; +}