Skip to contentSkip to conversation

test-runner: mount testhome rather than assume location

PATCH New James Prestwood 1 participant 1 message Apr 21, 2022

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 test-runner: mount testhome rather than assume location

Usually the test home directory is a git repo somewhere e.g. under /home. But if the home directory is located under /tmp this poses a problem since UML remounts /tmp. To handle both cases mount the home directory explicity.

---
 tools/runner.py | 3 +++
 1 file changed, 3 insertions(+)
tools/runner.py +3 -0
index 7c177f1f..ac063c32 100644
@@ -451,6 +451,9 @@ class QemuRunner(RunnerAbstract):
 	def prepare_environment(self):
 		mounts = [ MountInfo('debugfs', 'debugfs', '/sys/kernel/debug', '', 0) ]
 
+		mounts.append(MountInfo('hostfs', 'hostfs', self.args.testhome,
+					self.args.testhome, 0))
+
 		if self.args.log:
 			mounts.append(MountInfo('9p', 'logdir', self.args.log,
 					'trans=virtio,version=9p2000.L,msize=10240', 0))
Signature · 1 line
2.34.1