From owner-dev-commits-src-branches@freebsd.org Sat Jan 30 15:11:47 2021 Return-Path: Delivered-To: dev-commits-src-branches@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 6B25E4EFC6E; Sat, 30 Jan 2021 15:11:47 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DSd366XGCz4fgM; Sat, 30 Jan 2021 15:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0EB317BDE; Sat, 30 Jan 2021 15:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10UFBkal033038; Sat, 30 Jan 2021 15:11:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10UFBk6F033037; Sat, 30 Jan 2021 15:11:46 GMT (envelope-from git) Date: Sat, 30 Jan 2021 15:11:46 GMT Message-Id: <202101301511.10UFBk6F033037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jilles Tjoelker Subject: git: c48240fa6f8e - stable/12 - sh/tests: Add a second kind of binary scripts without #! MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c48240fa6f8e168325a278f8b8cc075779615ddf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2021 15:11:48 -0000 The branch stable/12 has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=c48240fa6f8e168325a278f8b8cc075779615ddf commit c48240fa6f8e168325a278f8b8cc075779615ddf Author: Jilles Tjoelker AuthorDate: 2021-01-03 20:27:50 +0000 Commit: Jilles Tjoelker CommitDate: 2021-01-30 15:10:26 +0000 sh/tests: Add a second kind of binary scripts without #! One of the reasons for git commit e0f5c1387df23c8c4811f5b24a7ef6ecac51a71a was to make "actually portable executables" work. Add a test that is more like those. MFC after: 1 week (cherry picked from commit 52981a1694be7a70013e5149c020706c9b6411f9) --- bin/sh/tests/execution/Makefile | 1 + bin/sh/tests/execution/shellproc7.0 | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/bin/sh/tests/execution/Makefile b/bin/sh/tests/execution/Makefile index c7f68a7404aa..ddf2ff7f53b6 100644 --- a/bin/sh/tests/execution/Makefile +++ b/bin/sh/tests/execution/Makefile @@ -61,6 +61,7 @@ ${PACKAGE}FILES+= shellproc3.0 ${PACKAGE}FILES+= shellproc4.0 ${PACKAGE}FILES+= shellproc5.0 ${PACKAGE}FILES+= shellproc6.0 +${PACKAGE}FILES+= shellproc7.0 ${PACKAGE}FILES+= subshell1.0 subshell1.0.stdout ${PACKAGE}FILES+= subshell2.0 ${PACKAGE}FILES+= subshell3.0 diff --git a/bin/sh/tests/execution/shellproc7.0 b/bin/sh/tests/execution/shellproc7.0 new file mode 100644 index 000000000000..2a99ae74c151 --- /dev/null +++ b/bin/sh/tests/execution/shellproc7.0 @@ -0,0 +1,10 @@ +# $FreeBSD$ +# Non-POSIX trickery that is widely supported, +# used by https://justine.lol/ape.html + +T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit +trap 'rm -rf "${T}"' 0 +printf "MZqFpD='\n\0'\n#'\"\necho this is a test\n" >"$T/testshellproc" +chmod 755 "$T/testshellproc" +PATH=$T:$PATH +[ "`testshellproc`" = "this is a test" ]