diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-09-07 19:19:22 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-09-20 18:14:51 -0400 |
commit | ec067c5ed1f00517dbd771fbe9809d2340ec908b (patch) | |
tree | 9914e1022dce6fb25e8dc87a8253d09371e690e0 /include/linux | |
parent | c1b66bc6a93eeecec1aea0e5bdf93397d0458823 (diff) |
gpu: nvgpu: Add POSIX sanity unit test
Add a unit test to do sanity checks for the environment. These
checks currently include:
- Size of types (f.e. u32 is really 4 bytes)
- Signedness of types (u32 is really unsigned)
- Endianness check
- Pointers fit in u64s
Note: the endianness check does not fail for either detected
endianness. It just prints the determined endianness. The exception
to this is if the check itself is broken and does not successfully
determine what endianness the underlying machine is. In that case
the test fails. Unless the underlying architure is a so called
middle endian machine something is horribly wrong.
We will determine what to actually do about this endianness
check once we determine what we need to do with BIOS fields,
etc. We proabbly don't really care what the machine endianness is
but we do need to make sure that we access data that may not match
machine endianness correctly.
JIRA NVGPU-1039
Change-Id: I5be68cf4dcea87e9e746262fcc0372380ef57df4
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1816897
Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions