[LibOS] regression: Remove test_204_system

This test depended on the host system binaries, which isn't a good idea
for reliable tests. Also, we already have Bash test in `Examples/` which
runs in CI, so there's not too much value in having this one here.
This commit is contained in:
Michał Kowalczyk
2020-10-22 23:53:00 +02:00
parent 47b130bc9a
commit 8ffd71441d
7 changed files with 2 additions and 92 deletions
-1
View File
@@ -80,7 +80,6 @@
/stat_invalid_args
/str_close_leak
/syscall
/system
/tcp_ipv6_v6only
/tcp_msg_peek
/testfile
+1 -6
View File
@@ -75,7 +75,6 @@ c_executables = \
stat_invalid_args \
str_close_leak \
syscall \
system \
tcp_ipv6_v6only \
tcp_msg_peek \
udp \
@@ -89,7 +88,6 @@ manifests = \
manifest \
argv_from_file.manifest \
attestation.manifest \
echo.manifest \
env_from_file.manifest \
env_from_host.manifest \
eventfd.manifest \
@@ -110,21 +108,18 @@ manifests = \
multi_pthread_exitless.manifest \
openmp.manifest \
proc_path.manifest \
sh.manifest \
shared_object.manifest
exec_target = \
$(c_executables) \
$(cxx_executables) \
argv_from_file.manifest \
echo.manifest \
env_from_file.manifest \
env_from_host.manifest \
file_check_policy_allow_all_but_log.manifest \
file_check_policy_strict.manifest \
init_fail2.manifest \
multi_pthread_exitless.manifest \
sh.manifest
multi_pthread_exitless.manifest
target = \
$(exec_target) \
@@ -1,31 +0,0 @@
# This file is used by test_204_system test
loader.exec = file:/bin/echo
loader.argv0_override = echo
loader.insecure__use_cmdline_argv = 1
loader.preload = file:../../src/libsysdb.so
loader.env.LD_LIBRARY_PATH = /lib:$(ARCH_LIBDIR):/usr/$(ARCH_LIBDIR)
loader.debug_type = none
loader.syscall_symbol = syscalldb
fs.mount.graphene_lib.type = chroot
fs.mount.graphene_lib.path = /lib
fs.mount.graphene_lib.uri = file:../../../../Runtime
fs.mount.host_lib.type = chroot
fs.mount.host_lib.path = $(ARCH_LIBDIR)
fs.mount.host_lib.uri = file:$(ARCH_LIBDIR)
fs.mount.host_usr_lib.type = chroot
fs.mount.host_usr_lib.path = /usr/$(ARCH_LIBDIR)
fs.mount.host_usr_lib.uri = file:/usr/$(ARCH_LIBDIR)
fs.mount.bin.type = chroot
fs.mount.bin.path = /bin
fs.mount.bin.uri = file:/bin
sgx.trusted_files.ld = file:../../../../Runtime/ld-linux-x86-64.so.2
sgx.trusted_files.libc = file:../../../../Runtime/libc.so.6
sgx.static_address = 1
@@ -36,6 +36,3 @@ sgx.allowed_files.tmp_dir = file:tmp/
sgx.thread_num = 6
sgx.static_address = 1
sgx.trusted_files.sh = file:/bin/sh
sgx.trusted_children.sh = file:sh.sig
@@ -1,34 +0,0 @@
# This file is used by test_204_system test
loader.exec = file:/bin/sh
loader.argv0_override = sh
loader.insecure__use_cmdline_argv = 1
loader.preload = file:../../src/libsysdb.so
loader.env.LD_LIBRARY_PATH = /lib:$(ARCH_LIBDIR):/usr/$(ARCH_LIBDIR)
loader.debug_type = none
loader.syscall_symbol = syscalldb
fs.mount.graphene_lib.type = chroot
fs.mount.graphene_lib.path = /lib
fs.mount.graphene_lib.uri = file:../../../../Runtime
fs.mount.host_lib.type = chroot
fs.mount.host_lib.path = $(ARCH_LIBDIR)
fs.mount.host_lib.uri = file:$(ARCH_LIBDIR)
fs.mount.host_usr_lib.type = chroot
fs.mount.host_usr_lib.path = /usr/$(ARCH_LIBDIR)
fs.mount.host_usr_lib.uri = file:/usr/$(ARCH_LIBDIR)
fs.mount.bin.type = chroot
fs.mount.bin.path = /bin
fs.mount.bin.uri = file:/bin
sgx.trusted_files.ld = file:../../../../Runtime/ld-linux-x86-64.so.2
sgx.trusted_files.libc = file:../../../../Runtime/libc.so.6
sgx.trusted_files.echo = file:/bin/echo
sgx.trusted_children.echo = file:echo.sig
sgx.static_address = 1
-12
View File
@@ -1,12 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char const* argv[]) {
int ret = system("echo hello from system");
if (ret) {
/* something went wrong with system() execution */
return 1;
}
return 0;
}
+1 -5
View File
@@ -153,11 +153,7 @@ class TC_01_Bootstrap(RegressionTestCase):
self.assertIn('child exited with status: 0', stdout)
self.assertIn('test completed successfully', stdout)
def test_204_system(self):
stdout, _ = self.run_binary(['system'], timeout=60)
self.assertIn('hello from system', stdout)
def test_205_exec_fork(self):
def test_204_exec_fork(self):
stdout, _ = self.run_binary(['exec_fork'], timeout=60)
self.assertNotIn('Handled SIGCHLD', stdout)
self.assertIn('Set up handler for SIGCHLD', stdout)