From 644593d30ecddec27f0a48340d74db7cf164bfc3 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sat, 22 May 2010 05:03:16 +0300 Subject: s4/test: Replace hand-made field count to test This patch replaces hand-make count of fields to be tested with defines for FIRST-LAST value for corresponding fields to test with. As a side-effect, 'acct_flags' is now included in tests. --- source4/torture/libnet/userman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/torture/libnet/userman.c') diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c index c1d67fb8b6..c67f133356 100644 --- a/source4/torture/libnet/userman.c +++ b/source4/torture/libnet/userman.c @@ -110,10 +110,10 @@ static bool test_usermod(struct torture_context *tctx, struct dcerpc_pipe *p, torture_comment(tctx, "fields to change: ["); - for (i = 0; i < num_changes && i < FIELDS_NUM - 1; i++) { + for (i = 0; i < num_changes && i <= USER_FIELD_LAST; i++) { const char *fldname; - testfld = (random() % (FIELDS_NUM - 1)) + 1; + testfld = (random() % USER_FIELD_LAST) + 1; gettimeofday(&now, NULL); @@ -444,7 +444,7 @@ bool torture_usermod(struct torture_context *torture) goto done; } - for (i = 1; i < FIELDS_NUM; i++) { + for (i = USER_FIELD_FIRST; i <= USER_FIELD_LAST; i++) { struct libnet_rpc_usermod m; if (!test_usermod(torture, p, mem_ctx, &h, i, &m, &name)) { -- cgit