aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2023-12-19 10:08:26 -0800
committerDenis Kenzior <denkenz@gmail.com>2023-12-19 19:48:51 -0600
commit390fd58cad96f3f3d1cc2a4e43d6815b9db08f75 (patch)
tree5a7b780098b917b80f957af9cc345b897223ea45
parent0f1d9685e76035fefddad6c8abe205223c204ec5 (diff)
auto-t: increase RAM when running with valgrind (UML)
This was done for QEMU but not for UML. Running more than a few tests with --valgrind will generally thrown an OOM error pretty quick.
-rw-r--r--tools/runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/runner.py b/tools/runner.py
index 03f446118..e50ba9c08 100644
--- a/tools/runner.py
+++ b/tools/runner.py
@@ -552,7 +552,12 @@ class UmlRunner(RunnerAbstract):
kern_log = "ignore_loglevel" if "kernel" in args.verbose else "quiet"
- cmd = [args.kernel, 'rootfstype=hostfs', 'ro', 'mem=256M', 'mac80211_hwsim.radios=0',
+ if self.args.valgrind:
+ ram = 512
+ else:
+ ram = 256
+
+ cmd = [args.kernel, 'rootfstype=hostfs', 'ro', f'mem={ram}M', 'mac80211_hwsim.radios=0',
'time-travel=inf-cpu', 'eth0=mcast', 'eth1=mcast',
'%s' % kern_log, 'init=%s' % self.init]
cmd.extend(args.to_cmd().split(' '))