Skip to content

Instantly share code, notes, and snippets.

@danking
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danking/11357961 to your computer and use it in GitHub Desktop.
Save danking/11357961 to your computer and use it in GitHub Desktop.
#lang shill/ambient
require shill/native;
require "syscall-test.cap";
val wallet = create-wallet();
populate-native-wallet(wallet
,open-dir("/")
,"/home/danking/tests/individual-system-call-tests"
,"/libexec:/lib:/usr/lib"
,pipe-factory
,lookups = [open-dir("/home"), open-dir("/dev")]);
syscall-test(wallet,stdout,cwd);
#lang shill/cap
provide [syscall-test :
[wallet : native-wallet?]
[out : writeable?]
[cwd : dir/c(+chdir, +lookup, +path)]
-> integer?];
require shill/native;
require shill/contracts;
require shill/io;
val syscall-test = fun (wallet,out,cwd) {
find = pkg-native("a.out",wallet);
find([],stdout = out, stderr = out, extra = [cwd]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment