summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-02-15 15:33:10 +1100
committerAndrew Tridgell <tridge@samba.org>2008-02-15 15:33:10 +1100
commitc09f70608c97c5df87818f0c6297e85cf8827862 (patch)
tree9ee804daa71d71114b45b72f3dc7ca21af2e110a /source4
parentd48dc5b2e6e45b5a0daa96b32f0b45cdf35a80e5 (diff)
downloadsamba-c09f70608c97c5df87818f0c6297e85cf8827862.tar.gz
samba-c09f70608c97c5df87818f0c6297e85cf8827862.tar.bz2
samba-c09f70608c97c5df87818f0c6297e85cf8827862.zip
added a blackbox test for masktest
(This used to be commit 05a110123df2372418e2ef2fd8f269b92054069c)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/selftest/samba4_tests.sh1
-rw-r--r--source4/torture/locktest.c15
2 files changed, 11 insertions, 5 deletions
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index ab7065c6f0..98eade4e41 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -254,6 +254,7 @@ plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" "\$P
plantest "blackbox.nmblookup" dc $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
plantest "blackbox.nmblookup" member $samba4srcdir/utils/tests/test_nmblookup.sh "\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP"
plantest "blackbox.locktest" dc $bbdir/test_locktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
+plantest "blackbox.masktest" dc $bbdir/test_masktest.sh "\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX"
# Tests using the "Simple" NTVFS backend
diff --git a/source4/torture/locktest.c b/source4/torture/locktest.c
index ebc325fe2b..fb2430f881 100644
--- a/source4/torture/locktest.c
+++ b/source4/torture/locktest.c
@@ -396,7 +396,7 @@ static int retest(struct smbcli_state *cli[NSERVERS][NCONNECTIONS],
we then do random locking ops in tamdem on the 4 fnums from each
server and ensure that the results match
*/
-static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
+static int test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
{
struct smbcli_state *cli[NSERVERS][NCONNECTIONS];
int fnum[NSERVERS][NCONNECTIONS][NFILES];
@@ -451,7 +451,12 @@ static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
open_files(cli, fnum);
n = retest(cli, fnum, numops);
- if (n == numops || !analyze) return;
+ if (n == numops || !analyze) {
+ if (n != numops) {
+ return 1;
+ }
+ return 0;
+ }
n++;
skip = n/2;
@@ -517,6 +522,8 @@ static void test_locks(struct loadparm_context *lp_ctx, char *share[NSERVERS])
(double)recorded[i].len,
recorded[i].needed);
}
+
+ return 1;
}
@@ -632,8 +639,6 @@ _NORETURN_ static void usage(poptContext pc)
seed, lock_base, lock_range, min_length));
srandom(seed);
- test_locks(lp_ctx, share);
-
- return(0);
+ return test_locks(lp_ctx, share);
}