M packages/genodelabs/targets.nix => packages/genodelabs/targets.nix +2 -0
@@ 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 ];
M tests/default.nix => tests/default.nix +1 -0
@@ 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
A tests/execve.dhall => tests/execve.dhall +35 -0
@@ 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")
+ ]
+ }
A tests/execve.nix => tests/execve.nix +15 -0
@@ 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")
+ '';
+ */
+}