2
0
Fork 0

tests/bash: test rsync

The clang bash seems to be bad.
This commit is contained in:
Ehmry - 2020-11-08 23:52:35 +01:00
parent 7b5a74d549
commit 301214c0cb
2 changed files with 27 additions and 20 deletions

View File

@ -10,7 +10,7 @@ let Init = Genode.Init
let Child = Init.Child
in λ(params : { bash : Text, coreutils : Text }) →
in λ(params : { bash : Text, coreutils : Text, path : Text }) →
let init =
Init::{
, verbose = True
@ -64,8 +64,11 @@ in λ(params : { bash : Text, coreutils : Text }) →
, VFS.inline
"script.sh"
''
bash --version
bash -c "bash --version"
sleep 1
sleep --version
echo "foo"
echo "bar" | cat
rsync --version
''
]
]
@ -108,8 +111,8 @@ in λ(params : { bash : Text, coreutils : Text }) →
, binary = "${params.bash}/bin/bash"
, exitPropagate = True
, resources = Genode.Init.Resources::{
, caps = 256
, ram = Genode.units.MiB 8
, caps = 1024
, ram = Genode.units.MiB 32
}
, routes =
Prelude.List.map
@ -150,15 +153,13 @@ in λ(params : { bash : Text, coreutils : Text }) →
{ stdin = "/dev/null"
, stdout = "/dev/log"
, stderr = "/dev/log"
, pipe = "/dev/pipe"
, pipe = "/dev/pipes"
, rtc = "/dev/rtc"
}
}
, VFS.vfs [ VFS.fs VFS.FS::{ label = "root" } ]
, env "TERM" "screen"
, env
"PATH"
"${params.coreutils}/bin:${params.bash}/bin"
, env "PATH" params.path
, arg "bash"
, arg "/script.sh"
]

View File

@ -3,18 +3,24 @@
machine = { pkgs, ... }: {
genode.init.children.bash = {
configFile = pkgs.writeText "bash.child.dhall" ''
${
./bash.dhall
} { bash = "${pkgs.genodePackages.bash}", coreutils = "${pkgs.coreutils}" }
${./bash.dhall}
{ bash = "${pkgs.genodePackages.bash}"
, coreutils = "${pkgs.genodePackages.coreutils}"
, path = "${
with pkgs;
(lib.makeSearchPathOutput "bin" "bin" [ bash coreutils rsync ])
}"
}
'';
inputs = with pkgs.genodePackages; [
bash
cached_fs_rom
libc
posix
vfs
vfs_pipe
];
inputs = [ pkgs.genodePackages.bash pkgs.rsync ]
++ (with pkgs.genodePackages; [
cached_fs_rom
libc
posix
vfs
vfs_pipe
]);
};
};
testScript = ''