diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-01 20:21:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:11 -0500 |
commit | 652b8b34f8b326f79771b03e039cfa3c6ba3427e (patch) | |
tree | 3cecbca36a8cb70b54df76c303894c06b7d63953 /source4/torture | |
parent | dde06904576dfe01e9710721209650dcff228593 (diff) | |
download | samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.tar.gz samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.tar.bz2 samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.zip |
r3441: some include file cleanups and general housekeeping
(This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699)
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/gentest.c | 2 | ||||
-rw-r--r-- | source4/torture/locktest2.c | 14 | ||||
-rw-r--r-- | source4/torture/torture_util.c | 9 |
3 files changed, 10 insertions, 15 deletions
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index 15956d3b3b..59775e02d9 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -504,7 +504,7 @@ static uint16_t gen_pid(void) /* generate a lock count */ -static SMB_OFF_T gen_lock_count(void) +static off_t gen_lock_count(void) { return gen_int_range(0, 3); } diff --git a/source4/torture/locktest2.c b/source4/torture/locktest2.c index f474b3efa9..e2220a3b1f 100644 --- a/source4/torture/locktest2.c +++ b/source4/torture/locktest2.c @@ -133,17 +133,6 @@ static BOOL try_unlock(struct smbcli_state *c, int fstype, return False; } -static void print_brl(SMB_DEV_T dev, SMB_INO_T ino, int pid, - enum brl_type lock_type, - br_off start, br_off size) -{ - printf("%6d %05x:%05x %s %.0f:%.0f(%.0f)\n", - (int)pid, (int)dev, (int)ino, - lock_type==READ_LOCK?"R":"W", - (double)start, (double)start+size-1,(double)size); - -} - /***************************************************** return a connection to a server *******************************************************/ @@ -256,7 +245,6 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], op==READ_LOCK?"READ_LOCK":"WRITE_LOCK", ret[0], ret[1]); } - if (showall) brl_forall(print_brl); if (ret[0] != ret[1]) return False; } else if (r2 < LOCK_PCT+UNLOCK_PCT) { /* unset a lock */ @@ -271,7 +259,6 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], start, start+len-1, len, ret[0], ret[1]); } - if (showall) brl_forall(print_brl); if (!hide_unlock_fails && ret[0] != ret[1]) return False; } else { /* reopen the file */ @@ -287,7 +274,6 @@ static BOOL test_one(struct smbcli_state *cli[NSERVERS][NCONNECTIONS], if (showall) { printf("reopen conn=%u fstype=%u f=%u\n", conn, fstype, f); - brl_forall(print_brl); } } return True; diff --git a/source4/torture/torture_util.c b/source4/torture/torture_util.c index 034bc807bb..8565a4d7d8 100644 --- a/source4/torture/torture_util.c +++ b/source4/torture/torture_util.c @@ -167,6 +167,15 @@ void *shm_setup(int size) int shmid; void *ret; +/* NetBSD doesn't have these */ +#ifndef SHM_R +#define SHM_R 0400 +#endif + +#ifndef SHM_W +#define SHM_W 0200 +#endif + shmid = shmget(IPC_PRIVATE, size, SHM_R | SHM_W); if (shmid == -1) { printf("can't get shared memory\n"); |