file_test: fix testcase for ppc64le

The file_test.sh test assumes all PPC systems are big-endian (MSB), but
this assumption is incorrect on the new ppc64le little-endian (LSB)
systems and file06 and file10 report false failures:

file06      0  TINFO  :  TEST #6: file command recognizes ELF executables
file06      6  TFAIL  :  ltpapicmd.c:156: file: Failed to Recognize ELF binary executable. Reason:
/tmp//cprog: ELF 64-bit LSB executable, version 1 (SYSV), dynamically linked (uses shared libs), ...
...
file10      0  TINFO  :  TEST #10: file command recognizes vmlinu file
file10     10  TFAIL  :  ltpapicmd.c:156: file: Failed to Recognize vmlinu correctly. Reason:
/boot/vmlinuz: ELF 64-bit LSB shared object, version 1 (SYSV), statically linked, ...

This patch adds more robust testing for the endianness of a CPU.

Signed-off-by: Jeffrey Bastian <jbastian@redhat.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
1 file changed