2
0
Fork 0
Browse Source

execve test

execve
Emery Hemingway 2 years ago
parent
commit
510be88863
  1. 2
      packages/genodelabs/targets.nix
  2. 1
      tests/default.nix
  3. 35
      tests/execve.dhall
  4. 15
      tests/execve.nix

2
packages/genodelabs/targets.nix

@ -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 ];

1
tests/default.nix

@ -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

@ -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

@ -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")
'';
*/
}
Loading…
Cancel
Save