[kvm-unit-tests PATCH v2 2/9] s390x: uv-host: Check for sufficient amount of memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The UV init storage needs to be above 2G so we need a little over 2G
of memory when running the test.

Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
Reviewed-by: Nico Boehr <nrb@xxxxxxxxxxxxx>
---
 s390x/uv-host.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/s390x/uv-host.c b/s390x/uv-host.c
index 9dfaebd7..91e88a1f 100644
--- a/s390x/uv-host.c
+++ b/s390x/uv-host.c
@@ -720,6 +720,17 @@ int main(void)
 	test_invalid();
 	test_uv_uninitialized();
 	test_query();
+
+	/*
+	 * Some of the UV memory needs to be allocated with >31 bit
+	 * addresses which means we need a lot more memory than other
+	 * tests.
+	 */
+	if (get_ram_size() < (SZ_1M * 2200UL)) {
+		report_skip("Not enough memory. This test needs about 2200MB of memory");
+		goto done;
+	}
+
 	test_init();
 
 	setup_vmem();
-- 
2.34.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux