From 0990f6342ed3f765c482ddf0baddeac850422352 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 13 Dec 2010 15:46:05 +0100 Subject: s4-smbtorture: paranoia check for architectures in request and reply for enumdrivers test. Guenther --- source4/torture/rpc/spoolss.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 26e53eb252..925b703dd7 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -569,6 +569,7 @@ static bool test_EnumPrinterDrivers_findone(struct torture_context *tctx, uint32_t count; union spoolss_DriverInfo *info; int i; + const char *environment_ret = NULL; torture_assert(tctx, test_EnumPrinterDrivers_args(tctx, b, server_name, environment, level, &count, &info), @@ -582,28 +583,37 @@ static bool test_EnumPrinterDrivers_findone(struct torture_context *tctx, break; case 2: driver_name_ret = info[i].info2.driver_name; + environment_ret = info[i].info2.architecture; break; case 3: driver_name_ret = info[i].info3.driver_name; + environment_ret = info[i].info3.architecture; break; case 4: driver_name_ret = info[i].info4.driver_name; + environment_ret = info[i].info4.architecture; break; case 5: driver_name_ret = info[i].info5.driver_name; + environment_ret = info[i].info5.architecture; break; case 6: driver_name_ret = info[i].info6.driver_name; + environment_ret = info[i].info6.architecture; break; case 7: driver_name_ret = info[i].info7.driver_name; break; case 8: driver_name_ret = info[i].info8.driver_name; + environment_ret = info[i].info8.architecture; break; default: break; } + if (environment_ret) { + torture_assert_str_equal(tctx, environment, environment_ret, "architecture mismatch"); + } if (strequal(driver_name, driver_name_ret)) { return true; } -- cgit