minix/test/testcache.h
Ben Gras 49b9165251 vm: mmap support
. test74 for mmap functionality
	. vm: add a mem_file memory type that specifies an mmap()ped
	  memory range, backed by a file
	. add fdref, an object that keeps track of FD references within
	  VM per process and so knows how to de-duplicate the use of FD's
	  by various mmap()ped ranges; there can be many more than there can
	  be FD's
	. turned off for now, enable with 'filemap=1' as boot option

Change-Id: I640b1126cdaa522a0560301cf6732b7661555672
2013-05-31 15:42:01 +00:00

34 lines
956 B
C

/* Common definitions and declarations for the testcache code
* and the testcache clients.
*/
#include <sys/types.h>
#define MAXBLOCKS 1500000
#define MAXBLOCKSIZE (4*PAGE_SIZE)
int dowriteblock(int b, int blocksize, u32_t seed, char *block);
int readblock(int b, int blocksize, u32_t seed, char *block);
void testend(void);
int dotest(int blocksize, int nblocks, int iterations);
void cachequiet(int quiet);
void get_fd_offset(int b, int blocksize, u64_t *file_offset, int *fd);
void makefiles(int n);
#define OK_BLOCK_GONE -999
/* for file-oriented tests:
*
* we want to flexibly split tests over multiple files
* - for big working sets we might run over the 2GB MFS file limit
* - we might want to test the FS being able to handle lots of
* files / unusual metadata situations
*/
#define MBPERFILE 2000
#define MB (1024*1024)
#define MAXFILES ((u64_t) MAXBLOCKS * MAXBLOCKSIZE / MB / MBPERFILE + 1)
extern int fds[MAXFILES], bigflag;