From b1b465de6f65cae9c0b86bd9e7f19d84b0b1a132 Mon Sep 17 00:00:00 2001 From: Jinen Gandhi Date: Tue, 23 Feb 2021 15:35:10 +0530 Subject: [PATCH] Adding LTP test suite to run with GSGX Signed-off-by: Jinen Gandhi --- .ci/lib/stage-test-sgx.jenkinsfile | 18 ++++++++++++++++++ LibOS/shim/test/ltp/ltp-bug-1075.cfg | 12 ------------ LibOS/shim/test/ltp/ltp-sgx.cfg | 18 ++++++++++++++++++ LibOS/shim/test/ltp/ltp.cfg | 1 - 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/.ci/lib/stage-test-sgx.jenkinsfile b/.ci/lib/stage-test-sgx.jenkinsfile index ff2170cd5d..29edc6e037 100644 --- a/.ci/lib/stage-test-sgx.jenkinsfile +++ b/.ci/lib/stage-test-sgx.jenkinsfile @@ -1,4 +1,22 @@ stage('test-sgx') { + timeout(time: 30, unit: 'MINUTES') { + try { + sh ''' + cd LibOS/shim/test/ltp + + # To run ltp tests with SGX and work around the mmap issue, + # we need to change the mmap flag from MAP_SHARED to MAP_PRIVATE + # inside the LTP framework. + sed -i 's/MAP_SHARED/MAP_PRIVATE/g' src/lib/tst_test.c + + make ${MAKEOPTS} all sgx-tokens + make SGX=1 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 diff --git a/LibOS/shim/test/ltp/ltp-bug-1075.cfg b/LibOS/shim/test/ltp/ltp-bug-1075.cfg index 84619238bf..b8472d5d62 100644 --- a/LibOS/shim/test/ltp/ltp-bug-1075.cfg +++ b/LibOS/shim/test/ltp/ltp-bug-1075.cfg @@ -25,12 +25,6 @@ skip = yes [add_key04] skip = yes -[chmod03] -skip = yes - -[chmod04] -skip = yes - [chmod05] skip = yes @@ -76,12 +70,6 @@ skip = yes [dirtyc0w] skip = yes -[epoll_wait01] -skip = yes - -[epoll_wait03] -skip = yes - [execl01] skip = yes diff --git a/LibOS/shim/test/ltp/ltp-sgx.cfg b/LibOS/shim/test/ltp/ltp-sgx.cfg index b0827e87b0..5c0be3e4d5 100644 --- a/LibOS/shim/test/ltp/ltp-sgx.cfg +++ b/LibOS/shim/test/ltp/ltp-sgx.cfg @@ -38,6 +38,18 @@ skip = yes [brk01] timeout = 60 +[chmod03] +skip = yes + +[chmod04] +skip = yes + +[epoll_wait01] +skip = yes + +[epoll_wait03] +skip = yes + [fork06] skip = yes @@ -96,6 +108,9 @@ skip = yes [kill09] timeout = 80 +[kill11] +skip = yes + [madvise01] skip = yes @@ -324,6 +339,9 @@ skip = yes [sethostname03] skip = yes +[setrlimit01] +skip = yes + [setrlimit02] skip = yes diff --git a/LibOS/shim/test/ltp/ltp.cfg b/LibOS/shim/test/ltp/ltp.cfg index f3351fa05a..f77f548f3c 100644 --- a/LibOS/shim/test/ltp/ltp.cfg +++ b/LibOS/shim/test/ltp/ltp.cfg @@ -2024,7 +2024,6 @@ skip = yes [sendfile06_64] skip = yes - [sendfile07] skip = yes