From owner-svn-src-all@freebsd.org Fri Jun 5 08:46:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87CFC344AC4; Fri, 5 Jun 2020 08:46:51 +0000 (UTC) (envelope-from arichardson@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49dbqH367nz4T8P; Fri, 5 Jun 2020 08:46:51 +0000 (UTC) (envelope-from arichardson@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 613AFE51A; Fri, 5 Jun 2020 08:46:51 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0558kp5M028808; Fri, 5 Jun 2020 08:46:51 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0558kpap028807; Fri, 5 Jun 2020 08:46:51 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <202006050846.0558kpap028807@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 5 Jun 2020 08:46:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361829 - in head/lib/libc/tests: gen/posix_spawn sys X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head/lib/libc/tests: gen/posix_spawn sys X-SVN-Commit-Revision: 361829 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.33 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: Fri, 05 Jun 2020 08:46:51 -0000 Author: arichardson Date: Fri Jun 5 08:46:50 2020 New Revision: 361829 URL: https://svnweb.freebsd.org/changeset/base/361829 Log: Avoid using non-portable dd status=none flag Copying the approach chosen in r309412. This fixes building the libc tests on a macOS host since the macOS /bin/dd binary does not support status=none. As there only seem to be two uses, this commit changes the two Makefiles. If this becomes more common, we could also add a wrapper bootstrap script that ignores status= and forwards the remaining args to the real dd. Another alternative would be to remove the status flag and pipe stderr to /dev/null, but them we lose error messages. Reviewed By: brooks Differential Revision: https://reviews.freebsd.org/D24785 Modified: head/lib/libc/tests/gen/posix_spawn/Makefile head/lib/libc/tests/sys/Makefile Modified: head/lib/libc/tests/gen/posix_spawn/Makefile ============================================================================== --- head/lib/libc/tests/gen/posix_spawn/Makefile Fri Jun 5 08:12:08 2020 (r361828) +++ head/lib/libc/tests/gen/posix_spawn/Makefile Fri Jun 5 08:46:50 2020 (r361829) @@ -19,8 +19,12 @@ CLEANFILES+= h_nonexec .include "../../Makefile.netbsd-tests" +# The dd status=none option is non-standard. Only use it when this test succeeds +# rather than require dd to be a bootstrap tool. +DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true +DD=dd ${DD_NOSTATUS} h_zero: - dd if=/dev/zero of=h_zero bs=1k count=2 status=none + ${DD} if=/dev/zero of=h_zero bs=1k count=2 chmod a+x h_zero CLEANFILES+= h_zero Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Fri Jun 5 08:12:08 2020 (r361828) +++ head/lib/libc/tests/sys/Makefile Fri Jun 5 08:46:50 2020 (r361829) @@ -96,7 +96,11 @@ truncate_test_FILESGRP= wheel truncate_test_FILESPACKAGE= ${PACKAGE} CLEANFILES= truncate_test.root_owned +# The dd status=none option is non-standard. Only use it when this test succeeds +# rather than require dd to be a bootstrap tool. +DD_NOSTATUS!=(dd status=none count=0 2> /dev/null && echo status=none) || true +DD=dd ${DD_NOSTATUS} truncate_test.root_owned: - dd if=/dev/null bs=1 count=1 of=${.TARGET} status=none + ${DD} if=/dev/null bs=1 count=1 of=${.TARGET} .include