diff options
author | Rob Landley <rob@landley.net> | 2014-12-01 12:52:55 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-12-01 12:52:55 -0600 |
commit | 10e0d86c088a3eccc27095b51d753e05f3f3cbc8 (patch) | |
tree | c7c2658c41dc0049ceb09b687338c238b21e2791 /tests | |
parent | ef6a773198040a05a56dec2261516fb149823cf6 (diff) | |
download | toybox-10e0d86c088a3eccc27095b51d753e05f3f3cbc8.tar.gz |
Ashwini Sharma pointed out that "mkdir sub; ln -s . sub/up; du -L sub" shouldn't loop endlessly.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/du.test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/du.test b/tests/du.test index fabb800b..81fb5282 100755 --- a/tests/du.test +++ b/tests/du.test @@ -18,6 +18,9 @@ ln -s ../du_2 du_test/xyz # allocated file space is zero. testing "du counts symlinks without following" "du -ks du_test" "8\tdu_test\n" "" "" testing "du -L follows symlinks" "du -ksL du_test" "16\tdu_test\n" "" "" +ln -s . du_test/up +testing "du -L avoid endless loop" "du -ksL du_test" "16\tdu_test\n" "" "" +rm du_test/up # if -H and -L are specified, the last takes priority testing "du -HL follows symlinks" "du -ksHL du_test" "16\tdu_test\n" "" "" testing "du -H does not follow unspecified symlinks" "du -ksH du_test" "8\tdu_test\n" "" "" |