diff options
author | makepost <makepost@firemail.cc> | 2019-06-10 04:53:28 +0300 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-06-10 15:13:41 -0500 |
commit | 85af4c287c69394c7ec5423dcd661797cf501c9c (patch) | |
tree | 211068b4f2734a77552a0c61a9e1250bf123048f /tests | |
parent | 1e229a235d9e011c4f64169e51be7ac4fa78bbde (diff) | |
download | toybox-85af4c287c69394c7ec5423dcd661797cf501c9c.tar.gz |
Add failing test for cp -r dir/. symlink child.
Gentoo packages that build multiple variants, like once for every
version of a slotted dependency, currently fail to install if their
source dir includes a relative symlink to own child. Affects lots of
Python infrastructure, for example meson and setuptools. You've already
run into this issue, since cp.test has a todo. It's from 2008 though, so
I guess I'll bump with an expanded test case. Libc is musl-1.1.22.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cp.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/cp.test b/tests/cp.test index a720d1f5..c7d445c0 100755 --- a/tests/cp.test +++ b/tests/cp.test @@ -89,6 +89,15 @@ testing "-r dir1/* dir2" \ "cp -r one/* dir2 && diff -r one dir2 && echo yes" "yes\n" "" "" rm -rf one dir dir2 +mkdir one; touch one/two; cp one/two one/three +cp -r one/ one_ # Succeeds twice in a row +testing "-r dir/." "cp -r one/. one_ && echo yes" "yes\n" "" "" +rm -rf one one_ +mkdir one; touch one/two; ln -s two one/three +cp -r one/ one_ # First time ok, but second will fail with "File exists" +testing "-r dir/. symlink child" "cp -r one/. one_ && echo yes" "yes\n" "" "" +rm -rf one one_ + touch walrus chmod 644 walrus ln -s walrus woot @@ -99,7 +108,6 @@ testing "symlink dest permissions" "cp woot carpenter && stat -c %A carpenter" \ # cp -r ../source destdir # cp -r one/two/three missing # cp -r one/two/three two -# mkdir one; touch one/two; ln -s two one/three # cp file1 file2 dir # cp file1 missing file2 -> dir |