From 04cf419a1e929423f24405dc1963fa291702bf52 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sun, 24 Nov 2024 18:38:40 +0100 Subject: [PATCH] tests: Couple minor fixes --- tests/chown.sh | 4 ++-- tests/run_path_traversal_order.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/chown.sh b/tests/chown.sh index 76732e49..61b5cf26 100644 --- a/tests/chown.sh +++ b/tests/chown.sh @@ -19,9 +19,9 @@ SUDO rm -rf tests/chown/.bob $INSTALL_PATH USER=bobtestuser if [ $(uname) = "Linux" ] || [ $(uname) = "FreeBSD" ]; then - useradd -m $USER + SUDO useradd -m $USER elif [ $(uname) = "Darwin" ]; then - out=$(SUDO sysadminctl -addUser $USER 2>&1) + out=$($SUDO sysadminctl -addUser $USER 2>&1) if [ $? != 0 ]; then echo "Failed to create user: $out" >&2 diff --git a/tests/run_path_traversal_order.sh b/tests/run_path_traversal_order.sh index d69875da..77c50fed 100644 --- a/tests/run_path_traversal_order.sh +++ b/tests/run_path_traversal_order.sh @@ -7,7 +7,7 @@ out=$(bob -C tests/run_path_traversal_order run 2>/dev/null) -if [ $? == 0 ]; then +if [ $? = 0 ]; then echo "\$PATH was not set in order to find command; running should not have succeeded: $out" >&2 exit 1 fi