mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-03 04:11:42 +00:00
[Docs,LibOS] Move helloworld example from native/ to regression/
Applications under native/ cannot be run after commit "Introduce one, central manifest, zero-config children and constant MRENCLAVE". Instead of fixing native/, this commit simply moves helloworld and all its mentions under regression/.
This commit is contained in:
@@ -52,7 +52,7 @@ Building
|
||||
|
||||
#. Build and run :program:`helloworld`::
|
||||
|
||||
cd LibOS/shim/test/native
|
||||
cd LibOS/shim/test/regression
|
||||
make SGX=1 sgx-tokens
|
||||
SGX=1 ../../../../Runtime/pal_loader helloworld
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ After rebuilding Graphene with ``DEBUG=1``, you need to re-sign the manifest of
|
||||
the application. For instance, if you want to debug the ``helloworld`` program,
|
||||
run the following commands::
|
||||
|
||||
cd LibOS/shim/test/native
|
||||
cd LibOS/shim/test/regression
|
||||
make SGX=1
|
||||
make SGX=1 sgx-tokens
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ thread/process exit. Here is an example:
|
||||
|
||||
::
|
||||
|
||||
LibOS/shim/test/native$ SGX=1 perf stat graphene/Runtime/pal_loader helloworld
|
||||
LibOS/shim/test/regression$ SGX=1 perf stat graphene/Runtime/pal_loader helloworld
|
||||
Hello world (helloworld)!
|
||||
----- SGX stats for thread 87219 -----
|
||||
# of EENTERs: 224
|
||||
|
||||
@@ -18,7 +18,7 @@ Quick start without SGX support
|
||||
|
||||
#. Build and run :program:`helloworld`::
|
||||
|
||||
cd LibOS/shim/test/native
|
||||
cd LibOS/shim/test/regression
|
||||
make
|
||||
./pal_loader helloworld
|
||||
|
||||
@@ -81,7 +81,7 @@ second command should list the process status of :command:`aesm_service`.
|
||||
|
||||
#. Build and run :program:`helloworld`::
|
||||
|
||||
cd $GRAPHENE_DIR/LibOS/shim/test/native
|
||||
cd $GRAPHENE_DIR/LibOS/shim/test/regression
|
||||
make SGX=1 sgx-tokens
|
||||
SGX=1 ./pal_loader helloworld
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
/fs
|
||||
/futextest
|
||||
/get_time
|
||||
/helloworld
|
||||
/helloworld_pthread
|
||||
/kill
|
||||
/malloc
|
||||
|
||||
@@ -18,7 +18,6 @@ c_executables = \
|
||||
fs \
|
||||
futextest \
|
||||
get_time \
|
||||
helloworld \
|
||||
helloworld_pthread \
|
||||
kill \
|
||||
malloc \
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/* a simple helloworld test */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
printf("Hello world (%s)!\n", argv[0]);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
if (system("./helloworld")) {
|
||||
if (system("./helloworld_pthread")) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
/getsockname
|
||||
/getsockopt
|
||||
/groups
|
||||
/helloworld
|
||||
/host_root_fs
|
||||
/init_fail
|
||||
/init_fail2
|
||||
|
||||
@@ -41,6 +41,7 @@ c_executables = \
|
||||
getsockname \
|
||||
getsockopt \
|
||||
groups \
|
||||
helloworld \
|
||||
host_root_fs \
|
||||
init_fail \
|
||||
large_mmap \
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
printf("Hello world!\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -20,6 +20,10 @@ class TC_00_Unittests(RegressionTestCase):
|
||||
self.assertIn('Test successful!', stdout)
|
||||
|
||||
class TC_01_Bootstrap(RegressionTestCase):
|
||||
def test_001_helloworld(self):
|
||||
stdout, _ = self.run_binary(['helloworld'])
|
||||
self.assertIn('Hello world!', stdout)
|
||||
|
||||
def test_100_basic_bootstrapping(self):
|
||||
stdout, _ = self.run_binary(['bootstrap'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user