From: Andreas Schneider Date: Fri, 5 May 2017 09:11:25 +0000 (+0200) Subject: smbtorture:spoolss: Rename the copy_from_directory test for 64bit X-Git-Tag: ldb-1.1.30~343 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=86798a0fa16b4cc89c35d698bffe0b436fc4eb2e;p=thirdparty%2Fsamba.git smbtorture:spoolss: Rename the copy_from_directory test for 64bit BUG: https://bugzilla.samba.org/show_bug.cgi?id=12761 Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 67822a14b5e..fce013d5eef 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -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);