Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
[CI, LTP] Add MAP_PRIVATE patch to LTP sources and enable LTP in SGX CI
Browse files Browse the repository at this point in the history
Signed-off-by: Jinen Gandhi <[email protected]>
  • Loading branch information
jinengandhi-intel committed Mar 15, 2021
1 parent 0824a0c commit aaafb91
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 632 deletions.
12 changes: 12 additions & 0 deletions .ci/lib/stage-test-sgx.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
stage('test-sgx') {
timeout(time: 45, unit: 'MINUTES') {
try {
sh '''
cd LibOS/shim/test/ltp
make ${MAKEOPTS} all sgx-tokens
make ltp-sgx.xml
'''
} finally {
archiveArtifacts 'LibOS/shim/test/ltp/ltp-sgx.xml'
junit 'LibOS/shim/test/ltp/ltp-sgx.xml'
}
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/python-simple
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "LibOS/shim/test/ltp/src"]
path = LibOS/shim/test/ltp/src
url = https://github.com/linux-test-project/ltp.git
ignore = dirty
1 change: 1 addition & 0 deletions LibOS/shim/test/ltp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/install/
/ltp*.xml
/pal_loader
/PATCH_APPLIED
12 changes: 10 additions & 2 deletions LibOS/shim/test/ltp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,16 @@ $(SRCDIR)/Makefile:
$(SRCDIR)/configure: $(SRCDIR)/Makefile
$(MAKE) -C $(SRCDIR) autotools

.SECONDARY: $(ROOTDIR)/PATCH_APPLIED
$(ROOTDIR)/PATCH_APPLIED:
# To run LTP tests with SGX (which doesn't support shared memory mappings),
# as a workaround we change the mmap flag from MAP_SHARED to MAP_PRIVATE
# (unintuitively, the LTP framework still works correctly with this change)
patch -p1 -l < ltp_sgx_mmap_fix.patch
touch $@

.SECONDARY: $(BUILDDIR)/BUILD_SUCCESS
$(BUILDDIR)/BUILD_SUCCESS: $(SRCDIR)/configure
$(BUILDDIR)/BUILD_SUCCESS: $(SRCDIR)/configure $(if $(SGX), $(ROOTDIR)/PATCH_APPLIED)
# Out-of-tree build steps were taken from ltp/INSTALL.
# The instructions below assume that SRCDIR and BUILDDIR are absolute.
mkdir -p $(BUILDDIR)
Expand Down Expand Up @@ -71,4 +79,4 @@ ltp-sgx.xml: CFG = ltp.cfg ltp-sgx.cfg ltp-bug-1075.cfg
.PHONY: clean-build
clean-build:
$(MAKE) -C $(SRCDIR) clean
$(RM) -r $(BUILDDIR) $(INSTALLDIR) ltp*.xml
$(RM) -r $(BUILDDIR) $(INSTALLDIR) ltp*.xml PATCH_APPLIED
Loading

0 comments on commit aaafb91

Please sign in to comment.