[igt-dev] [PATCH i-g-t 3/5] xe/xe_sysfs: Removing non privileged user test
Upadhyay, Tejas
tejas.upadhyay at intel.com
Thu Aug 3 07:30:24 UTC 2023
> -----Original Message-----
> From: Dandamudi, Priyanka <priyanka.dandamudi at intel.com>
> Sent: Thursday, August 3, 2023 11:38 AM
> To: Kumar, Janga Rahul <janga.rahul.kumar at intel.com>; igt-
> dev at lists.freedesktop.org; Upadhyay, Tejas <tejas.upadhyay at intel.com>;
> Dandamudi, Priyanka <priyanka.dandamudi at intel.com>
> Subject: [PATCH i-g-t 3/5] xe/xe_sysfs: Removing non privileged user test
>
> From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
>
> Removing non privileged user test case as sysman property, min/max works
> only for privileged user.
> Modified documentation.
>
> Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> Cc: Tejas Upadhyay <tejas.upadhyay at intel.com>
> Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
> tests/xe/xe_sysfs_defaults.c | 6 ++-- tests/xe/xe_sysfs_scheduler.c | 56 ++-
> --------------------------------
> 2 files changed, 6 insertions(+), 56 deletions(-)
>
> diff --git a/tests/xe/xe_sysfs_defaults.c b/tests/xe/xe_sysfs_defaults.c index
> ff958161b..0fc2918b6 100644
> --- a/tests/xe/xe_sysfs_defaults.c
> +++ b/tests/xe/xe_sysfs_defaults.c
> @@ -6,10 +6,10 @@
> /**
> * TEST: xe sysfs defaults
> * Category: Infrastructure
> - * Functionality: driver handler
> + * Functionality: sysman defaults
> * Run type: FULL
> - * Sub-category: xe
> - * Test category: SysMan
> + * Sub-category: sysman
> + * Test category: functionality test
> * SUBTEST: engine-defaults
> */
>
> diff --git a/tests/xe/xe_sysfs_scheduler.c b/tests/xe/xe_sysfs_scheduler.c
> index f199d6be8..0f6fe5b65 100644
> --- a/tests/xe/xe_sysfs_scheduler.c
> +++ b/tests/xe/xe_sysfs_scheduler.c
> @@ -5,6 +5,9 @@
>
> /**
> * TEST: xe sysfs scheduler
> + * Sub-category: sysman
> + * Functionality: scheduler control interface
> + * Test category: functionality test
> * Run type: FULL
> *
> * SUBTEST: %s-invalid
> @@ -105,58 +108,6 @@ static void test_min_max(int xe, int engine, const
> char **property)
> igt_sysfs_printf(engine, property[2], "%d", default_max); }
>
> -static void test_param_nonpriv(int xe, int engine, const char **property) -{
> - unsigned int default_max, max;
> - unsigned int default_min, min;
> - unsigned int set;
> - struct stat st;
> - int defaults;
> -
> - fstat(engine, &st);
> - fchmod(engine, (st.st_mode | S_IROTH | S_IWOTH));
> -
> - defaults = openat(engine, ".defaults", O_DIRECTORY);
> - igt_require(defaults != -1);
> -
> - igt_sysfs_scanf(defaults, property[2], "%u", &default_max);
> - igt_sysfs_scanf(defaults, property[1], "%u", &default_min);
> -
> - igt_sysfs_printf(engine, property[2], "%d", default_max-10);
> - igt_sysfs_scanf(engine, property[2], "%u", &max);
> - igt_assert_eq(max, (default_max-10));
> -
> - igt_sysfs_printf(engine, property[1], "%d", default_min+1);
> - igt_sysfs_scanf(engine, property[1], "%u", &min);
> - igt_assert_eq(min, (default_min+1));
> -
> - igt_fork(child, 1) {
> - igt_drop_root();
> - igt_sysfs_printf(engine, property[0], "%d", default_min);
> - igt_sysfs_scanf(engine, property[0], "%u", &set);
> - igt_assert_neq(set, default_min);
> -
> - igt_sysfs_printf(engine, property[0], "%d", min);
> - igt_sysfs_scanf(engine, property[0], "%u", &set);
> - igt_assert_eq(set, min);
> -
> - igt_sysfs_printf(engine, property[0], "%d", default_max);
> - igt_sysfs_scanf(engine, property[0], "%u", &set);
> - igt_assert_neq(set, default_max);
> -
> - igt_sysfs_printf(engine, property[0], "%d", max);
> - igt_sysfs_scanf(engine, property[0], "%u", &set);
> - igt_assert_eq(set, max);
> - }
> - igt_waitchildren();
> -
> - fchmod(engine, st.st_mode);
> -
> - /* Reset max, min to original values */
> - igt_sysfs_printf(engine, property[1], "%d", default_min);
> - igt_sysfs_printf(engine, property[2], "%d", default_max);
> -}
> -
> igt_main
> {
> static const struct {
> @@ -165,7 +116,6 @@ igt_main
> } tests[] = {
> { "invalid", test_invalid },
> { "min-max", test_min_max },
> - { "nonprivileged-user", test_param_nonpriv },
> { }
> };
>
> --
> 2.25.1
More information about the igt-dev
mailing list