From owner-svn-src-head@freebsd.org Sun Mar 12 03:29:50 2017 Return-Path: Delivered-To: svn-src-head@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 E489CD07E5A; Sun, 12 Mar 2017 03:29:50 +0000 (UTC) (envelope-from ngie@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 B44D41501; Sun, 12 Mar 2017 03:29:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2C3Tnu1016830; Sun, 12 Mar 2017 03:29:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2C3TnKO016829; Sun, 12 Mar 2017 03:29:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703120329.v2C3TnKO016829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Sun, 12 Mar 2017 03:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315098 - head/usr.bin/xinstall/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Mar 2017 03:29:51 -0000 Author: ngie Date: Sun Mar 12 03:29:49 2017 New Revision: 315098 URL: https://svnweb.freebsd.org/changeset/base/315098 Log: Clarify src vs dest path mismatch in :symbolic_link_{absolute,relative}_body Unfortunately kyua does not omit the path mismatch on failure, so it must be coded into the error message. Cache the values, run the test(1) call, then print out the values in an atf_fail call to emit the required diagnostics to debug why things are failing. MFC after: 1 week Sponsored by: Dell EMC Isilon Modified: head/usr.bin/xinstall/tests/install_test.sh Modified: head/usr.bin/xinstall/tests/install_test.sh ============================================================================== --- head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:29:23 2017 (r315097) +++ head/usr.bin/xinstall/tests/install_test.sh Sun Mar 12 03:29:49 2017 (r315098) @@ -283,7 +283,11 @@ symbolic_link_absolute_body() { atf_check install -l sa testf copyf [ testf -ef copyf ] || atf_fail "not same file" [ -L copyf ] || atf_fail "copy is not symlink" - [ "$(readlink copyf)" = "$(pwd -P)/testf" ] || atf_fail "unexpected symlink contents" + copyf_path=$(readlink copyf) + testf_path="$(pwd -P)/testf" + if [ "$copyf_path" != "$testf_path" ]; then + atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + fi } atf_test_case symbolic_link_relative @@ -292,7 +296,11 @@ symbolic_link_relative_body() { atf_check install -l sr testf copyf [ testf -ef copyf ] || atf_fail "not same file" [ -L copyf ] || atf_fail "copy is not symlink" - [ "$(readlink copyf)" = "testf" ] || atf_fail "unexpected symlink contents" + copyf_path=$(readlink copyf) + testf_path="testf" + if [ "$copyf_path" != "$testf_path" ]; then + atf_fail "unexpected symlink ('$copyf_path' != '$testf_path')" + fi } atf_test_case mkdir_simple