diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2019-02-01 21:15:10 +0200 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2019-02-01 21:15:10 +0200 |
commit | a84dc1973bc459dd3bc39a13dc5b5af59d9d5f21 (patch) | |
tree | e6b1e222a678da18c51d32ccded1a944afc583bf | |
parent | d9010c5b67a60e9f0b9051ba6597005e33e58266 (diff) | |
download | tor-a84dc1973bc459dd3bc39a13dc5b5af59d9d5f21.tar.gz tor-a84dc1973bc459dd3bc39a13dc5b5af59d9d5f21.zip |
Fix instances of SC2006 in test_keygen.sh
-rwxr-xr-x | src/test/test_keygen.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_keygen.sh b/src/test/test_keygen.sh index 455f9e7d42..d807bd419c 100755 --- a/src/test/test_keygen.sh +++ b/src/test/test_keygen.sh @@ -13,7 +13,7 @@ if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then fi fi -UNAME_OS=`uname -s | cut -d_ -f1` +UNAME_OS=$(uname -s | cut -d_ -f1) if test "$UNAME_OS" = 'CYGWIN' || \ test "$UNAME_OS" = 'MSYS' || \ test "$UNAME_OS" = 'MINGW'; then @@ -65,10 +65,10 @@ die() { echo "$1" >&2 ; exit 5; } check_dir() { [ -d "$1" ] || die "$1 did not exist"; } check_file() { [ -e "$1" ] || die "$1 did not exist"; } check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; } -check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: `dump $1` vs `dump $2`"; } +check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: $(dump $1) vs $(dump $2)"; } check_keys_eq() { check_files_eq "${SRC}/keys/${1}" "${ME}/keys/${1}"; } -DATA_DIR=`mktemp -d -t tor_keygen_tests.XXXXXX` +DATA_DIR=$(mktemp -d -t tor_keygen_tests.XXXXXX) if [ -z "$DATA_DIR" ]; then echo "Failure: mktemp invocation returned empty string" >&2 exit 3 @@ -80,7 +80,7 @@ fi trap "rm -rf '$DATA_DIR'" 0 # Use an absolute path for this or Tor will complain -DATA_DIR=`cd "${DATA_DIR}" && pwd` +DATA_DIR=$(cd "${DATA_DIR}" && pwd) touch "${DATA_DIR}/empty_torrc" @@ -143,7 +143,7 @@ ME="${DATA_DIR}/case2a" SRC="${DATA_DIR}/orig" mkdir -p "${ME}/keys" cp "${SRC}/keys/ed25519_master_id_public_key" "${ME}/keys/" -${TOR} --DataDirectory "${ME}" --list-fingerprint > "${ME}/stdout" && die "Somehow succeeded when missing secret key, certs: `cat ${ME}/stdout`" || true +${TOR} --DataDirectory "${ME}" --list-fingerprint > "${ME}/stdout" && die "Somehow succeeded when missing secret key, certs: $(cat ${ME}/stdout)" || true check_files_eq "${SRC}/keys/ed25519_master_id_public_key" "${ME}/keys/ed25519_master_id_public_key" grep "We needed to load a secret key.*but couldn't find it" "${ME}/stdout" >/dev/null || die "Tor didn't declare that it was missing a secret key" |