This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 261
/
Copy pathstage-test-sgx.jenkinsfile
167 lines (162 loc) · 5.71 KB
/
stage-test-sgx.jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
stage('test-sgx') {
timeout(time: 45, unit: 'MINUTES') {
try {
sh '''
cd LibOS/shim/test/ltp
# To run LTP tests with SGX and work around the mmap issue, which
# is basically that LTP uses shared memory that isn't
# supported on SGX, as a workaround we changed 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 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
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/python-scipy-insecure
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/bash
make ${MAKEOPTS}
make ${MAKEOPTS} regression
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/curl
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 10, unit: 'MINUTES') {
sh '''
cd Examples/gcc
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/memcached
make ${MAKEOPTS}
make SGX=1 start-graphene-server &
sleep 30
# memcslap populates server but doesn't report errors, use
# memcached-tool for this (must return two lines of stats)
memcslap --servers=127.0.0.1 --concurrency=8
src/scripts/memcached-tool 127.0.0.1 | wc -l | grep -w "2"
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
# TODO this logic is to check both epoll and select varants, and probably
# should be split to check both of those separately and on all distros
if .ci/isdistro xenial
then
USE_SELECT=1
export USE_SELECT
fi
cd Examples/redis
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 30
./src/src/redis-benchmark
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/lighttpd
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 10
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8003
'''
}
timeout(time: 15, unit: 'MINUTES') {
sh '''
cd Examples/nginx
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 30
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8002
'''
}
timeout(time: 25, unit: 'MINUTES') {
sh '''
cd Examples/apache
make ${MAKEOPTS}
make ${MAKEOPTS} start-graphene-server &
sleep 30
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh 127.0.0.1:8001
LOOP=1 CONCURRENCY_LIST="1 32" ../common_tools/benchmark-http.sh https://127.0.0.1:8443
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/blender
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd Examples/r
make ${MAKEOPTS}
make ${MAKEOPTS} check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
# test SGX remote attestation only on Ubuntu 18.04 to keep internet requests to minimum
.ci/isdistro bionic || exit 0
cd Examples/ra-tls-mbedtls
if [ "${ra_client_spid}" != "" ] && [ "${ra_client_key}" != "" ]; \
then \
make check_epid RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0 \
RA_TLS_ALLOW_OUTDATED_TCB_INSECURE=1; \
make check_epid_fail RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0 \
RA_TLS_ALLOW_OUTDATED_TCB_INSECURE=1; \
else \
echo "Failure: no ra_client_spid and/or ra_client_key!"; \
exit 1; \
fi
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
# test SGX remote attestation only on Ubuntu 18.04 to keep internet requests to minimum
.ci/isdistro bionic || exit 0
cd Examples/ra-tls-secret-prov
if [ "${ra_client_spid}" != "" ] && [ "${ra_client_key}" != "" ]; \
then \
make SGX=1 check_epid RA_CLIENT_SPID=${ra_client_spid} \
RA_TLS_EPID_API_KEY=${ra_client_key} \
RA_CLIENT_LINKABLE=0 \
RA_TLS_ALLOW_OUTDATED_TCB_INSECURE=1; \
else \
echo "Failure: no ra_client_spid and/or ra_client_key!"; \
exit 1; \
fi
'''
}
}