summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2012-06-22 18:49:50 +0200
committerDavid Disseldorp <ddiss@samba.org>2012-06-26 18:04:43 +0200
commit98ec5e95ca726c10c9e0f2c4f151308279c8bed5 (patch)
tree763ab1a63c69ad0a65ff47a92fcefc31174ced7c /source4
parente01ef8a9bd36bda5b9a383585b74429a333f8567 (diff)
downloadsamba-98ec5e95ca726c10c9e0f2c4f151308279c8bed5.tar.gz
samba-98ec5e95ca726c10c9e0f2c4f151308279c8bed5.tar.bz2
samba-98ec5e95ca726c10c9e0f2c4f151308279c8bed5.zip
s3-torture: Use static printer for smbd spooler test
Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Jun 26 18:04:43 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 217eae9ccb..6e0d9edcf8 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -54,6 +54,7 @@
#define TORTURE_DRIVER_TIMESTAMPS "torture_driver_timestamps"
#define TORTURE_DRIVER_DELETER "torture_driver_deleter"
#define TORTURE_DRIVER_DELETERIN "torture_driver_deleterin"
+#define TORTURE_PRINTER_STATIC1 "print1"
#define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print"
#define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
@@ -7747,7 +7748,14 @@ static bool test_print_test_smbd(struct torture_context *tctx,
struct cli_credentials *credentials = cmdline_credentials;
struct smbcli_options options;
TALLOC_CTX *mem_ctx = talloc_new(tctx);
- const char *share = t->info2.printername;
+ /*
+ * Do not test against the dynamically added printers, printing via
+ * smbd means that a different spoolss process may handle the
+ * OpenPrinter request to the one that handled the AddPrinter request.
+ * This currently leads to an ugly race condition where one process
+ * sees the new printer and one doesn't.
+ */
+ const char *share = TORTURE_PRINTER_STATIC1;
torture_comment(tctx, "Testing smbd job spooling\n");
lpcfg_smbcli_options(tctx->lp_ctx, &options);