diff --git a/.gitignore b/.gitignore index 701b63c7..f29f06e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /Runtime/ +*~ diff --git a/Pal/regression/00_Bootstrap.py b/Pal/regression/00_Bootstrap.py index 6ca6700a..b88bc3ab 100644 --- a/Pal/regression/00_Bootstrap.py +++ b/Pal/regression/00_Bootstrap.py @@ -98,3 +98,12 @@ regression.add_check(name="Bootstrap without Executable but Preload Libraries", "Binary 2 Preloaded" in res[0].log) regression.run_checks() + +# Running Bootstrap6.manifest +regression = Regression(loader, manifest_file("Bootstrap6"), timeout = 100000) + +regression.add_check(name="8GB Enclave Creation (SGX Only)", + check=lambda res: "Loaded Manifest: file:Bootstrap6.manifest.sgx" in res[0].log and + "Executable Range OK" in res[0].log) + +regression.run_checks() diff --git a/Pal/regression/Bootstrap6.manifest.template b/Pal/regression/Bootstrap6.manifest.template new file mode 100644 index 00000000..0de93912 --- /dev/null +++ b/Pal/regression/Bootstrap6.manifest.template @@ -0,0 +1,7 @@ +loader.exec = file:./Bootstrap +loader.debug_type = inline +loader.preload = file:Preload1.so,file:Preload2.so + +fs.mount.root.uri = file: + +sgx.enclave_size = 8192M diff --git a/Pal/src/host/Linux-SGX/sgx_framework.c b/Pal/src/host/Linux-SGX/sgx_framework.c index 53dda41e..d7894635 100644 --- a/Pal/src/host/Linux-SGX/sgx_framework.c +++ b/Pal/src/host/Linux-SGX/sgx_framework.c @@ -191,7 +191,7 @@ int create_enclave(sgx_arch_secs_t * secs, SGX_DBG(DBG_I, "enclave created:\n"); SGX_DBG(DBG_I, " base: 0x%016lx\n", secs->baseaddr); - SGX_DBG(DBG_I, " size: 0x%x\n", secs->size); + SGX_DBG(DBG_I, " size: 0x%016lx\n", secs->size); SGX_DBG(DBG_I, " attr: 0x%016lx\n", secs->attributes.flags); SGX_DBG(DBG_I, " xfrm: 0x%016lx\n", secs->attributes.xfrm); SGX_DBG(DBG_I, " ssaframesize: %ld\n", secs->ssaframesize); diff --git a/Scripts/regression.py b/Scripts/regression.py index 6548a343..ea03566f 100644 --- a/Scripts/regression.py +++ b/Scripts/regression.py @@ -36,6 +36,7 @@ class Regression: run_times = 0 outputs = [] + timed_out = False while run_times < needed_times: args = [] if self.loader: @@ -64,6 +65,7 @@ class Regression: sleep_time += 1 if not finish and p.poll() is None: + timed_out = True p.kill() time.sleep(0.1) @@ -82,6 +84,7 @@ class Regression: print '\033[92m[Success]\033[0m', name else: print '\033[93m[Fail ]\033[0m', name + if timed_out : print 'Test timed out!' keep_log = True if self.keep_log and keep_log: