s4-smbtorture: print more comments while running SD and DM tests in RPC-SPOOLSS-PRINTER.
authorGünther Deschner <gd@samba.org>
Fri, 19 Feb 2010 13:14:18 +0000 (14:14 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 19 Feb 2010 13:24:18 +0000 (14:24 +0100)
Guenther

source4/torture/rpc/spoolss.c

index 08cb4f205f2f4da2353731c7379bfc2bdbf5c181..6cc67277f0816d79453a4ead94567d50a925e249 100644 (file)
@@ -1732,16 +1732,15 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx,
                                struct policy_handle *handle)
 {
        union spoolss_PrinterInfo info;
-       struct spoolss_SetPrinterInfo3 info3;
-       struct spoolss_SetPrinterInfoCtr info_ctr;
-       struct spoolss_DevmodeContainer devmode_ctr;
-       struct sec_desc_buf secdesc_ctr;
        struct security_descriptor *sd;
        bool ret = true;
 
+       torture_comment(tctx, "\nTesting Printer Security Descriptors\n");
+
        /* save original sd */
 
-       torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 2, &info), "");
+       torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 2, &info),
+               "failed to get initial security descriptor");
 
        sd = security_descriptor_copy(tctx, info.info2.secdesc);
 
@@ -1751,18 +1750,12 @@ static bool test_PrinterInfo_SD(struct torture_context *tctx,
 
        /* restore original sd */
 
-       ZERO_STRUCT(devmode_ctr);
-       ZERO_STRUCT(secdesc_ctr);
-
-       info3.sec_desc_ptr = 0;
-
-       info_ctr.level = 3;
-       info_ctr.info.info3 = &info3;
+       torture_assert(tctx, test_sd_set_level(tctx, p, handle, 3, sd),
+               "failed to restore initial security descriptor");
 
-       secdesc_ctr.sd = sd;
+       torture_comment(tctx, "Printer Security Descriptors test %s\n",
+               ret ? "succeeded" : "failed");
 
-       torture_assert(tctx,
-               test_SetPrinter(tctx, p, handle, &info_ctr, &devmode_ctr, &secdesc_ctr, 0), "");
 
        return ret;
 }
@@ -2010,6 +2003,8 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
        struct spoolss_DeviceMode *devmode;
        bool ret = true;
 
+       torture_comment(tctx, "\nTesting Printer Devicemodes\n");
+
        /* save original devmode */
 
        torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 8, &info),
@@ -2026,6 +2021,10 @@ static bool test_PrinterInfo_DevMode(struct torture_context *tctx,
        torture_assert(tctx, test_devmode_set_level(tctx, p, handle, 8, devmode),
                "failed to restore initial global device mode");
 
+       torture_comment(tctx, "Printer Devicemodes test %s\n",
+               ret ? "succeeded" : "failed");
+
+
        return ret;
 }