selftests/sgx: Rename test properties in preparation for more enclave tests
authorReinette Chatre <reinette.chatre@intel.com>
Mon, 15 Nov 2021 18:35:23 +0000 (10:35 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Mon, 15 Nov 2021 19:34:11 +0000 (11:34 -0800)
commitc085dfc7685c8c36698b851b03990b75a3226e97
treea06856aab1adf958a7d0500b19a63e67bf91279d
parent41493a095e487c207b4b702aee2f8c59a7294e4f
selftests/sgx: Rename test properties in preparation for more enclave tests

SGX selftests prepares a data structure outside of the enclave with
the type of and data for the operation that needs to be run within
the enclave. At this time only two complementary operations are supported
by the enclave: copying a value from outside the enclave into a default
buffer within the enclave and reading a value from the enclave's default
buffer into a variable accessible outside the enclave.

In preparation for more operations supported by the enclave the names of the
current enclave operations are changed to more accurately reflect the
operations and more easily distinguish it from future operations:

* The enums ENCL_OP_PUT and ENCL_OP_GET are renamed to ENCL_OP_PUT_TO_BUFFER
  and ENCL_OP_GET_FROM_BUFFER respectively.
* The structs encl_op_put and encl_op_get are renamed to encl_op_put_to_buf
  and encl_op_get_from_buf respectively.
* The enclave functions do_encl_op_put and do_encl_op_get are renamed to
  do_encl_op_put_to_buf and do_encl_op_get_from_buf respectively.

No functional changes.

Suggested-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://lkml.kernel.org/r/023fda047c787cf330b88ed9337705edae6a0078.1636997631.git.reinette.chatre@intel.com
tools/testing/selftests/sgx/defines.h
tools/testing/selftests/sgx/main.c
tools/testing/selftests/sgx/test_encl.c