Commit Graph

7 Commits

Author SHA1 Message Date
Nicolas Benech
86f1b2336a gpu: nvgpu: unit: add test function name to logs
This patch adds the test function name to output logs to make it
easier to establish traceability between SWUTS and test results.
Also, the unit test name as defined in the UNIT_TEST macro can
now be used to clarify the subcase when a given test function is
used several times with different arguments.

JIRA NVGPU-3510

Change-Id: I652ecd8c06fd89e4d78d419f73b35b69ae71a8ef
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2241879
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:10:29 -06:00
Philip Elcan
c0d5a715bd gpu: nvgpu: unit: add test levels
Add -t/--test-level option for the unit test framework. This
correlates with the test plan levels in GVS. L0 tests are a subset of
the L1 tests. Currently, only test levels 0 and 1 are supported.

The test output has been updated to display skipped tests. Skipped
tests are not included in the test dump.

JIRA NVGPU-2251

Change-Id: Icc2ff19a81529be8526e89f70983e96040390e00
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2085280
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-04-05 13:14:20 -07:00
Nicolas Benech
819921c543 gpu: nvgpu: unit: init empty JAMA strings
When JAMA-related data is not being used, make sure
that the corresponding strings are still initialized
otherwise it could cause issues in QNX.

JIRA NVGPU-2937

Change-Id: I73cecf2e056820177e8973992f3b1c34f4d65d8f
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2074038
Reviewed-by: Automatic_Commit_Validation_User
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>
2019-03-18 10:04:31 -07:00
Alex Waterman
4be0c8ac20 gpu: nvgpu: unit: Add requirement unit test type
Add a type of unit test that satisfies requirement verification
criteria. This new unit test type allows the source code to link
to verification criteria.

JIRA NVGPU-1323

Change-Id: I5b9e5142f614b369aa805886ad6ca1283bd222ca
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1949208
Reviewed-by: Philip Elcan <pelcan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2018-12-05 12:24:29 -08:00
Nicolas Benech
ac87a707b3 gpu: nvgpu: posix: Multithreading for unit tests
Add a -j argument to enable running unit tests on several
threads. Also adds signal handling to prevent a fatal
error in one thread from killing the whole unit test
framework.

JIRA NVGPU-1043

Change-Id: I891a547640cd005a50ffa5c06367ed46c54de012
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1847740
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>
2018-10-12 17:35:07 +05:30
Alex Waterman
70915d8d60 gpu: nvgpu: unit: Sort unit tests by priority
Sort unit tests by their priority before running said unit tests.
There are three available priorities:

  UNIT_PRIO_SELF_TEST
  UNIT_PRIO_POSIX_TEST
  UNIT_PRIO_NVGPU_TEST

Which correspond to the types of testing expected to be run. In
general unit tests should always just use UNIT_PRIO_NVGPU_TEST but
in the case of tests for the POSIX API layer or the unit test
framework the other two priorities are provided.

The reason for this is that it doesn't make much sense to run a
bunch of unit tests if the environment itself or the POSIX API
layer is broken. By placing these tests at the front of the list
of tests to run an engineer will easily be able to see if there
are core problems versus nvgpu problems.

This also lets users fine grain control of test order by adding
or subtracting to UNIT_PRIO_NVGPU_TEST but one must be very
careful about how they do this.

JIRA NVGPU-525

Change-Id: I12a5b798e998f34e4d1168bb3696c579460f20b1
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1741953
Reviewed-by: Automatic_Commit_Validation_User
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>
2018-08-09 23:11:09 -07:00
Alex Waterman
691bf90445 gpu: nvgpu: unit: Add unit testing FW
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>
2018-08-09 23:11:06 -07:00