diff options
3 files changed, 8 insertions, 5 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh index af5e145f9..6344b8d05 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_change-key/zfs_change-key_format.ksh @@ -16,6 +16,7 @@ # # Copyright (c) 2017 Datto, Inc. All rights reserved. +# Copyright (c) 2019 DilOS # . $STF_SUITE/include/libtest.shlib @@ -61,11 +62,11 @@ log_must verify_keyformat $TESTPOOL/$TESTFS1 "hex" log_must zfs unload-key $TESTPOOL/$TESTFS1 log_must eval "echo $HEXKEY | zfs load-key $TESTPOOL/$TESTFS1" -log_must eval "echo -n $RAWKEY | zfs change-key -o keyformat=raw" \ +log_must eval "printf '%s' $RAWKEY | zfs change-key -o keyformat=raw" \ "$TESTPOOL/$TESTFS1" log_must verify_keyformat $TESTPOOL/$TESTFS1 "raw" log_must zfs unload-key $TESTPOOL/$TESTFS1 -log_must eval "echo -n $RAWKEY | zfs load-key $TESTPOOL/$TESTFS1" +log_must eval "printf '%s' $RAWKEY | zfs load-key $TESTPOOL/$TESTFS1" log_pass "'zfs change-key -o' changes the key format" diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh index d915c5f57..a46cb55f3 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_crypt_combos.ksh @@ -16,6 +16,7 @@ # # Copyright (c) 2017, Datto, Inc. All rights reserved. +# Copyright (c) 2019, DilOS # . $STF_SUITE/include/libtest.shlib @@ -75,7 +76,7 @@ typeset -i i=0 while (( i < ${#ENCRYPTION_ALGS[*]} )); do typeset -i j=0 while (( j < ${#KEYFORMATS[*]} )); do - log_must eval "echo -n ${USER_KEYS[j]} | zfs create" \ + log_must eval "printf '%s' ${USER_KEYS[j]} | zfs create" \ "-o ${ENCRYPTION_ALGS[i]} -o ${KEYFORMATS[j]}" \ "$TESTPOOL/$TESTFS1" diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh index 8b7ca4799..d28d5953c 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_crypt_combos.ksh @@ -16,6 +16,7 @@ # # Copyright (c) 2017, Datto, Inc. All rights reserved. +# Copyright (c) 2019, DilOS # . $STF_SUITE/include/libtest.shlib @@ -70,13 +71,13 @@ typeset -i i=0 while (( i < ${#ENCRYPTION_ALGS[*]} )); do typeset -i j=0 while (( j < ${#KEYFORMATS[*]} )); do - log_must eval "echo -n ${USER_KEYS[j]} | zpool create" \ + log_must eval "printf '%s' ${USER_KEYS[j]} | zpool create" \ "-O ${ENCRYPTION_ALGS[i]} -O ${KEYFORMATS[j]}" \ "$TESTPOOL $DISKS" propertycheck $TESTPOOL ${ENCRYPTION_PROPS[i]} || \ log_fail "failed to set ${ENCRYPTION_ALGS[i]}" - propertycheck $TESTPOOL ${KEY_FORMATS[j]} || \ + propertycheck $TESTPOOL ${KEYFORMATS[j]} || \ log_fail "failed to set ${KEYFORMATS[j]}" log_must zpool destroy $TESTPOOL |