From nobody Wed Mar 27 11:26:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V4PWM5CkCz5FHqy; Wed, 27 Mar 2024 11:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4V4PWM4FNTz4c5Q; Wed, 27 Mar 2024 11:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711538783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzEBektYHRWbR+sKsGwJMylMRL2QmXhVXtHVSZK1Ql4=; b=O4IeYj8QRfozEoCBZA8zyQnrFRBxVRImfeNz/jVKTlx+ejRMfpfzFYV3M0YKkhv9kfZ+br 1QGBks+FPHVEpcuj74xCXxcxttMM4bvQ/meEjhcOwruv1SgZHRg2fcc9v1ytL5962/wZcz aPBrrGZ0J90O7Cp9MwKa5o6YaIvdQSaG0J+MZu1oQPbJekKfAZLH1yn9NWT3N9hDjPGk74 0eOjvbKc00MFf27gQ5d9ctOw2F9qnjA37XOQxcubUBtukL+SKOeczEHuqMA6v88aRJbH8W nBNa5JrgDg/fLCF1b3Ex9Nrm9fG+Cq35gNFCfYaHimGZgHJv7rMtu7Gr9e2Bsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711538783; a=rsa-sha256; cv=none; b=l6/BlNEi3cK+KjIDMaSxzn054B1ehMP64XOXzfqzQTcp5k5JuTvv0Or/0m45R9byn2GZXn cKrFybSeDwlccsX0+PDXKBjKNGg/jV8Yi2mGh+l1aXMSgzOYepRhuKGZe6g3X097QTZRGI K2xsabkeOt5KXGPMz0DX3WL4mvkqWgx4WFJWUaSAyPQeWtzLPHXF+lGyXB2we7jnhSrrr3 Ai3+KlTGtVaD9IyjFHFq1v0Wx/wrkI03pZ5x4TGlntK9b51+gQdzEDHL+1KrpjUTvrjd6T CfBx7CEb1r7H0fUub8gj5HFV93M11eMqx+qSMpouRN0SmP99s/rtW6LniRV+vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711538783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XzEBektYHRWbR+sKsGwJMylMRL2QmXhVXtHVSZK1Ql4=; b=QVsho2pPL5QDXk6nnGvPq5L7D/BSlFCcbrRqIWKuHqAuR8T+n1OeDaQd7CRxvnFcclE5AW DCJT9ooM3HH1ssZ694XAmOtPhpTrIWjlNflsVcqn43j9QRbyzzT1Ia5h5O/M5IzA07SHrJ tLfdUlL+sue1ZC72YnGTROKJ3G1PkgYuHGyntIG68UBPxnOoqHDz7zwoKKQ04bSwt3aDWA FKjqTHiDAg/E59KgWuatUQhuVw9IqBRlwBvyhZJz1843NcZ5+TeU59pnN0+tbV/7dMn5Vp rlJlMZk4Bo7+oH40yAoC/3fDlTEu3mXcp0OPcAkw+mxRulWJz1Xwt8c21DEx1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4V4PWM3sxRzhpC; Wed, 27 Mar 2024 11:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42RBQNwx003993; Wed, 27 Mar 2024 11:26:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42RBQNKG003990; Wed, 27 Mar 2024 11:26:23 GMT (envelope-from git) Date: Wed, 27 Mar 2024 11:26:23 GMT Message-Id: <202403271126.42RBQNKG003990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2ae8d34666a6 - main - ln: Add a test case for ln -sfF. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ae8d34666a6dea4c1c77a1905c7b8cebd6a21f9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2ae8d34666a6dea4c1c77a1905c7b8cebd6a21f9 commit 2ae8d34666a6dea4c1c77a1905c7b8cebd6a21f9 Author: Dag-Erling Smørgrav AuthorDate: 2024-03-27 10:03:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-27 10:03:56 +0000 ln: Add a test case for ln -sfF. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude, asomers Differential Revision: https://reviews.freebsd.org/D44513 --- bin/ln/tests/ln_test.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bin/ln/tests/ln_test.sh b/bin/ln/tests/ln_test.sh index 7daf5c5cdec0..8e5dcf81e61f 100644 --- a/bin/ln/tests/ln_test.sh +++ b/bin/ln/tests/ln_test.sh @@ -161,6 +161,22 @@ sf_flag_body() atf_check_symlink_to A B } +atf_test_case sfF_flag +sfF_flag_head() +{ + atf_set "descr" "Verify that if the target file already exists " \ + "and is a symlink, then '-sfF' option removes " \ + "it so that the link may occur" +} +sfF_flag_body() +{ + atf_check mkdir A B C + atf_check ln -sF A C + atf_check_symlink_to A C + atf_check ln -sfF B C + atf_check_symlink_to B C +} + atf_test_case s_flag s_flag_head() { @@ -209,6 +225,7 @@ atf_init_test_cases() atf_add_test_case snf_flag_dir atf_add_test_case sF_flag atf_add_test_case sf_flag + atf_add_test_case sfF_flag atf_add_test_case s_flag atf_add_test_case s_flag_broken atf_add_test_case sw_flag