244 Commits
Author SHA1 Message Date
Michał Kowalczyk e98be31b00 [LibOS] test/apps: Add work-in-progress disclaimers to unfinished integrations 2019-09-11 17:15:20 +02:00
Dmitrii Kuvaiskii 17a2fbc770 [LibOS] test/apps: Add top-level README.md 2019-09-10 23:33:59 -07:00
Dmitrii Kuvaiskii 77de90aedd [LibOS] test/apps: Add Redis example 2019-09-10 17:33:20 -07:00
borysp df2f8d2de7 [LibOS] test/apps: Rewrite BusyBox example 2019-09-10 10:28:30 -07:00
Michał Kowalczyk de42ebabe1 Reformat repository to our clang-format rules 2019-09-09 22:11:23 +02:00
Chia-Che Tsai 34384c6bb2 [LibOS] test/apps: Rewrite R example 2019-09-04 01:51:48 +02:00
Isaku Yamahata e83a5ec6fe [LibOS] Simplify shim/test/Makefile 2019-09-03 20:06:59 +02:00
Isaku Yamahata 3d19670374 [lighttpd] Add missing dependencies required by .manifest.sgx 2019-08-27 13:18:09 +02:00
Thomas Knauth 9af670d99f [LibOS] test/apps: Add TensorFlow Lite label_image example 2019-08-26 21:04:25 +02:00
Isaku Yamahata 1089dd015e [LibOS] Use implicit pattern rule in benchmark/Makefile
Static pattern rule isn't needed in benchmark/Makefile.
2019-08-26 00:17:10 +02:00
Isaku Yamahata aef0f4ab64 [LibOS] Use implicit pattern rule in native/Makefile
Static pattern rule isn't needed in native/Makefile.
2019-08-26 00:16:59 +02:00
Isaku Yamahata e277a05585 [LibOS] Rename {CFLAGS, CXXFLAGS, LDFLAGS}-debug to *-libos-debug
For clarity, rename {CFLAGS, CXXFLAGS, LDFLAGS}-debug to
{CFLAGS, CXXFLAGS, LDFLAGS}-libos-debug.
Also related clean up of LibOS/shim/test/inline/Makefile.
2019-08-25 11:38:02 -07:00
Isaku Yamahata 7696fc327b [LibOS] Remove CFLAGS-libos from LibOS/shim/test/benchmark/Makefile
It's already defined in LibOS/shim/test/Makefile.Test.
2019-08-25 11:38:02 -07:00
Isaku Yamahata dabaad826d [LibOS] Make test/inline build 2019-08-25 11:38:02 -07:00
Isaku Yamahata 53cb9d3e71 [LibOS] Eliminate level variable from makefiles 2019-08-25 11:38:02 -07:00
Isaku Yamahata 2ea23a298b [LibOS] Remove the reference of level variable from Makefile.Test
Remove the reference of level variable from Makefile.Test.
After this patch, level variable in Makefile's of tests can be removed.
2019-08-25 11:38:02 -07:00
Isaku Yamahata 0513886e56 [LibOS] Remove subdirs from Makefile.Test
It isn't used by Makefile in tests.
2019-08-25 11:38:02 -07:00
Isaku Yamahata 353f1f609f [LibOS/shim/test] Copy Makefile to Makefile.Test and use it
LibOS/shim/test/Makefile has confusion. It's makefile for test/ directory
and common functions for each test directory.
As a first step to untangle the confusion, copy Makefile.Test for
common functions and have test directories to use it.
Later once grapene-tests is updated, LibOS/shim/test/Makefile
will have only submake rules.
2019-08-25 11:38:02 -07:00
Isaku Yamahata 94d2197720 [LibOS] Use Makefile.rules to simplify Makefile
Simplify shim/test/{regression, native, benchmark, inline}/Makefile.
2019-08-24 01:50:58 +02:00
Isaku Yamahata 9af27a82b0 [Makefile, Pal/Linux-SGX] Calculate dependencies for *.manifest.sgx 2019-08-21 14:37:13 +02:00
Michał Kowalczyk 6ece11d347 [LibOS] Add Memcached example to shim/test/apps 2019-08-21 00:26:34 +02:00
Chia-Che Tsai edb0888988 [LibOS] Remove shim/test/apps/web-data 2019-08-20 20:43:49 +02:00
Chia-Che Tsai eb253b0b3c [LibOS] Remove make and openjdk from LibOS/shim/test/apps 2019-08-20 17:06:12 +02:00
Li Lei 30e0b8bfba [PAL/Linux-SGX] Reuse TLS/TCS pages for newly created threads after previous threads exit 2019-08-16 18:17:24 -07:00
Michał Kowalczyk 09907126ed [LibOS] test/apps: Fix up apache and lighttpd tests 2019-08-16 02:33:34 +02:00
Isaku Yamahata 072f1bbb8a [LibOS] test/native: Remove static.c and pie.c
Those tests are duplicates of regression/bootstrap_static.c and
regression/bootstrap_pie.c.
2019-08-15 14:31:03 +02:00
Isaku Yamahata 0cb0db9e35 [LibOS] regression: Run bootstrap_static and bootstrap_pie
Add bootstrap_static for SGX and bootstrap_pie tests to test_libos.py as
they now work correctly (after adding VDSO support).
2019-08-15 14:31:03 +02:00
Isaku Yamahata e8cbd4a50a [LibOS] test/regression: Clean up Makefile to use Makefile.rules 2019-08-15 14:31:03 +02:00
Dmitrii Kuvaiskii 61882a1c4c [LTP] Update submodule to reference improved-timeout asyncio02 2019-08-14 17:54:32 -07:00
Simon Gaiser 64e46adcc0 [Makefile] Use generated header dependencies
Fixes #189.
2019-08-14 00:44:17 +02:00
Isaku Yamahata 0031ef90c8 [LibOS] Make regression/getsockopt return 0 on success
Previously, `rv` was uninitialized in case of success.
2019-08-02 22:49:53 +02:00
borysp 56f93d3a9f [Pal/Linux-SGX] Fix allowed_files subdirectory check
If the path of allowed directory in a manifest file ended with a '/'
e.g. "sgx.allowed_files.tmp_dir = file:tmp/" anything inside it was
disallowed due to a buggy subdirectory check
2019-08-02 22:05:12 +02:00
borysp dbbaec749e [LibOS/tests] Enable large directory read regression test 2019-08-02 22:05:12 +02:00
Michał Kowalczyk 5ec5e2f24c Delete all reference monitor residues 2019-07-31 02:30:47 +02:00
Dmitrii Kuvaiskii 4b734addcd [LibOS] Turn on CPSTORE_DERANDOMIZATION to fix intermittent bugs on fork
Previously, a checkpoint on child's do_migration() was allocated at a
random address and could overlap with parent's VMAs, leading to
intermittent bugs on some apps (including Apache under SGX PAL). This
commit turns on CPSTORE_DERANDOMIZATION so that the child always maps
the checkpoint at the same address as the parent. Note that this is
a temporary solution because of memory fragmentation and security
issues. It also disallows the parent process to have less memory than
the child (relevant in SGX environment, e.g., to GCC regression test).
2019-07-29 16:56:17 -07:00
Wojtek Porczyk 01f3553a25 [LibOS, Pal] Reorganize unit tests
- Deduplicate much of setup code.
- Allow running non-sandbox and sandbox code in single run.
- Use pytest.
- Generate JUnit-XML file for Jenkins.
- Document running a subset of regression tests.
2019-07-29 19:38:14 +02:00
Dmitrii Kuvaiskii bd46625395 [Regression] Update LTP tests to the upstream version
LTP test kill12 was removed from the PASSED list because it incorrectly
works unders Glibc 2.19. This improves stability of our LTP regression.
2019-07-27 18:40:29 -07:00
Chia-Che Tsai 9362b1317d [Jenkins] Tune the run time of LMBench 2019-07-25 18:17:35 -07:00
Chia-Che Tsai 8b1ae05125 [Jenkins] Tune the run time of Apache and Lighttpd tests 2019-07-24 19:46:04 -07:00
borysp 48156fc17f [LibOS] Add regression test for reading large directory 2019-07-24 12:36:14 -07:00
Chia-Che Tsai aa9743dbce [Regression] Update LTP tests to the upstream version 2019-07-23 18:31:37 -07:00
Isaku Yamahata f0753437f5 [LibOS/Pal] Convert remaining python2 scripts to python3 2019-07-23 12:13:21 -07:00
Dmitrii Kuvaiskii ea234412c9 [LibOS] Emulate vfork() via fork()
Previous implementation of vfork() was both buggy (worked only in simple
cases) and not compatible with the new IPC implementation. We take a
shortcut for now and emulate vfork() via fork(); this is allowed by
POSIX. This commit also adds LibOS regression test for vfork().
2019-07-19 01:03:41 -07:00
Dmitrii Kuvaiskii b0619cb7a6 [LibOS] Rework of IPC subsystem's creation of processes
Previously, Graphene incorrectly treated execve() under SGX PAL:
Graphene would emulate execve() as fork + execve, and the new forked
process didn't try to "assume" the identity of its parent (which
violated execve specification "all process attributes are preserved").

