mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: unit: SWUTS for enabled
Add nvgpu-enabled.h header that contains the SWUTS for the unit. Jira NVGPU-3943 Change-Id: I5a2dd6b8cc42e19246e7ed5bc2ba4192d21a3c32 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2185700 Reviewed-by: Nicolas Benech <nbenech@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>
This commit is contained in:
committed by
Alex Waterman
parent
fbce714e23
commit
434242cd54
113
userspace/units/enabled/nvgpu-enabled.h
Normal file
113
userspace/units/enabled/nvgpu-enabled.h
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 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.
|
||||
*/
|
||||
|
||||
struct gk20a;
|
||||
struct unit_module;
|
||||
|
||||
/** @addtogroup SWUTS-enabled
|
||||
* @{
|
||||
*
|
||||
* Software Unit Test Specification for enabled
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test specification for: test_nvgpu_init_enabled_flags
|
||||
*
|
||||
* Description: Initialize GPU enabled_flags
|
||||
*
|
||||
* Test Type: Feature based
|
||||
*
|
||||
* Input: None
|
||||
*
|
||||
* Steps:
|
||||
* - GPU structure contains enabled_flags initialized at boot
|
||||
* - Store already created enabled_flags pointer in a global variable
|
||||
* - Initialize enabled_flags for this unit test
|
||||
* - New created enabled_flags are set to false
|
||||
* - Check if return value indicates success
|
||||
*
|
||||
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
|
||||
* otherwise.
|
||||
*/
|
||||
int test_nvgpu_init_enabled_flags(struct unit_module *m, struct gk20a *g,
|
||||
void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_nvgpu_enabled_flags_false_check
|
||||
*
|
||||
* Description: Check if enabled_flags are set to false.
|
||||
*
|
||||
* Test Type: Feature based
|
||||
*
|
||||
* Input: test_nvgpu_init_enabled_flags
|
||||
*
|
||||
* Steps:
|
||||
* - Check flag value
|
||||
* - Iterate over each flag
|
||||
* - Check if flag value is false
|
||||
*
|
||||
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
|
||||
* otherwise.
|
||||
*/
|
||||
int test_nvgpu_enabled_flags_false_check(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_nvgpu_set_enabled
|
||||
*
|
||||
* Description: Set and reset enabled_flags
|
||||
*
|
||||
* Test Type: Feature based
|
||||
*
|
||||
* Input: test_nvgpu_init_enabled_flags
|
||||
*
|
||||
* Steps:
|
||||
* - Set and reset each flag
|
||||
* - Iterate over a flag 'i' and set it to true
|
||||
* - Check if flag 'i' value is true
|
||||
* - Reset value of flag 'i' to false
|
||||
* - Check if flag 'i' value is false
|
||||
*
|
||||
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
|
||||
* otherwise.
|
||||
*/
|
||||
int test_nvgpu_set_enabled(struct unit_module *m, struct gk20a *g, void *args);
|
||||
|
||||
/**
|
||||
* Test specification for: test_nvgpu_free_enabled_flags
|
||||
*
|
||||
* Description: Free enabled_flags
|
||||
*
|
||||
* Test Type: Other (cleanup)
|
||||
*
|
||||
* Input: test_nvgpu_init_enabled_flags
|
||||
*
|
||||
* Steps:
|
||||
* - Free enabled_flag memory
|
||||
* - Free enabled_flags allocated for this unit test
|
||||
* - Restore originally created enabled_flags pointer
|
||||
*
|
||||
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
|
||||
* otherwise.
|
||||
*/
|
||||
int test_nvgpu_free_enabled_flags(struct unit_module *m,
|
||||
struct gk20a *g, void *args);
|
||||
Reference in New Issue
Block a user