[PATCH 2/2] s3:tests/smbspool.sh: Add tests with sanitized Device URI in argv[0]
Bryan Mason
bmason at redhat.com
Wed Sep 25 01:02:56 UTC 2019
This patch uses smbspool_argv_wrapper to test when argv[0] is set to a
sanitized Device URI, as CUPS does. I've verified that the tests pass
when the fix for https://bugzilla.samba.org/show_bug.cgi?id=14128
(commit d65b17c) is included, and they fail if that commit is reverted.
Please review and comment. Thanks!
[PATCH 2/2] s3:tests/smbspool.sh: Add tests with sanitized Device URI
in argv[0]
Use smbspool_argv_wrapper to test when a sanitized Device URI is in
argv[0] and the DEVICE_URI contains the Device URI with
username/password credentials.
Signed-off-by: Bryan Mason <bmason at redhat.com>
---
source3/script/tests/test_smbspool.sh | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/source3/script/tests/test_smbspool.sh
b/source3/script/tests/test_smbspool.sh
index f28c0909334..7ba03f01fc7 100755
--- a/source3/script/tests/test_smbspool.sh
+++ b/source3/script/tests/test_smbspool.sh
@@ -22,6 +22,7 @@ incdir=`dirname $0`/../../../testprogs/blackbox
samba_bindir="$BINDIR"
samba_vlp="$samba_bindir/vlp"
samba_smbspool="$samba_bindir/smbspool"
+samba_argv_wrapper="$samba_bindir/smbspool_argv_wrapper"
samba_smbtorture3="$samba_bindir/smbtorture3"
samba_smbspool_krb5="$samba_bindir/smbspool_krb5_wrapper"
@@ -224,6 +225,28 @@ testit "smbspool print DEVICE_URI example.ps via
stdin" \
failed=$(expr $failed + 1)
unset DEVICE_URI
+testit "vlp verify example.ps" \
+ test_vlp_verify \
+ || failed=$(expr $failed + 1)
+
+DEVICE_URI="smb://$USERNAME:$PASSWORD@$SERVER_IP/print1"
+export DEVICE_URI
+testit "smbspool print sanitized Device URI in argv0 example.ps" \
+ $smbspool_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1
200 $USERNAME "Testprint" 1 "options"
$SRCDIR/testdata/printing/example.ps || \
+ failed=$(expr $failed + 1)
+unset DEVICE_URI
+
+testit "vlp verify example.ps" \
+ test_vlp_verify \
+ || failed=$(expr $failed + 1)
+
+DEVICE_URI="smb://$USERNAME:$PASSWORD@$SERVER_IP/print1"
+export DEVICE_URI
+testit "smbspool print sanitized Device URI in argv0 example.ps via
stdin" \
+ $smbspool_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1
200 $USERNAME "Testprint" 1 "options" <
$SRCDIR/testdata/printing/example.ps || \
+ failed=$(expr $failed + 1)
+unset DEVICE_URI
+
testit "vlp verify example.ps" \
test_vlp_verify \
|| failed=$(expr $failed + 1)
--
2.18.1
More information about the samba-technical
mailing list