The branch, master has been updated via fdc98ff5560 s3:tests: Reformat test_net_usershare.sh via 4c00642e726 s3:tests: Reformat test_net_tdb.sh via 6170f97bb11 s3:tests: Reformat test_net_rpc_share_allowedusers.sh via 7a916f886f3 s3:tests: Reformat test_net_rpc_oldjoin.sh via e1142d35206 s3:tests: Reformat test_net_rpc_join_creds.sh via 6b934192a08 s3:tests: Reformat test_net_rpc_join.sh via d9217a3eef6 s3:tests: Reformat test_net_registry_roundtrip.sh via d15210955bf s3:tests: Reformat test_net_registry_import.sh via d87d67a2e07 s3:tests: Reformat test_net_registry_check.sh via 08b02d4bb83 s3:tests: Reformat test_net_registry.sh via de01136107f s3:tests: Reformat test_net_misc.sh via a0802f556f2 s3:tests: Reformat test_net_machine_account.sh via 534ae9349ab s3:tests: Reformat test_net_lookup.sh via cf873c09d86 s3:tests: Reformat test_net_dom_join_fail_dc.sh via bdc6adaad58 s3:tests: Reformat test_net_cred_change.sh from b9188763823 s3:tests: Reformat test_net_conf.sh
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit fdc98ff5560903d64b10980d66826e8c50ef204a Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_usershare.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org> Autobuild-Date(master): Wed Jun 8 07:28:08 UTC 2022 on sn-devel-184 commit 4c00642e726bd9687113d482c72526b5dedec83a Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_tdb.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 6170f97bb11ac510508afd95927b6762f7bd8cf9 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_share_allowedusers.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 7a916f886f335296de86bbfe3fe74d5951f09b50 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_oldjoin.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit e1142d35206921995ea7a6e82d5bbdfe8dd90f02 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_join_creds.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 6b934192a08b99035668ad8ac90236e9228295f3 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_rpc_join.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit d9217a3eef6011c86b13e89fb3428dfd3f1baa5e Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_roundtrip.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit d15210955bffa7e2fade03c7e22dde20a9c03285 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_import.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit d87d67a2e071c6f3e8e1fa6bd576b08a321058a1 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry_check.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 08b02d4bb839611bee22d625fb50db3f7c1395f4 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_registry.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit de01136107f0f52531ccee17dc8732f8e353b085 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_misc.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit a0802f556f23b585db6cac2d639e412aa83f47f2 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_machine_account.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 534ae9349ab4b5df7cdcb7fcd49875ba332b9045 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_lookup.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit cf873c09d86064cae5a36ccbbf4a64e969e84404 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_dom_join_fail_dc.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit bdc6adaad5836de9f756327ed70cc85c66b30d70 Author: Andreas Schneider <a...@samba.org> Date: Fri Apr 22 15:34:09 2022 +0200 s3:tests: Reformat test_net_cred_change.sh shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: source3/script/tests/test_net_cred_change.sh | 14 +- source3/script/tests/test_net_dom_join_fail_dc.sh | 8 +- source3/script/tests/test_net_lookup.sh | 46 ++--- source3/script/tests/test_net_machine_account.sh | 17 +- source3/script/tests/test_net_misc.sh | 31 ++-- source3/script/tests/test_net_registry.sh | 187 ++++++++++---------- source3/script/tests/test_net_registry_check.sh | 23 ++- source3/script/tests/test_net_registry_import.sh | 86 ++++----- .../script/tests/test_net_registry_roundtrip.sh | 196 ++++++++++----------- source3/script/tests/test_net_rpc_join.sh | 14 +- source3/script/tests/test_net_rpc_join_creds.sh | 16 +- source3/script/tests/test_net_rpc_oldjoin.sh | 21 ++- .../tests/test_net_rpc_share_allowedusers.sh | 23 ++- source3/script/tests/test_net_tdb.sh | 42 ++--- source3/script/tests/test_net_usershare.sh | 19 +- 15 files changed, 372 insertions(+), 371 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/script/tests/test_net_cred_change.sh b/source3/script/tests/test_net_cred_change.sh index 794b054139e..86d95dde60e 100755 --- a/source3/script/tests/test_net_cred_change.sh +++ b/source3/script/tests/test_net_cred_change.sh @@ -1,17 +1,17 @@ #!/bin/sh if [ $# -lt 1 ]; then -cat <<EOF + cat <<EOF Usage: test_net_cred_change.sh CONFIGURATION EOF -exit 1; + exit 1 fi -incdir=`dirname $0`/../../../testprogs/blackbox +incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh -testit "1: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=`expr $failed + 1` -testit "1: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=`expr $failed + 1` -testit "2: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=`expr $failed + 1` -testit "2: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=`expr $failed + 1` +testit "1: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=$(expr $failed + 1) +testit "1: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=$(expr $failed + 1) +testit "2: change machine secret" $VALGRIND $BINDIR/wbinfo --change-secret || failed=$(expr $failed + 1) +testit "2: validate secret" $VALGRIND $BINDIR/net rpc testjoin $@ || failed=$(expr $failed + 1) testok $0 $failed diff --git a/source3/script/tests/test_net_dom_join_fail_dc.sh b/source3/script/tests/test_net_dom_join_fail_dc.sh index 135e1daa07d..436749248aa 100755 --- a/source3/script/tests/test_net_dom_join_fail_dc.sh +++ b/source3/script/tests/test_net_dom_join_fail_dc.sh @@ -1,10 +1,10 @@ #!/bin/sh if [ $# -lt 4 ]; then -cat <<EOF + cat <<EOF Usage: test_net_dom_join_fail_dc.sh USERNAME PASSWORD DOMAIN PREFIX EOF -exit 1; + exit 1 fi DC_USERNAME="$1" @@ -14,9 +14,9 @@ PREFIX="$4" shift 4 ADDARGS="$*" -incdir=`dirname $0`/../../../testprogs/blackbox +incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh mkdir -p $PREFIX/private -testit_expect_failure "net_dom_join_fail_dc" $VALGRIND $BINDIR/net dom join domain=$DOMAIN account=$USERNAME password=$PASSWORD --option=netbiosname=netrpcjointest --option=domainlogons=yes --option=privatedir=$PREFIX/private $ADDARGS || failed=`expr $failed + 1` +testit_expect_failure "net_dom_join_fail_dc" $VALGRIND $BINDIR/net dom join domain=$DOMAIN account=$USERNAME password=$PASSWORD --option=netbiosname=netrpcjointest --option=domainlogons=yes --option=privatedir=$PREFIX/private $ADDARGS || failed=$(expr $failed + 1) testok $0 $failed diff --git a/source3/script/tests/test_net_lookup.sh b/source3/script/tests/test_net_lookup.sh index c2e032ca827..161c1c99262 100755 --- a/source3/script/tests/test_net_lookup.sh +++ b/source3/script/tests/test_net_lookup.sh @@ -1,16 +1,22 @@ #!/bin/sh -if [ $# != 6 ] ; then - echo "Usage: $0 SERVER USERNAME PASSWORD NET SAMBA-TOOL DNS-ZONE" - exit 1 +if [ $# != 6 ]; then + echo "Usage: $0 SERVER USERNAME PASSWORD NET SAMBA-TOOL DNS-ZONE" + exit 1 fi -SERVER="$1"; shift 1 -USERNAME="$1"; shift 1 -PASSWORD="$1"; shift 1 -NET="$1"; shift 1 -SAMBATOOL="$1"; shift 1 -DNSZONE="$1"; shift 1 +SERVER="$1" +shift 1 +USERNAME="$1" +shift 1 +PASSWORD="$1" +shift 1 +NET="$1" +shift 1 +SAMBATOOL="$1" +shift 1 +DNSZONE="$1" +shift 1 SITE="mysite" @@ -20,29 +26,29 @@ incdir=$(dirname $0)/../../../testprogs/blackbox failed=0 $SAMBATOOL dns add "$SERVER" -U "$USERNAME"%"$PASSWORD" \ - _msdcs."$DNSZONE" _ldap._tcp."$SITE"._sites.dc \ - SRV "mydc.$DNSZONE 389 100 100" + _msdcs."$DNSZONE" _ldap._tcp."$SITE"._sites.dc \ + SRV "mydc.$DNSZONE 389 100 100" $SAMBATOOL dns add "$SERVER" -U "$USERNAME"%"$PASSWORD" \ - "$DNSZONE" mydc \ - A "1.2.3.4" + "$DNSZONE" mydc \ + A "1.2.3.4" # global lookup testit_grep global 10.53.57.30:389 $NET lookup ldap "$DNSZONE" || - failed = `expr $failed + 1` + failed = $(expr $failed + 1) # correct site-aware lookup testit_grep site-aware 1.2.3.4:389 $NET lookup ldap "$DNSZONE" "$SITE" || - failed = `expr $failed + 1` + failed = $(expr $failed + 1) # lookup with nonexisting site -- global fallback testit_grep global 10.53.57.30:389 $NET lookup ldap "$DNSZONE" nosite || - failed = `expr $failed + 1` + failed = $(expr $failed + 1) $SAMBATOOL dns delete "$SERVER" -U "$USERNAME"%"$PASSWORD" \ - "$DNSZONE" mydc \ - A "1.2.3.4" + "$DNSZONE" mydc \ + A "1.2.3.4" $SAMBATOOL dns delete "$SERVER" -U "$USERNAME"%"$PASSWORD" \ - _msdcs."$DNSZONE" _ldap._tcp."$SITE"._sites.dc \ - SRV "mydc.$DNSZONE 389 100 100" + _msdcs."$DNSZONE" _ldap._tcp."$SITE"._sites.dc \ + SRV "mydc.$DNSZONE 389 100 100" testok $0 $failed diff --git a/source3/script/tests/test_net_machine_account.sh b/source3/script/tests/test_net_machine_account.sh index 69844443bf6..d0252cab4f8 100755 --- a/source3/script/tests/test_net_machine_account.sh +++ b/source3/script/tests/test_net_machine_account.sh @@ -2,21 +2,24 @@ # Reproducer for https://bugzilla.samba.org/show_bug.cgi?id=14908 if [ $# -lt 2 ]; then - echo "Usage: $0 NET CONFFILE SERVER_IP" - exit 1 + echo "Usage: $0 NET CONFFILE SERVER_IP" + exit 1 fi -NET="$1"; shift -CONFFILE="$1"; shift -SERVER_IP="$1"; shift +NET="$1" +shift +CONFFILE="$1" +shift +SERVER_IP="$1" +shift export UID_WRAPPER_ROOT=1 -incdir=`dirname $0`/../../../testprogs/blackbox +incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh failed=0 -testit "net_ads_user" $VALGRIND $NET rpc user --configfile="$CONFFILE" -S "$SERVER_IP" -P || failed=`expr $failed + 1` +testit "net_ads_user" $VALGRIND $NET rpc user --configfile="$CONFFILE" -S "$SERVER_IP" -P || failed=$(expr $failed + 1) testok $0 $failed diff --git a/source3/script/tests/test_net_misc.sh b/source3/script/tests/test_net_misc.sh index cc8781c355b..94842182f66 100755 --- a/source3/script/tests/test_net_misc.sh +++ b/source3/script/tests/test_net_misc.sh @@ -3,10 +3,10 @@ # various tests for the "net" command if [ $# -lt 3 ]; then -cat <<EOF + cat <<EOF Usage: test_net_misc.sh SCRIPTDIR SERVERCONFFILE NET CONFIGURATION EOF -exit 1; + exit 1 fi SCRIPTDIR="$1" @@ -26,7 +26,7 @@ NETTIME="${NET} --option=clientmaxprotocol=${PROTOCOL} time" NETLOOKUP="${NET} --option=clientmaxprotocol=${PROTOCOL} lookup" NETSHARE="${NET} -U${USERNAME}%${PASSWORD} --option=clientmaxprotocol=${PROTOCOL} -S ${SERVER} share" -incdir=`dirname $0`/../../../testprogs/blackbox +incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh failed=0 @@ -53,29 +53,28 @@ test_share() } testit "get the time" \ - test_time || \ - failed=`expr $failed + 1` + test_time || + failed=$(expr $failed + 1) testit "get the system time" \ - test_time system || \ - failed=`expr $failed + 1` + test_time system || + failed=$(expr $failed + 1) testit "get the time zone" \ - test_time zone || \ - failed=`expr $failed + 1` + test_time zone || + failed=$(expr $failed + 1) testit "lookup the PDC" \ - test_lookup pdc || \ - failed=`expr $failed + 1` + test_lookup pdc || + failed=$(expr $failed + 1) testit "lookup the master browser" \ - test_lookup master || \ - failed=`expr $failed + 1` + test_lookup master || + failed=$(expr $failed + 1) # This test attempts to lookup shares testit "lookup share list" \ - test_share list || \ - failed=`expr $failed + 1` + test_share list || + failed=$(expr $failed + 1) testok $0 $failed - diff --git a/source3/script/tests/test_net_registry.sh b/source3/script/tests/test_net_registry.sh index 5158d612752..4de0211e65b 100755 --- a/source3/script/tests/test_net_registry.sh +++ b/source3/script/tests/test_net_registry.sh @@ -8,10 +8,10 @@ # rpc tests are chose by specifying "rpc" as commandline parameter. if [ $# -lt 3 ]; then -cat <<EOF + cat <<EOF Usage: test_net_registry.sh SCRIPTDIR SERVERCONFFILE NET CONFIGURATION RPC EOF -exit 1; + exit 1 fi SCRIPTDIR="$1" @@ -22,13 +22,13 @@ RPC="$5" NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION" -if test "x${RPC}" = "xrpc" ; then +if test "x${RPC}" = "xrpc"; then NETREG="${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry" else NETREG="${NET} registry" fi -incdir=`dirname $0`/../../../testprogs/blackbox +incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh failed=0 @@ -52,7 +52,7 @@ test_enumerate_nonexisting() KEY="$1" ${NETREG} enumerate ${KEY} - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: enumerate succeeded with key '${KEY}'" false else @@ -63,7 +63,7 @@ test_enumerate_nonexisting() test_enumerate_no_key() { ${NETREG} enumerate - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: enumerate succeeded without any key spcified" false else @@ -76,9 +76,9 @@ test_create_existing() KEY="HKLM" EXPECTED="createkey opened existing ${KEY}" - OUTPUT=`${NETREG} createkey ${KEY}` - if test "x$?" = "x0" ; then - if test "$OUTPUT" = "$EXPECTED" ; then + OUTPUT=$(${NETREG} createkey ${KEY}) + if test "x$?" = "x0"; then + if test "$OUTPUT" = "$EXPECTED"; then true else echo "got '$OUTPUT', expected '$EXPECTED'" @@ -93,11 +93,11 @@ test_create_existing() test_createkey() { KEY="$1" - BASEKEY=`dirname $KEY` - SUBKEY=`basename $KEY` + BASEKEY=$(dirname $KEY) + SUBKEY=$(basename $KEY) - OUTPUT=`${NETREG} createkey ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} createkey ${KEY}) + if test "x$?" != "x0"; then echo "ERROR: createkey ${KEY} failed" echo "output:" printf "%s\n" "$OUTPUT" @@ -106,8 +106,8 @@ test_createkey() fi # check enumerate of basekey lists new key: - OUTPUT=`${NETREG} enumerate ${BASEKEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} enumerate ${BASEKEY}) + if test "x$?" != "x0"; then echo "ERROR: failed to enumerate key '${BASEKEY}'" echo "output:" printf "%s\n" "$OUTPUT" @@ -117,7 +117,7 @@ test_createkey() EXPECTED="Keyname = ${SUBKEY}" printf "%s\n" "$OUTPUT" | grep '^Keyname' | grep ${SUBKEY} - if test "x$?" != "x0" ; then + if test "x$?" != "x0"; then echo "ERROR: did not find expexted '$EXPECTED' in output" echo "output:" printf "%s\n" "$OUTPUT" @@ -131,26 +131,26 @@ test_createkey() test_deletekey() { KEY="$1" - BASEKEY=`dirname ${KEY}` - SUBKEY=`basename ${KEY}` + BASEKEY=$(dirname ${KEY}) + SUBKEY=$(basename ${KEY}) - OUTPUT=`test_createkey "${KEY}"` - if test "x$?" != "x0" ; then + OUTPUT=$(test_createkey "${KEY}") + if test "x$?" != "x0"; then printf "%s\n" "${OUTPUT}" false return fi - OUTPUT=`${NETREG} deletekey ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} deletekey ${KEY}) + if test "x$?" != "x0"; then printf "%s\n" "${OUTPUT}" false return fi # check enumerate of basekey does not show key anymore: - OUTPUT=`${NETREG} enumerate ${BASEKEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} enumerate ${BASEKEY}) + if test "x$?" != "x0"; then printf "%s\n" "$OUTPUT" false return @@ -158,7 +158,7 @@ test_deletekey() UNEXPECTED="Keyname = ${SUBKEY}" printf "%s\n" "$OUTPUT" | grep '^Keyname' | grep ${SUBKEY} - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: found '$UNEXPECTED' after delete in output" echo "output:" printf "%s\n" "$OUTPUT" @@ -167,7 +167,7 @@ test_deletekey() # check enumerate of key itself does not work anymore: ${NETREG} enumerate ${KEY} - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: 'enumerate ${KEY}' works after 'deletekey ${KEY}'" false else @@ -179,15 +179,15 @@ test_deletekey_nonexisting() { KEY="$1" - OUTPUT=`test_deletekey "${KEY}"` - if test "x$?" != "x0" ; then + OUTPUT=$(test_deletekey "${KEY}") + if test "x$?" != "x0"; then printf "%s\n" "${OUTPUT}" false return fi ${NETREG} deletekey "${KEY}" - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: delete after delete succeeded for key '${KEY}'" false fi @@ -196,13 +196,13 @@ test_deletekey_nonexisting() test_createkey_with_subkey() { KEY="$1" - KEY2=`dirname ${KEY}` - SUBKEYNAME2=`basename ${KEY}` - BASENAME=`dirname ${KEY2}` - SUBKEYNAME1=`basename ${KEY2}` + KEY2=$(dirname ${KEY}) + SUBKEYNAME2=$(basename ${KEY}) + BASENAME=$(dirname ${KEY2}) + SUBKEYNAME1=$(basename ${KEY2}) - OUTPUT=`${NETREG} createkey ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} createkey ${KEY}) + if test "x$?" != "x0"; then echo "ERROR: createkey ${KEY} failed" printf "%s\n" "${OUTPUT}" false @@ -210,8 +210,8 @@ test_createkey_with_subkey() fi # check we can enumerate to level key - OUTPUT=`${NETREG} enumerate ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} enumerate ${KEY}) + if test "x$?" != "x0"; then echo "ERROR: failed to enumerate '${KEY}' after creation" printf "%s\n" "${OUTPUT}" false @@ -225,18 +225,18 @@ test_createkey_with_subkey() test_deletekey_with_subkey() { KEY="$1" - KEY2=`dirname ${KEY}` + KEY2=$(dirname ${KEY}) - OUTPUT=`${NETREG} createkey ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} createkey ${KEY}) + if test "x$?" != "x0"; then printf "%s\n" "${OUTPUT}" false return fi - OUTPUT=`${NETREG} deletekey ${KEY2}` + OUTPUT=$(${NETREG} deletekey ${KEY2}) - if test "x$?" = "x0" ; then + if test "x$?" = "x0"; then echo "ERROR: delete of key with subkey succeeded" echo "output:" printf "%s\n" "$OUTPUT" @@ -254,23 +254,23 @@ test_setvalue() VALTYPE="$3" VALVALUE="$4" - OUTPUT=`test_createkey ${KEY}` - if test "x$?" != "x0" ; then + OUTPUT=$(test_createkey ${KEY}) + if test "x$?" != "x0"; then printf "%s\n" "${OUTPUT}" false return fi - OUTPUT=`${NETREG} setvalue ${KEY} "${VALNAME}" ${VALTYPE} ${VALVALUE}` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} setvalue ${KEY} "${VALNAME}" ${VALTYPE} ${VALVALUE}) + if test "x$?" != "x0"; then echo "ERROR: failed to set value testval in key ${KEY}" printf "%s\n" "${OUTPUT}" false return fi - OUTPUT=`${NETREG} getvalueraw ${KEY} "${VALNAME}"` - if test "x$?" != "x0" ; then + OUTPUT=$(${NETREG} getvalueraw ${KEY} "${VALNAME}") + if test "x$?" != "x0"; then echo "ERROR: failure calling getvalueraw for key ${KEY}" echo output: printf "%s\n" "${OUTPUT}" @@ -278,7 +278,7 @@ test_setvalue() return fi -- Samba Shared Repository