mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: unit: ptimer: add case for uncovered lines
This adds a test for one case in scale_ptimer() that wasn't previously covered by the test. NVGPU-4818 Change-Id: Ifdf92b68a921d288701b2a9ecd45e07f96e229d8 Signed-off-by: Philip Elcan <pelcan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2274670 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: Sagar Kamble <skamble@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@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
1c991a58af
commit
cbf5b0c75b
@@ -284,6 +284,12 @@ int test_ptimer_scaling(struct unit_module *m,
|
||||
ret = UNIT_FAIL;
|
||||
}
|
||||
|
||||
val = scale_ptimer(10, 6);
|
||||
if (val != 17) {
|
||||
unit_err(m, "ptimer scale calculation incorrect\n");
|
||||
ret = UNIT_FAIL;
|
||||
}
|
||||
|
||||
val = ptimer_scalingfactor10x(100);
|
||||
if (val != (PTIMER_REF_FREQ_HZ*10/100)) {
|
||||
unit_err(m, "ptimer scale calculation incorrect\n");
|
||||
|
||||
Reference in New Issue
Block a user