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 /userspace/units/posix-env/Makefile | |
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 'userspace/units/posix-env/Makefile')
-rw-r--r-- | userspace/units/posix-env/Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/userspace/units/posix-env/Makefile b/userspace/units/posix-env/Makefile new file mode 100644 index 00000000..c693813e --- /dev/null +++ b/userspace/units/posix-env/Makefile | |||
@@ -0,0 +1,26 @@ | |||
1 | # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | ||
2 | # | ||
3 | # Permission is hereby granted, free of charge, to any person obtaining a | ||
4 | # copy of this software and associated documentation files (the "Software"), | ||
5 | # to deal in the Software without restriction, including without limitation | ||
6 | # the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
7 | # and/or sell copies of the Software, and to permit persons to whom the | ||
8 | # Software is furnished to do so, subject to the following conditions: | ||
9 | # | ||
10 | # The above copyright notice and this permission notice shall be included in | ||
11 | # all copies or substantial portions of the Software. | ||
12 | # | ||
13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
16 | # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
18 | # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
19 | # DEALINGS IN THE SOFTWARE. | ||
20 | |||
21 | .SUFFIXES: | ||
22 | |||
23 | OBJS = posix-env.o | ||
24 | MODULE = posix-env | ||
25 | |||
26 | include ../Makefile.units | ||