smbtorture:spoolss: Rename the copy_from_directory test for 64bit
authorAndreas Schneider <asn@samba.org>
Fri, 5 May 2017 09:11:25 +0000 (11:11 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 5 May 2017 09:51:10 +0000 (11:51 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12761

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/rpc/spoolss.c

index 67822a14b5e4f03087d5ebbc631248ec79d32029..fce013d5eef62e0b1bc930298dca4c1aacf047da 100644 (file)
@@ -11137,7 +11137,8 @@ static bool test_multiple_drivers(struct torture_context *tctx,
 }
 
 static bool test_driver_copy_from_directory(struct torture_context *tctx,
-                                           struct dcerpc_pipe *p)
+                                           struct dcerpc_pipe *p,
+                                           const char *architecture)
 {
        struct torture_driver_context *d;
        struct spoolss_StringArray *a;
@@ -11153,8 +11154,7 @@ static bool test_driver_copy_from_directory(struct torture_context *tctx,
        d = talloc_zero(tctx, struct torture_driver_context);
        torture_assert_not_null(tctx, d, "ENOMEM");
 
-       d->local.environment            =
-               talloc_asprintf(d, SPOOLSS_ARCHITECTURE_x64);
+       d->local.environment            = talloc_strdup(d, architecture);
        torture_assert_not_null_goto(tctx, d->local.environment, ok, done, "ENOMEM");
 
        d->local.driver_directory       =
@@ -11236,6 +11236,12 @@ done:
        return ok;
 }
 
+static bool test_driver_copy_from_directory_64(struct torture_context *tctx,
+                                              struct dcerpc_pipe *p)
+{
+       return test_driver_copy_from_directory(tctx, p, SPOOLSS_ARCHITECTURE_x64);
+}
+
 static bool test_del_driver_all_files(struct torture_context *tctx,
                                      struct dcerpc_pipe *p)
 {
@@ -11433,8 +11439,8 @@ struct torture_suite *torture_rpc_spoolss_driver(TALLOC_CTX *mem_ctx)
        torture_rpc_tcase_add_test(tcase, "multiple_drivers", test_multiple_drivers);
 
        torture_rpc_tcase_add_test(tcase,
-                                  "test_driver_copy_from_directory",
-                                  test_driver_copy_from_directory);
+                                  "test_driver_copy_from_directory_64",
+                                  test_driver_copy_from_directory_64);
 
        torture_rpc_tcase_add_test(tcase, "del_driver_all_files", test_del_driver_all_files);