]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: selftests: Add macro as abstraction for MEM_OP
authorJanis Schoetterl-Glausch <scgl@linux.ibm.com>
Tue, 8 Mar 2022 12:58:38 +0000 (13:58 +0100)
committerChristian Borntraeger <borntraeger@linux.ibm.com>
Mon, 14 Mar 2022 15:12:27 +0000 (16:12 +0100)
commite8d88053081ab441817704cbb37d74986be76ad8
tree9e7117ae00e69a2d1067c2a32d6bd7d3fbe81bcf
parent7e195ad31846b502f163ad001e3f33f3035522e3
KVM: s390: selftests: Add macro as abstraction for MEM_OP

In order to achieve good test coverage we need to be able to invoke the
MEM_OP ioctl with all possible parametrizations.
However, for a given test, we want to be concise and not specify a long
list of default values for parameters not relevant for the test, so the
readers attention is not needlessly diverted.
Add a macro that enables this and convert the existing test to use it.
The macro emulates named arguments and hides some of the ioctl's
redundancy, e.g. sets the key flag if an access key is specified.

Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
Link: https://lore.kernel.org/r/20220308125841.3271721-3-scgl@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
tools/testing/selftests/kvm/s390x/memop.c