mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Detect NAR directory entries that collide with another path after case-hacking
The test was made by @puckipedia.
This commit is contained in:
parent
77c090cdbd
commit
3557587381
3 changed files with 9 additions and 0 deletions
|
@ -37,3 +37,9 @@ cmp case.nar "$TEST_ROOT/case.nar"
|
|||
# removal of the suffix).
|
||||
touch "$TEST_ROOT/case/xt_CONNMARK.h~nix~case~hack~3"
|
||||
(! nix-store "${opts[@]}" --dump "$TEST_ROOT/case" > /dev/null)
|
||||
|
||||
# Detect NARs that have a directory entry that after case-hacking
|
||||
# collides with another entry (e.g. a directory containing 'Test',
|
||||
# 'Test~nix~case~hack~1' and 'test').
|
||||
rm -rf "$TEST_ROOT/case"
|
||||
expectStderr 1 nix-store "${opts[@]}" --restore "$TEST_ROOT/case" < case-collision.nar | grepQuiet "NAR contains file name 'test' that collides with case-hacked file name 'Test~nix~case~hack~1'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue