From owner-svn-src-stable@freebsd.org Tue Dec 29 01:07:01 2015 Return-Path: Delivered-To: svn-src-stable@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 DD915A4B91B; Tue, 29 Dec 2015 01:07:01 +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 95DA618B0; Tue, 29 Dec 2015 01:07:01 +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 tBT170Ph016502; Tue, 29 Dec 2015 01:07:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBT170pi016500; Tue, 29 Dec 2015 01:07:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512290107.tBT170pi016500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 29 Dec 2015 01:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292853 - stable/10/contrib/netbsd-tests/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2015 01:07:02 -0000 Author: ngie Date: Tue Dec 29 01:07:00 2015 New Revision: 292853 URL: https://svnweb.freebsd.org/changeset/base/292853 Log: MFC r292581: Use stable output to a test file instead of depending on the OS name being grep'able in /bin/sh This fixes the situation where the OS has been rebranded to something other than `FreeBSD` Obtained from: Isilon OneFS (^/onefs/head@r511419) Reviewed by: cem, Daniel O'Connor Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/netbsd-tests/usr.bin/grep/d_binary.out stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/usr.bin/grep/d_binary.out ============================================================================== --- stable/10/contrib/netbsd-tests/usr.bin/grep/d_binary.out Tue Dec 29 01:05:48 2015 (r292852) +++ stable/10/contrib/netbsd-tests/usr.bin/grep/d_binary.out Tue Dec 29 01:07:00 2015 (r292853) @@ -1 +1 @@ -Binary file /bin/sh matches +Binary file test.file matches Modified: stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh ============================================================================== --- stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue Dec 29 01:05:48 2015 (r292852) +++ stable/10/contrib/netbsd-tests/usr.bin/grep/t_grep.sh Tue Dec 29 01:07:00 2015 (r292853) @@ -43,7 +43,20 @@ binary_head() } binary_body() { + # Begin FreeBSD + # + # Generate stable output instead of depending on uname to match the + # branded OS name of /bin/sh + if true; then + dd if=/dev/zero count=1 of=test.file + echo -n "foobar" >> test.file + atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep foobar test.file + else + # End FreeBSD atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep $(uname) /bin/sh + # Begin FreeBSD + fi + # End FreeBSD } atf_test_case recurse