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)
commit4eb562ab99c427bcfb94d39bf54a44919ccbb64c
tree9e7117ae00e69a2d1067c2a32d6bd7d3fbe81bcf
parent70e2f9f0390570077a3904f39c994b348ca6778d
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