Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2019 03:57:49 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343247 - head/usr.bin/cmp/tests
Message-ID:  <201901210357.x0L3vnIx052453@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Jan 21 03:57:49 2019
New Revision: 343247
URL: https://svnweb.freebsd.org/changeset/base/343247

Log:
  Fix cmp(1) tests for "special" mode.
  
  Test failures don't seem to propagate up if atf_check is run in
  a pipeline.  Thus, the tests continued to pass despite the bug reverted
  in r343245.
  
  MFC after:	1 week

Modified:
  head/usr.bin/cmp/tests/cmp_test2.sh

Modified: head/usr.bin/cmp/tests/cmp_test2.sh
==============================================================================
--- head/usr.bin/cmp/tests/cmp_test2.sh	Mon Jan 21 03:48:30 2019	(r343246)
+++ head/usr.bin/cmp/tests/cmp_test2.sh	Mon Jan 21 03:57:49 2019	(r343247)
@@ -31,11 +31,10 @@ special_head() {
 special_body() {
 	echo 0123456789abcdef > a
 	echo 0123456789abcdeg > b
-	cat a | atf_check -s exit:0 cmp a -
-	cat a | atf_check -s exit:0 cmp - a
-	cat b | atf_check -s not-exit:0 cmp a -
-	cat b | atf_check -s not-exit:0 cmp - a
-	true
+	atf_check -s exit:0 -o empty -e empty -x "cat a | cmp a -"
+	atf_check -s exit:0 -o empty -e empty -x "cat a | cmp - a"
+	atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp a -"
+	atf_check -s exit:1 -o not-empty -e empty -x "cat b | cmp - a"
 }
 
 atf_test_case symlink



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901210357.x0L3vnIx052453>