From 834f274fbfa0642e62944784a06b0e184065bdf0 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 12 Feb 2020 16:04:51 -0500 Subject: [PATCH] ZTS: Interpret env vars in faketty on FreeBSD This was missed in review. On FreeBSD, script does not understand environment variables being passed as a command. Use env to make faketty handle env vars on FreeBSD. Reviewed-by: Igor Kozhukhov Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9981 --- tests/zfs-tests/include/commands.cfg | 1 + tests/zfs-tests/include/libtest.shlib | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg index 77562700c8..b6cc3402be 100644 --- a/tests/zfs-tests/include/commands.cfg +++ b/tests/zfs-tests/include/commands.cfg @@ -114,6 +114,7 @@ export SYSTEM_FILES_COMMON='arp export SYSTEM_FILES_FREEBSD='chflags compress dumpon + env fsck getextattr gpart diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index bddca368d1..d13abc4d6a 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -3970,7 +3970,7 @@ function stat_size # function faketty { if is_freebsd; then - script -q /dev/null "$@" + script -q /dev/null env "$@" else script --return --quiet -c "$*" /dev/null fi