Skip to content

Commit 2151b86

Browse files
aescolarAnas Nashif
authored andcommitted
sanitycheck: fix crashes with symlinks in path
When building the testcase path, replace symlinks in path with the realpath both in the testcase root and in ZEPHYR_BASE For more info see issue #5772 Fixes: #5772 Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent c3f5391 commit 2151b86

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/sanitycheck

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,8 +1374,10 @@ class TestCase:
13741374
self.min_flash = tc_dict["min_flash"]
13751375
self.extra_sections = tc_dict["extra_sections"]
13761376

1377-
self.path = os.path.normpath(os.path.join(os.path.abspath(
1378-
testcase_root).replace(ZEPHYR_BASE + "/", ''), workdir, name))
1377+
self.path = os.path.normpath(os.path.join(os.path.realpath(
1378+
testcase_root).replace(os.path.realpath(ZEPHYR_BASE) + "/", ''),
1379+
workdir, name))
1380+
13791381
self.name = os.path.join(self.path)
13801382
self.defconfig = {}
13811383
self.yamlfile = yamlfile

0 commit comments

Comments
 (0)