svn commit: r319856 - head/bin/ln/tests
Ngie Cooper
ngie at FreeBSD.org
Mon Jun 12 16:38:38 UTC 2017
Author: ngie
Date: Mon Jun 12 16:38:37 2017
New Revision: 319856
URL: https://svnweb.freebsd.org/changeset/base/319856
Log:
Add a testcase for `ln -sF`
The testcase fails today, so mark it with atf_expect_fail: in
particular, the target (B) isn't being unlinked and the documentation
doesn't suggest special handling for directories. Thus, there's either
a doc or an implementation bug in ln(1) that needs to be resolved.
MFC after: 1 month
MFC with: r319714, r319854, r319855
PR: 219943
Reviewed by: ngie
Submitted by: shivansh
Differential Revision: D11159 (part of a larger diff)
Sponsored by: Google, Inc (GSoC 2017)
Modified:
head/bin/ln/tests/ln_test.sh
Modified: head/bin/ln/tests/ln_test.sh
==============================================================================
--- head/bin/ln/tests/ln_test.sh Mon Jun 12 16:31:32 2017 (r319855)
+++ head/bin/ln/tests/ln_test.sh Mon Jun 12 16:38:37 2017 (r319856)
@@ -150,6 +150,22 @@ snf_flag_dir_body()
atf_check -o inline:'B\n' readlink C
}
+atf_test_case sF_flag
+sF_flag_head()
+{
+ atf_set "descr" "Verify that if the target file already exists " \
+ "and is a directory, then '-sF' option removes " \
+ "it so that the link may occur"
+}
+
+sF_flag_body()
+{
+ atf_expect_fail "B isn't being unlinked (bug 219943)"
+ atf_check mkdir A B
+ atf_check ln -sF A B
+ atf_check -o inline:'Symbolic Link\n' stat -f %SHT B
+}
+
atf_test_case sf_flag
sf_flag_head()
{
@@ -220,6 +236,7 @@ atf_init_test_cases()
atf_add_test_case target_exists_symbolic
atf_add_test_case shf_flag_dir
atf_add_test_case snf_flag_dir
+ atf_add_test_case sF_flag
atf_add_test_case sf_flag
atf_add_test_case s_flag
atf_add_test_case s_flag_broken
More information about the svn-src-all
mailing list