To do so, a few dependencies have been imported: * external/bsd/lutok * external/mit/lua * external/public-domain/sqlite * external/public-domain/xz The Kyua framework is the new generation of ATF (Automated Test Framework), it is composed of: * external/bsd/atf * external/bsd/kyua-atf-compat * external/bsd/kyua-cli * external/bsd/kyua-tester * tests Kyua/ATF being written in C++, it depends on libstdc++ which is provided by GCC. As this is not part of the sources, Kyua is only compiled when the native GCC utils are installed. To install Kyua do the following: * In a cross-build enviromnent, add the following to the build.sh commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes WARNING: At this point the import is still experimental, and not supported on native builds (a.k.a make build). Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/*	$NetBSD: t_io.c,v 1.1 2010/11/12 17:33:28 pooka Exp $	*/
 | 
						|
 | 
						|
#include <sys/types.h>
 | 
						|
#include <sys/mount.h>
 | 
						|
#include <sys/socket.h>
 | 
						|
 | 
						|
#include <assert.h>
 | 
						|
#include <atf-c.h>
 | 
						|
#include <err.h>
 | 
						|
#include <errno.h>
 | 
						|
#include <fcntl.h>
 | 
						|
#include <pthread.h>
 | 
						|
#include <puffs.h>
 | 
						|
#include <puffsdump.h>
 | 
						|
#include <stdio.h>
 | 
						|
#include <unistd.h>
 | 
						|
#include <string.h>
 | 
						|
#include <stdlib.h>
 | 
						|
 | 
						|
#include <rump/rump.h>
 | 
						|
#include <rump/rump_syscalls.h>
 | 
						|
 | 
						|
#include "../../h_macros.h"
 | 
						|
#include "../common/h_fsmacros.h"
 | 
						|
 | 
						|
#define MAKEOPTS(...) \
 | 
						|
    char *theopts[] = {NULL, "-s", __VA_ARGS__, "dtfs", "n/a", NULL}
 | 
						|
 | 
						|
ATF_TC(nocache);
 | 
						|
ATF_TC_HEAD(nocache, tc)
 | 
						|
{
 | 
						|
 | 
						|
	atf_tc_set_md_var(tc, "descr", "tests large i/o without page cache");
 | 
						|
}
 | 
						|
 | 
						|
ATF_TC_BODY(nocache, tc)
 | 
						|
{
 | 
						|
	MAKEOPTS("-o", "nopagecache");
 | 
						|
	char data[1024*1024];
 | 
						|
	void *args;
 | 
						|
	int fd;
 | 
						|
 | 
						|
	FSTEST_CONSTRUCTOR_FSPRIV(tc, puffs, args, theopts);
 | 
						|
	FSTEST_ENTER();
 | 
						|
 | 
						|
	RL(fd = rump_sys_open("afile", O_CREAT | O_RDWR, 0755));
 | 
						|
	RL(rump_sys_write(fd, data, sizeof(data)));
 | 
						|
	rump_sys_close(fd);
 | 
						|
 | 
						|
	FSTEST_EXIT();
 | 
						|
	FSTEST_DESTRUCTOR(tc, puffs, args);
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
ATF_TP_ADD_TCS(tp)
 | 
						|
{
 | 
						|
 | 
						|
	ATF_TP_ADD_TC(tp, nocache);
 | 
						|
 | 
						|
	return atf_no_error();
 | 
						|
}
 |