[PATCH i-g-t] tests/intel/xe_sysfs_defaults: Validate for all default values
Dandamudi, Priyanka
priyanka.dandamudi at intel.com
Wed Apr 3 05:14:13 UTC 2024
> -----Original Message-----
> From: Goyal, Nakshtra <nakshtra.goyal at intel.com>
> Sent: Wednesday, April 3, 2024 9:55 AM
> To: igt-dev at lists.freedesktop.org; Gandi, Ramadevi
> <ramadevi.gandi at intel.com>
> Cc: Kumar, Janga Rahul <janga.rahul.kumar at intel.com>; Ghimiray, Himal
> Prasad <himal.prasad.ghimiray at intel.com>; Dandamudi, Priyanka
> <priyanka.dandamudi at intel.com>
> Subject: [PATCH i-g-t] tests/intel/xe_sysfs_defaults: Validate for all default
> values
>
> From: nakshtra goyal <nakshtra.goyal at intel.com>
>
> Change in igt_assert_f function parameters so that it also validate for
> property value equals to 0.
>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> Cc: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
> Signed-off-by: nakshtra goyal <nakshtra.goyal at intel.com>
> ---
> tests/intel/xe_sysfs_defaults.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/intel/xe_sysfs_defaults.c b/tests/intel/xe_sysfs_defaults.c
> index 4a6b3ba6d..a0014a832 100644
> --- a/tests/intel/xe_sysfs_defaults.c
> +++ b/tests/intel/xe_sysfs_defaults.c
> @@ -42,8 +42,8 @@ static void test_defaults(int xe, int engine, const char
> **property)
>
> igt_debug("Checking attr '%s'\n", de->d_name);
>
> - igt_assert_f(property_value = igt_sysfs_get_u64(defaults, de-
> >d_name),
> - "Default value %s is not present!\n", de->d_name);
> + property_value = igt_sysfs_get_u64(defaults, de->d_name);
> + igt_assert_f(property_value >= 0, "Default value %s is not
> +present!\n", de->d_name);
>
> igt_debug("Default property:%s, value:%d\n", de->d_name,
> property_value);
>
LGTM
Reviewed-by: Priyanka Dandamudi <Priyanka.dandamudi at intel.com>
> --
> 2.34.1
More information about the igt-dev
mailing list