1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:tests: Create a temporary directory for test_veto_files.sh

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15360

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Andreas Schneider 2023-04-19 20:45:52 +02:00 committed by Jeremy Allison
parent 6e525d55d9
commit b5a66840e3

View File

@ -29,6 +29,10 @@ incdir=$(dirname "$0")/../../../testprogs/blackbox
failed=0
TMPDIR=${PREFIX_ABS}/$(basename "${0}")
mkdir -p "${TMPDIR}" || exit 1
cd "${TMPDIR}" || exit 1
#
# Cleanup function.
#
@ -51,7 +55,7 @@ smbclient_get_expect_error()
{
filename1="$1"
expected_error="$2"
tmpfile=$PREFIX/smbclient_interactive_prompt_commands
tmpfile=${TMPDIR}/smbclient_interactive_prompt_commands
cat >"$tmpfile" <<EOF
get $filename1 got_file
quit
@ -88,7 +92,7 @@ smbclient_create_expect_error()
{
filename="$1.$$"
expected_error="$2"
tmpfile=$PREFIX/smbclient_interactive_prompt_commands
tmpfile=${TMPDIR}/smbclient_interactive_prompt_commands
cat >"$tmpfile" <<EOF
put $tmpfile $filename
quit
@ -245,4 +249,6 @@ testit "get_veto_file" test_get_veto_file || failed=$(("$failed" + 1))
do_cleanup
cd "${PREFIX_ABS}" && rm -rf ${TMPDIR}
exit "$failed"