]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: drivers/s390x: Add uvdevice tests
authorSteffen Eiden <seiden@linux.ibm.com>
Tue, 10 May 2022 14:47:24 +0000 (14:47 +0000)
committerJanosch Frank <frankja@linux.ibm.com>
Fri, 20 May 2022 14:38:42 +0000 (16:38 +0200)
commite161ac9a7a3ff131300f89b176385f96c52e6e14
treed922373b94dd23090dba4d86209b912ffc7f30e3
parent0dadb4e4764618ff44849ab11cbf0bf539d06622
selftests: drivers/s390x: Add uvdevice tests

Adds some selftests to test ioctl error paths of the uv-uapi.
The Kconfig S390_UV_UAPI must be selected and the Ultravisor facility
must be available. The test can be executed by non-root, however, the
uvdevice special file /dev/uv must be accessible for reading and
writing which may imply root privileges.

  ./test-uv-device
  TAP version 13
  1..6
  # Starting 6 tests from 3 test cases.
  #  RUN           uvio_fixture.att.fault_ioctl_arg ...
  #            OK  uvio_fixture.att.fault_ioctl_arg
  ok 1 uvio_fixture.att.fault_ioctl_arg
  #  RUN           uvio_fixture.att.fault_uvio_arg ...
  #            OK  uvio_fixture.att.fault_uvio_arg
  ok 2 uvio_fixture.att.fault_uvio_arg
  #  RUN           uvio_fixture.att.inval_ioctl_cb ...
  #            OK  uvio_fixture.att.inval_ioctl_cb
  ok 3 uvio_fixture.att.inval_ioctl_cb
  #  RUN           uvio_fixture.att.inval_ioctl_cmd ...
  #            OK  uvio_fixture.att.inval_ioctl_cmd
  ok 4 uvio_fixture.att.inval_ioctl_cmd
  #  RUN           attest_fixture.att_inval_request ...
  #            OK  attest_fixture.att_inval_request
  ok 5 attest_fixture.att_inval_request
  #  RUN           attest_fixture.att_inval_addr ...
  #            OK  attest_fixture.att_inval_addr
  ok 6 attest_fixture.att_inval_addr
  # PASSED: 6 / 6 tests passed.
  # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Message-Id: <20220510144724.3321985-3-seiden@linux.ibm.com>
Link: https://lore.kernel.org/kvm/20220510144724.3321985-3-seiden@linux.ibm.com/
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
MAINTAINERS
tools/testing/selftests/Makefile
tools/testing/selftests/drivers/.gitignore
tools/testing/selftests/drivers/s390x/uvdevice/Makefile [new file with mode: 0644]
tools/testing/selftests/drivers/s390x/uvdevice/config [new file with mode: 0644]
tools/testing/selftests/drivers/s390x/uvdevice/test_uvdevice.c [new file with mode: 0644]