From owner-svn-src-all@freebsd.org Wed Jul 5 15:58:24 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 829D1D87422; Wed, 5 Jul 2017 15:58:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F33B1364; Wed, 5 Jul 2017 15:58:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v65FwNE6076973; Wed, 5 Jul 2017 15:58:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v65FwNRp076970; Wed, 5 Jul 2017 15:58:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201707051558.v65FwNRp076970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 5 Jul 2017 15:58:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320680 - in stable/11: bin/ln bin/ln/tests etc/mtree X-SVN-Group: stable-11 X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in stable/11: bin/ln bin/ln/tests etc/mtree X-SVN-Commit-Revision: 320680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 15:58:24 -0000 Author: asomers Date: Wed Jul 5 15:58:23 2017 New Revision: 320680 URL: https://svnweb.freebsd.org/changeset/base/320680 Log: MFC r319714, r319854 r319714: Add tests for ln(1) * Verify that when creating a hard link to a symbolic link, '-L' option creates a hard link to the target of the symbolic link * Verify that when creating a hard link to a symbolic link, '-P' option creates a hard link to the symbolic link itself * Verify that if the target file already exists, '-f' option unlinks it so that link may occur * Verify that if the target file or directory is a symbolic link, '-shf' option prevents following the link * Verify that if the target file or directory is a symbolic link, '-snf' option prevents following the link * Verify that '-s' option creates a symbolic link * Verify that '-w' option produces a warning if the source of a symbolic link does not currently exist Submitted by: shivansh Reviewed by: asomers, ngie Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11084 r319854: bin/ln: Set umask appropriately before creating files for testing These changes were missed in D11084 Submitted by: shivansh Reviewed by: asomers X-MFC-With: 319714 Sponsored by: Google, Inc (GSoC 2017) Differential Revision: https://reviews.freebsd.org/D11158 Added: stable/11/bin/ln/tests/ - copied from r319714, head/bin/ln/tests/ Modified: stable/11/bin/ln/Makefile stable/11/bin/ln/tests/ln_test.sh stable/11/etc/mtree/BSD.tests.dist Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/ln/Makefile ============================================================================== --- stable/11/bin/ln/Makefile Wed Jul 5 15:50:41 2017 (r320679) +++ stable/11/bin/ln/Makefile Wed Jul 5 15:58:23 2017 (r320680) @@ -1,11 +1,17 @@ # @(#)Makefile 8.2 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PACKAGE=runtime PROG= ln MAN= ln.1 symlink.7 LINKS= ${BINDIR}/ln ${BINDIR}/link MLINKS= ln.1 link.1 + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif .include Modified: stable/11/bin/ln/tests/ln_test.sh ============================================================================== --- head/bin/ln/tests/ln_test.sh Thu Jun 8 19:09:55 2017 (r319714) +++ stable/11/bin/ln/tests/ln_test.sh Wed Jul 5 15:58:23 2017 (r320680) @@ -98,6 +98,7 @@ target_exists_hard_head() target_exists_hard_body() { + set_umask atf_check touch A B atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ ln A B @@ -112,6 +113,7 @@ target_exists_symbolic_head() target_exists_symbolic_body() { + set_umask atf_check touch A B atf_check -s exit:1 -e inline:'ln: B: File exists\n' \ ln -s A B @@ -155,6 +157,7 @@ sf_flag_head() sf_flag_body() { + set_umask atf_check touch A B atf_check ln -sf A B atf_check -o inline:'B: symbolic link to A\n' file B Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Wed Jul 5 15:50:41 2017 (r320679) +++ stable/11/etc/mtree/BSD.tests.dist Wed Jul 5 15:58:23 2017 (r320680) @@ -16,6 +16,8 @@ .. expr .. + ln + .. ls .. mv