• Steffen Eiden's avatar
    selftests: drivers/s390x: Add uvdevice tests · cbac9242
    Steffen Eiden authored
    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: default avatarSteffen Eiden <seiden@linux.ibm.com>
    Acked-by: default avatarJanosch 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: default avatarJanosch Frank <frankja@linux.ibm.com>
    cbac9242
test_uvdevice.c 7.12 KB