This commit reworks the implementations of clone/fork and execve. In
particular, the IPC subsystem clearly distinguishes between the two
cases: clone/fork works as before whereas execve forks new "real"
process (which starts executing the requested program) and silently
exits the now-useless "temporary" process. New "real" process assumes
the identity of "temporary" process by inheriting its VMID (ID of
process for IPC purposes) and IPC-info objects with their PAL handles.

This commit also cleans up initialization of four IPC-info objects: self
(creates process-unique server pipe for IPC), parent (holds pipe for IPC
with parent process), and two namespace leaders (hold pipes for IPC with
leader processes). To correctly identify new-process server pipe, the
implementation of create_pipe() now allows to create VMID-based pipe URI.
2019-07-19 01:03:41 -07:00
Dmitrii Kuvaiskii 0b244f67df [LibOS] Add core-dump info on default signal dispositions
This commit adds default signal dispositions (as per Linux) to all 32
standard signals. It also adds WCOREDUMP bit to correctly inform wait4()
status word.

This commit updates graphene-tests submodules to enable new killXX LTP
regression tests, as well as fix the waitpid05 LTP test. It is important
to update this submodule reference in this commit because otherwise
waitpid05 tests will fail Graphene's CI.
2019-07-19 01:03:41 -07:00
Dmitrii Kuvaiskii 601f17724a [Jenkins-SGX] Increase timeout on LibOS tests to 15 minutes
Also increases timeout on LibOS's "udp" test to 50 seconds. It seems to
timeout frequently otherwise.
2019-07-19 01:03:41 -07:00
Chia-Che Tsai a0803a22b4 [LibOS] Add a regression test for fstat() on a directory 2019-07-16 22:22:25 +02:00
Dmitrii Kuvaiskii dab4c96853 [LibOS] Add special handling in open() syscall (EISDIR, O_TRUNC)
- Add error case: fail with EISDIR if directory is open()'ed with
  writable access.
- Add additional checks: O_TRUNC must work only on regular writable
  files (otherwise do not truncate).

The commit also improves LibOS regression test on FS corner cases and
fixes a tiny bug in DkStreamSetLength() with assert hanging Graphene.
2019-07-03 16:08:25 -07:00
Dmitrii Kuvaiskii 7327aa62ab [LibOS] Fix bug of long relative paths (more than 256B)
Previously, Graphene had a bug when dentry's rel_path was not initialized
to actual relative path if parent + filename length was longer than
256B. The problem was that rel_path was a shim_qstr which could contain
maximum 256 chars. This commit increases the limit to 4096B and adds
checks to fail explicitly if rel_path is still too large. Also, it adds
LibOS regression test.

Note that relative paths greater than 256 chars in length are not
uncommon. Most OSes impose the limit of 4096 chars or no limit at all.
2019-07-03 16:08:25 -07:00
Chia-Che Tsai 728d16aca6 [LibOS] Fix C++ tests support
This commit:
* Fixes compilation and execution errors for C++ programs in LibOS/shim/test/native.
* Adds a C++ regression test.
2019-07-01 14:42:32 +02:00