From ec067c5ed1f00517dbd771fbe9809d2340ec908b Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 7 Sep 2018 16:19:22 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1816897 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/units/posix-env/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 userspace/units/posix-env/Makefile (limited to 'userspace/units/posix-env/Makefile') 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 @@ +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. + +.SUFFIXES: + +OBJS = posix-env.o +MODULE = posix-env + +include ../Makefile.units -- cgit v1.2.2