s4-smbtorture: add test for Adobe PostScript driver (Win9x) installation.
authorGünther Deschner <gd@samba.org>
Mon, 29 Nov 2010 14:09:52 +0000 (15:09 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 29 Nov 2010 14:35:19 +0000 (15:35 +0100)
Guenther

source4/torture/rpc/spoolss.c

index 3e8c7e17bbe6de4814283ab84ba589dc5b80f162..25b1275fff928e1b40223f1a1bd04151804a219d 100644 (file)
@@ -45,6 +45,8 @@
 #define TORTURE_PRINTER_EX             "torture_printer_ex"
 #define TORTURE_DRIVER                 "torture_driver"
 #define TORTURE_DRIVER_EX              "torture_driver_ex"
+#define TORTURE_DRIVER_ADOBE           "torture_driver_adobe"
+#define TORTURE_DRIVER_EX_ADOBE                "torture_driver_ex_adobe"
 
 #define TOP_LEVEL_PRINT_KEY "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Print"
 #define TOP_LEVEL_PRINT_PRINTERS_KEY TOP_LEVEL_PRINT_KEY "\\Printers"
@@ -8968,6 +8970,30 @@ static bool test_add_driver_32(struct torture_context *tctx,
        return test_add_driver_arg(tctx, p, d);
 }
 
+static bool test_add_driver_adobe(struct torture_context *tctx,
+                                 struct dcerpc_pipe *p)
+{
+       struct torture_driver_context *d;
+
+       d = talloc_zero(tctx, struct torture_driver_context);
+
+       d->info8.version                = SPOOLSS_DRIVER_VERSION_9X;
+       d->info8.driver_name            = TORTURE_DRIVER_ADOBE;
+       d->info8.architecture           = NULL;
+       d->info8.driver_path            = talloc_strdup(d, "ADOBEPS4.DRV");
+       d->info8.data_file              = talloc_strdup(d, "DEFPRTR2.PPD");
+       d->info8.config_file            = talloc_strdup(d, "ADOBEPS4.DRV");
+#if 0
+       d->info8.help_file              = talloc_strdup(d, "ADOBEPS4.HLP");
+       d->info8.monitor_name           = talloc_strdup(d, "PSMON.DLL");
+#endif
+       d->local.environment            = talloc_strdup(d, "Windows 4.0");
+       d->local.driver_directory       = talloc_strdup(d, "/usr/share/cups/drivers/adobe/");
+       d->ex                           = false;
+
+       return test_add_driver_arg(tctx, p, d);
+}
+
 struct torture_suite *torture_rpc_spoolss_driver(TALLOC_CTX *mem_ctx)
 {
        struct torture_suite *suite = torture_suite_create(mem_ctx, "SPOOLSS-DRIVER");
@@ -8980,5 +9006,7 @@ struct torture_suite *torture_rpc_spoolss_driver(TALLOC_CTX *mem_ctx)
        torture_rpc_tcase_add_test(tcase, "add_driver_32", test_add_driver_32);
        torture_rpc_tcase_add_test(tcase, "add_driver_ex_32", test_add_driver_ex_32);
 
+       torture_rpc_tcase_add_test(tcase, "add_driver_adobe", test_add_driver_adobe);
+
        return suite;
 }