File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,22 @@ components = ["rust-src"]
245245
246246<br >
247247
248+ ## Avoid directory traversal
249+
250+ If you re-use the failing ` .rs ` files, have them (and their respective
251+ ` .stderr ` files) positioned so that ` t.compile_fail(...) ` accesses them only
252+ in subdirectories ("sub/sub/dir/test01.rs"), and not involving any parent
253+ traversal ("../neighbor-dir/tests01.rs"). Otherwise the generated ` .stderr `
254+ files may include absolute resolved paths, and they may fail in different
255+ environment.
256+
257+ Alternatively, create symlinks that involve any parent traversal "..". Have
258+ those symlinks themselves located under a (sub-sub...)directory of where you
259+ invoke ` t.compile_fail(...) ` , so that the path you pass to
260+ ` t.compile_fail(...) ` itself does not include any "..".
261+
262+ <br >
263+
248264#### License
249265
250266<sup >
You can’t perform that action at this time.
0 commit comments