[CRIU] [RFC PATCHv2 02/32] zdtm: zdtm.py: reset $PATH to canonical in ns tests

Ivan Shapovalov intelfx at intelfx.name
Sat Mar 12 00:42:01 PST 2016


This is to deal with distros like Arch which take /usr merge to the
extreme and set their $PATH to something like /usr/local/bin:/usr/bin
(no /usr/sbin, no /{s,}bin), which breaks our rather inflexible nsroot
population logic.

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
 test/zdtm.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/zdtm.py b/test/zdtm.py
index 556217e..c704acf 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -344,6 +344,7 @@ class zdtm_test:
 		if self.__flavor.ns:
 			env['ZDTM_NEWNS'] = "1"
 			env['ZDTM_ROOT'] = self.__flavor.root
+			env['PATH'] = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
 
 			if self.__flavor.uns:
 				env['ZDTM_USERNS'] = "1"
-- 
2.7.2



More information about the CRIU mailing list