#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <stdlib.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

#include <libaio.h>

/* /dev/andrea */
#define __KERNEL__
#include <asm/page.h>
#undef __KERNEL__
/*
 * The below doesn't make sense in some arch with shared
 * address space betwene kernel and userspace but it'll
 * probably work by luck there too.
 */
#define KERNEL_RW_POINTER       ((void *)PAGE_OFFSET)


char test_name[] = TEST_NAME;

#include TEST_NAME

int main(void)
{
	int res;

#if defined(SETUP)
	SETUP;
#endif

	res = test_main();
	printf("test %s completed %s.\n", test_name, 
		res ? "FAILED" : "PASSED"
		);
	fflush(stdout);
	return res ? 1 : 0;
}
