@@ -75,7 +75,7 @@ multicore_subset(){
7575
7676 # The following tests are not using multiple CPU's, but have been equippedd with some anyway
7777 # to make sure core functionality is not broken by missing locks etc. when waking up more cores.
78- nix-shell ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp
78+ nix-shell ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/net/integration/udp --arg doCheck true
7979 nix-build ./unikernel.nix --arg smp true $CCACHE_FLAG --argstr unikernel ./test/kernel/integration/paging --arg doCheck true
8080}
8181
112112
113113# Continuing from here will run all integration tests.
114114
115- sandboxed=true
116115run_testsuite () {
117116 local base_folder=" $1 "
118117 shift
@@ -138,24 +137,30 @@ run_testsuite() {
138137
139138 for subfolder in " $base_folder " /* /; do
140139 local skip=false
140+ local sandboxed=true
141141
142142 for exclude in " ${exclusion_list[@]} " ; do
143143 if [[ " $subfolder " == * " $exclude " * ]]; then
144144 skip=true
145145 break
146146 fi
147147 done
148-
149148 if [ " $skip " = true ]; then
150149 continue
151150 fi
152151
152+ for unsandbox in " ${unsandbox_list[@]} " ; do
153+ if [[ " $subfolder " == * " $unsandbox " * ]]; then
154+ sandboxed=false
155+ break
156+ fi
157+ done
153158
154159 # The command to run, as string to be able to print the fully expanded command
155160 if $sandboxed ; then
156161 cmd=" nix-build ./unikernel.nix $CCACHE_FLAG --argstr unikernel ${subfolder%/ } --arg doCheck true"
157162 else
158- cmd=" nix-shell ./unikernel.nix $CCACHE_FLAG --argstr unikernel ${subfolder%/ } "
163+ cmd=" nix-shell ./unikernel.nix $CCACHE_FLAG --argstr unikernel ${subfolder%/ } --arg doCheck true "
159164 fi
160165
161166 echo " "
@@ -199,7 +204,11 @@ exclusions=(
199204 " modules" # Requires 32-bit build, which our shell.nix is not set up for
200205)
201206
207+ unsandbox_list=(
208+ " term" # fails to create the tun device, like the net integration tests
209+ )
202210run_testsuite " ./test/kernel/integration" " ${exclusions[@]} "
211+ unsandbox_list=()
203212
204213#
205214# C++ STL runtime tests
@@ -228,9 +237,20 @@ exclusions=(
228237 " websocket" # Linking fails, undefined ref to http_parser_parse_url, http_parser_execute
229238)
230239
231- sandboxed=false
240+ # all the following fail with the following error:
241+ # <vm> failed to create tun device: Operation not permitted
242+ # <vm> qemu-system-x86_64: -netdev bridge,id=net0,br=bridge43: bridge helper failed
243+ unsandbox_list=(
244+ " ./test/net/integration/configure"
245+ " ./test/net/integration/icmp"
246+ " ./test/net/integration/icmp6"
247+ " ./test/net/integration/slaac"
248+ " ./test/net/integration/tcp"
249+ " ./test/net/integration/udp"
250+ " ./test/net/integration/dns" # except this one which times out instead
251+ )
232252run_testsuite " ./test/net/integration" " ${exclusions[@]} "
233- sandboxed=true
253+ unsandbox_list=()
234254
235255echo -e " \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
236256
0 commit comments