2
0
Fork 0

execve test

This commit is contained in:
Emery Hemingway 2020-11-07 16:42:31 +01:00
parent ecf6f909a9
commit 510be88863
4 changed files with 53 additions and 0 deletions

View File

@ -76,6 +76,8 @@ in {
stdcxx.portInputs = [ libc stdcxx ];
test-libc_execve.portInputs = [ libc ];
# The following are tests are patched to exit at completion
"test-log".patches = [ ./test-log.patch ];

View File

@ -8,6 +8,7 @@ let
testingPython = import ./lib/testing-python.nix;
testSpecs = map (p: import p) [
./execve.nix
./hello.nix
./log.nix
./solo5/multi.nix

35
tests/execve.dhall Normal file
View File

@ -0,0 +1,35 @@
let Genode = env:DHALL_GENODE
let XML = Genode.Prelude.XML
let Init = Genode.Init
let Child = Init.Child
in Child.flat
Child.Attributes::{
, binary = "test-execve"
, config = Init.Config::{
, attributes = toMap { ld_verbose = "true" }
, content =
[ XML.text
''
<arg value="name_of_executeable"/>
<arg value="100"/>
<libc stdin="/null" stdout="/log" stderr="/log"/>
<vfs> <rom name="test-execve"/> <null/> <log/> </vfs>
''
]
}
, exitPropagate = True
, resources = Genode.Init.Resources::{
, caps = 512
, ram = Genode.units.MiB 32
}
, routes =
[ Init.ServiceRoute.parentLabel
"ROM"
(Some "/test-execve")
(Some "test-execve")
]
}

15
tests/execve.nix Normal file
View File

@ -0,0 +1,15 @@
{
name = "execve";
machine = { pkgs, ... }: {
genode.init.children.test-execve = {
configFile = ./execve.dhall;
inputs = with pkgs.genodePackages; [ libc posix test-libc_execve ];
};
};
/*
testScript = ''
start_all()
machine.wait_until_serial_output("child "test-execve" exited with exit value 0")
'';
*/
}