Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH] test-runner: increase RAM for valgrind
Date: Mon, 03 May 2021 14:30:41 -0700	[thread overview]
Message-ID: <20210503213041.361836-1-prestwoj@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]

Certain tests like testAP spawn two IWD process in separate
namespaces. When --valrind is used this eats up quite a bit
of RAM and causes the VM to run out of memory and start
killing off processes.
---
 tools/test-runner | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tools/test-runner b/tools/test-runner
index b890b3e7..dd4cbf82 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -1570,7 +1570,15 @@ class Main:
 		else:
 			smp = int(nproc / 2)
 
-		print("Using %d cores for VM" % smp)
+		#
+		# Increase RAM if valgrind is being used
+		#
+		if self.args.valgrind:
+			ram = 512
+		else:
+			ram = 256
+
+		print("Using %d cores, %d RAM for VM" % (smp, ram))
 
 		#
 		# This passes through most of the command line options to
@@ -1593,7 +1601,7 @@ class Main:
 			qemu_binary,
 			'-machine', 'type=q35,accel=kvm:tcg',
 			'-nodefaults', '-no-user-config', '-monitor', 'none',
-			'-display', 'none', '-m', '256M', '-nographic', '-vga',
+			'-display', 'none', '-m', '%dM' % ram, '-nographic', '-vga',
 			'none', '-no-acpi', '-no-hpet',
 			'-no-reboot', '-fsdev',
 			'local,id=fsdev-root,path=/,readonly,security_model=none,multidevs=remap',
-- 
2.26.2

             reply	other threads:[~2021-05-03 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-03 21:30 James Prestwood [this message]
2021-05-04 15:31 ` [PATCH] test-runner: increase RAM for valgrind Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210503213041.361836-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox