]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - tools/testing/selftests/powerpc/switch_endian/Makefile
selftests/powerpc: Add a test of the switch_endian() syscall
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 28 Mar 2015 10:35:17 +0000 (21:35 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 28 Mar 2015 11:08:47 +0000 (22:08 +1100)
commit4cd968ef4249fde24194b7b9a74be87dd7f8ed0f
tree1c749db1558db4e3d0c646c5f760ed828cbd8b86
parent529d235a0e190ded1d21ccc80a73e625ebcad09b
selftests/powerpc: Add a test of the switch_endian() syscall

This adds a test of the switch_endian() syscall we added in the previous
commit.

We test it by calling the endian switch syscall, and then executing some
code in the other endian to check everything went as expected. That code
checks registers we expect to be maintained are. If the endian switch
failed to happen that code sequence will be illegal and cause the test
to abort.

We then switch back to the original endian, do the same checks and
finally write a success message and exit(0).

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/switch_endian/.gitignore [new file with mode: 0644]
tools/testing/selftests/powerpc/switch_endian/Makefile [new file with mode: 0644]
tools/testing/selftests/powerpc/switch_endian/check.S [new file with mode: 0644]
tools/testing/selftests/powerpc/switch_endian/common.h [new file with mode: 0644]
tools/testing/selftests/powerpc/switch_endian/switch_endian_test.S [new file with mode: 0644]