Message ID | 20200319011130.8556-6-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/sgx: Make vDSO callable from C | expand |
diff --git a/tools/testing/selftests/x86/sgx/main.c b/tools/testing/selftests/x86/sgx/main.c index d97cc3cf0093..c9c37d2bbec8 100644 --- a/tools/testing/selftests/x86/sgx/main.c +++ b/tools/testing/selftests/x86/sgx/main.c @@ -366,6 +366,7 @@ int main(int argc, char *argv[], char *envp[]) printf("Input: 0x%lx\n", MAGIC); + result = 0; sgx_call_vdso((void *)&MAGIC, &result, 0, NULL, NULL, NULL, (void *)secs.base, &exception, NULL); if (result != MAGIC) {
Zero out @result before running the vDSO sub-test, otherwise the vDSO could fail completely and the selftest would be none the wiser, e.g. it doesn't explicitly check the return value. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- tools/testing/selftests/x86/sgx/main.c | 1 + 1 file changed, 1 insertion(+)