From a1423456415ad4784b31513cfe11438d2446881f Mon Sep 17 00:00:00 2001 From: Piotr Pawel Stefaniak Date: Sat, 20 Aug 2022 12:16:18 +0200 Subject: [PATCH] sh: nullify ENV in tests This is to avoid loading .shrc which may contain commands that would result in output different than expected. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D35876 --- bin/sh/tests/builtins/cd10.0 | 2 +- bin/sh/tests/builtins/fc1.0 | 2 +- bin/sh/tests/execution/int-cmd1.0 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sh/tests/builtins/cd10.0 b/bin/sh/tests/builtins/cd10.0 index f4b5e0ffca5c..5c165cb21fcc 100644 --- a/bin/sh/tests/builtins/cd10.0 +++ b/bin/sh/tests/builtins/cd10.0 @@ -3,4 +3,4 @@ # Precondition (cd /bin) || exit # Verify write error is ignored. -$SH +m -ic 'CDPATH=/:; cd bin 1output 2>error & +ENV= HISTFILE=/dev/null ${SH} +m -i output 2>error & { # Syntax error echo ')' >&3 diff --git a/bin/sh/tests/execution/int-cmd1.0 b/bin/sh/tests/execution/int-cmd1.0 index a1f097b774d6..6b1d366b2e7a 100644 --- a/bin/sh/tests/execution/int-cmd1.0 +++ b/bin/sh/tests/execution/int-cmd1.0 @@ -1,3 +1,3 @@ # $FreeBSD$ -! echo echo bad | $SH -ic 'fi' 2>/dev/null +! echo echo bad | ENV= $SH -ic 'fi' 2>/dev/null