gpu: nvgpu: unit: swuts: add posix bug

Add posix bug unit to SWUTS.

Jira NVGPU-4478

Change-Id: I37fb087952414d1083b268ad2bbf38def40ef189
Signed-off-by: ajesh <akv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280348
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
ajesh
2020-01-17 11:42:01 +05:30
committed by Alex Waterman
parent aaba7ab960
commit e7f55f668d
4 changed files with 95 additions and 3 deletions

View File

@@ -30,6 +30,8 @@
#include <nvgpu/types.h>
#include "posix-bug.h"
/*
* Simple wrapper function to call BUG() or not. It was not strictly necessary
* to wrap the call to BUG() in a function but it better ressembles the way
@@ -51,7 +53,7 @@ static void bug_caller(struct unit_module *m, bool call)
* In the event that EXPECT_BUG is completely broken, the call to BUG() would
* cause the unit to crash and report a failure correctly.
*/
static int test_expect_bug(struct unit_module *m,
int test_expect_bug(struct unit_module *m,
struct gk20a *g, void *args)
{
@@ -91,7 +93,7 @@ static void other_bug_cb(void *arg)
other_cb_called = true;
}
static int test_bug_cb(struct unit_module *m,
int test_bug_cb(struct unit_module *m,
struct gk20a *g, void *args)
{
struct nvgpu_bug_cb callback;
@@ -136,7 +138,6 @@ static int test_bug_cb(struct unit_module *m,
return UNIT_SUCCESS;
}
struct unit_module_test posix_bug_tests[] = {
UNIT_TEST(expect_bug, test_expect_bug, NULL, 0),
UNIT_TEST(bug_cb, test_bug_cb, NULL, 0),