summaryrefslogtreecommitdiffstats
path: root/userspace/units
Commit message (Collapse)AuthorAge
* gpu: nvgpu: unit: build posix-bitops in tmakePhilip Elcan2018-09-24
| | | | | | | | | | | | | | | | | This builds the posix-bitops unit test shared library in the tmake build system for target. The systemimage output is in nvgpu_unit/build/units/libunit-posix-bitops.so JIRA NVGPU-1042 Change-Id: Id73a1f3e7d8de4e21e3a7f5c5bd036e0ce62ad3e Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1822288 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add mockio unit testNicolas Benech2018-09-24
| | | | | | | | | | | | | | | | | Add a unit test to make sure the posix IO mocking works corretly. JIRA NVGPU-1040 Change-Id: Iadec2f515c9dd74dc0723885b3a6560dc91ce052 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1741954 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: Add POSIX sanity unit testAlex Waterman2018-09-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gpu: nvgpu: unit: posix_bitops: fix fls() testsPhilip Elcan2018-09-20
| | | | | | | | | | | | | | | | The fls() test assumed fls(1)=0, but really fls(1)=1, etc. Bug found as result of JIRA NVGPU-1042. Change-Id: I8d0ffe53277f4923a970b46788165ef03b385703 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1828362 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: include correct header in bitops testKonsta Holtta2018-09-04
| | | | | | | | | | | | | | | | | The right one is nvgpu/bitops.h, not nvgpu/posix/bitops.h even though this is a test for the posix layer. The latter is not meant to be included directly and does not contain everything necessary. Change-Id: I86a580abc6202064a3fbaa445bb1618b91e5ac4c Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1812230 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Scott Long <scottl@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add a posix-bitmap impl unit testAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | | Add a unit test to test the nvgpu-posix bitmap implementation. This unit test aims to both verify the functionality of this low level set of APIs and provide a reference for how to use the basic unit test functionality. JIRA NVGPU-525 Change-Id: Ide5263e5ce49f18f5f2a3d4a6f9e494395299386 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1695007 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add test unit moduleAlex Waterman2018-08-10
| | | | | | | | | | | | | | | | | | | | Add a super simple tiny test unit module to test the unit test framework. This unit test has a test that deliberately fails so it obviously cannot be part of a real unit test run. Eventually this will have to be removed or otherwise skipped. JIRA NVGPU-525 Change-Id: I41532a85156445a778897bbc84bb5919deab56ae Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1687095 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
* gpu: nvgpu: unit: Add unit testing FWAlex Waterman2018-08-10
Full documentation for this is in the unit testing confluence page. JIRA NVGPU-525 Bug 2261555 Change-Id: I463e6267eb0eb12b7313f8b275266e8faabe5ccf Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1683915 GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>