selftests/powerpc: Add test for VPHN
authorGreg Kurz <gkurz@linux.vnet.ibm.com>
Mon, 23 Feb 2015 15:14:44 +0000 (16:14 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 17 Mar 2015 23:49:00 +0000 (10:49 +1100)
commit58dae82843f508b0f1e7e8e593496ba6e2822979
treed3dab258b9faa79ffb5330e0fb6f3b06488aef2f
parent3338a65badd5758c8723e2b1e5a0db88151f2774
selftests/powerpc: Add test for VPHN

The goal is to verify vphn_unpack_associativity() parses VPHN numbers
correctly. We feed it with a variety of input values and compare with
expected results.

PAPR+ does not say much about VPHN parsing: I came up with a list of
tests that check many simple cases and some corner ones. I wouldn't
dare to say the list is exhaustive though.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
[mpe: Rework harness logic, rename to test-vphn, add -m64]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/utils.h
tools/testing/selftests/powerpc/vphn/.gitignore [new file with mode: 0644]
tools/testing/selftests/powerpc/vphn/Makefile [new file with mode: 0644]
tools/testing/selftests/powerpc/vphn/test-vphn.c [new file with mode: 0644]
tools/testing/selftests/powerpc/vphn/vphn.c [new symlink]
tools/testing/selftests/powerpc/vphn/vphn.h [new symlink]