summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/test_util.h
diff options
context:
space:
mode:
authorBen Gardon <bgardon@google.com>2020-01-23 10:04:30 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-03-16 17:57:02 +0100
commitaf99e1ad7e708d1a1a4e4c1bb10a2b851974fc04 (patch)
tree96d00db6c5cd5feaa522878339c8bd4085e31bb7 /tools/testing/selftests/kvm/include/test_util.h
parent0119cb365c93621535187c7527486c3b378a622d (diff)
KVM: selftests: Add memory size parameter to the demand paging test
Add an argument to allow the demand paging test to work on larger and smaller guest sizes. Signed-off-by: Ben Gardon <bgardon@google.com> [Rewrote parse_size() to simplify and provide user more flexibility as to how sizes are input. Also fixed size overflow assert.] Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/test_util.h')
-rw-r--r--tools/testing/selftests/kvm/include/test_util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h
index a41db6fb7e24..e696c8219d69 100644
--- a/tools/testing/selftests/kvm/include/test_util.h
+++ b/tools/testing/selftests/kvm/include/test_util.h
@@ -39,4 +39,6 @@ void test_assert(bool exp, const char *exp_str,
#a, #b, #a, (unsigned long) __a, #b, (unsigned long) __b); \
} while (0)
+size_t parse_size(const char *size);
+
#endif /* SELFTEST_KVM_TEST_UTIL_H */