summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/userman.c
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-05-22 05:03:16 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-05-26 14:36:12 +0300
commit644593d30ecddec27f0a48340d74db7cf164bfc3 (patch)
tree2f165413b55db30421b617570398744cfbb02e66 /source4/torture/libnet/userman.c
parent2bca048367456b09d16f51405373fa33be6eeca3 (diff)
downloadsamba-644593d30ecddec27f0a48340d74db7cf164bfc3.tar.gz
samba-644593d30ecddec27f0a48340d74db7cf164bfc3.tar.bz2
samba-644593d30ecddec27f0a48340d74db7cf164bfc3.zip
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.
Diffstat (limited to 'source4/torture/libnet/userman.c')
-rw-r--r--source4/torture/libnet/userman.c6
1 files changed, 3 insertions, 3 deletions
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)) {