Skip to contentSkip to conversation

test-runner: enable valgrind track origins

PATCH In review James Prestwood 2 participants 3 messages Oct 21, 2020 – Oct 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 test-runner: enable valgrind track origins

This gives a more exact location to where a memory problem is happening. It also uses more RAM so the VM was upgraded to 256MB from 192MB.

---
 tools/test-runner | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/test-runner +3 -3
index 8c06816c..10db4c78 100755
@@ -557,8 +557,8 @@ class TestContext:
 		iwd_radios = ','.join([r.name for r in self.radios if r.use == 'iwd'])
 
 		if self.args.valgrind:
-			args.extend(['valgrind', '--leak-check=full', '--log-file=%s' % \
-					'/tmp/valgrind.log'])
+			args.extend(['valgrind', '--leak-check=full', '--track-origins=yes',
+						'--log-file=/tmp/valgrind.log'])
 
 		args.extend(['iwd', '-p', iwd_radios])
 
@@ -1265,7 +1265,7 @@ class Main:
 			qemu_binary,
 			'-machine', 'type=q35,accel=kvm:tcg',
 			'-nodefaults', '-no-user-config', '-monitor', 'none',
-			'-display', 'none', '-m', '192M', '-nographic', '-vga',
+			'-display', 'none', '-m', '256M', '-nographic', '-vga',
 			'none', '-no-acpi', '-no-hpet',
 			'-no-reboot', '-fsdev',
 			'local,id=fsdev-root,path=/,readonly,security_model=none,multidevs=remap',
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 test-runner: add switch for genl debugging

Providing 'iwd-genl' in the list of verbose options will enable IWD_GENL_DEBUG.

---
 tools/test-runner | 3 +++
 1 file changed, 3 insertions(+)
tools/test-runner +3 -0
index 10db4c78..3ae4558c 100755
@@ -578,6 +578,9 @@ class TestContext:
 		if self.is_verbose('iwd-tls'):
 			env['IWD_TLS_DEBUG'] = '1'
 
+		if self.is_verbose('iwd-genl'):
+			env['IWD_GENL_DEBUG'] = '1'
+
 		pid = self.start_process(args, env=env)
 		return pid
 
Signature · 1 line
2.26.2
#2 lore raw
In reply to James Prestwood

Hi James,

Quoted 7 lines · James Prestwood

This gives a more exact location to where a memory problem is happening. It also uses more RAM so the VM was upgraded to 256MB from 192MB.

---
  tools/test-runner | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

Both applied, thanks.

Regards,
-Denis