1#ifndef BONNIE
2#define BONNIE
3
4#define BON_VERSION "1.03d"
5
6#include "conf.h"
7#include "port.h"
8
9#define SemKey 4711
10#define NumSems TestCount
11// million files (7) + up to 12 random extra chars
12#define RandExtraLen (12)
13#define MaxNameLen (7 + RandExtraLen)
14// data includes index to which directory (6 bytes) and terminating '\0' for
15// the name and pointer to file name
16#define MaxDataPerFile (MaxNameLen + 6 + 1 + 4)
17#define MinTime (0.5)
18#define Seeks (8192)
19#define UpdateSeek (10)
20#define SeekProcCount (3)
21#define DefaultChunkBits (13)
22#define DefaultChunkSize (1 << DefaultChunkBits)
23#define UnitBits (20)
24#define Unit (1 << UnitBits)
25#define CreateNameLen 6
26#define DefaultFileSize 300
27#define DirectoryUnit 1024
28#define DefaultDirectorySize 16
29#define DefaultDirectoryMaxSize 0
30#define DefaultDirectoryMinSize 0
31// 1024M per file for IO.
32#define IOFileSize 1024
33// 3 digits
34#define MaxIOFiles 1000
35
36typedef const char * PCCHAR;
37typedef char * PCHAR;
38typedef PCHAR const CPCHAR;
39typedef PCCHAR const CPCCHAR;
40typedef void * PVOID;
41typedef PVOID const CPVOID;
42typedef const CPVOID CPCVOID;
43
44enum tests_t
45{
46  Putc = 0,
47  FastWrite,
48  ReWrite,
49  Getc,
50  FastRead,
51  Lseek,
52  CreateSeq,
53  StatSeq,
54  DelSeq,
55  CreateRand,
56  StatRand,
57  DelRand,
58  TestCount
59};
60
61int   io_error(CPCCHAR message, bool do_exit = false);
62int bon_setugid(CPCCHAR user, CPCCHAR group, bool quiet);
63
64#endif
65