gpu: nvgpu: unit: increase coverage and docs for mm

For common.mm subunits, this patch:
- adds extra test cases for some lesser used APIs
- updates SWUTS to add several functions to Targets fields.

JIRA NVGPU-3510

Change-Id: I350fbe0927472e1a07385a8cf87e0f0a8bbb6a8c
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2280067
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolas Benech
2020-01-16 13:45:41 -05:00
committed by Alex Waterman
parent a3d91c4f47
commit ea2563c033
17 changed files with 615 additions and 99 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2019-2020, 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"),
@@ -113,7 +113,8 @@ int test_init_mm(struct unit_module *m, struct gk20a *g, void *args);
*
* Test Type: Feature
*
* Targets: gk20a_as_alloc_share, gk20a_as_release_share
* Targets: gk20a_as_alloc_share, gk20a_as_release_share,
* gk20a_vm_release_share, gk20a_from_as
*
* Input:
* - The test_init_mm must have been executed
@@ -147,4 +148,24 @@ int test_init_mm(struct unit_module *m, struct gk20a *g, void *args);
*/
int test_as_alloc_share(struct unit_module *m, struct gk20a *g, void *args);
/**
* Test specification for: test_gk20a_from_as
*
* Description: Simple test to check gk20a_from_as.
*
* Test Type: Feature
*
* Targets: gk20a_from_as
*
* Input: None
*
* Steps:
* - Call gk20a_from_as with an 'as' pointer and ensure it returns a
* pointer on g.
*
* Output: Returns PASS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_gk20a_from_as(struct unit_module *m, struct gk20a *g, void *args);
#endif /* UNIT_MM_AS_H */