[igt-dev] [PATCH i-g-t 2/2] test/perf_pmu: Change module unload assertion
Petri Latvala
petri.latvala at intel.com
Fri Feb 18 10:49:36 UTC 2022
On Thu, Feb 17, 2022 at 09:14:34PM +0530, Anshuman Gupta wrote:
> Update the module unload assertion values according to
> to returned values from igt_i915_driver_unload() and
> __igt_i915_driver_unload() instead of IGT process exit
> values.
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
> ---
> tests/i915/perf_pmu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/i915/perf_pmu.c b/tests/i915/perf_pmu.c
> index 4f3cb6145..a8ea914ca 100644
> --- a/tests/i915/perf_pmu.c
> +++ b/tests/i915/perf_pmu.c
> @@ -2101,7 +2101,7 @@ static void test_unload(unsigned int num_engines)
>
> igt_debug("Read %d events from perf and trial unload\n", count);
> pmu_read_multi(fd[0], count, buf);
> - igt_assert_eq(__igt_i915_driver_unload(NULL), IGT_EXIT_SKIP);
> + igt_assert(__igt_i915_driver_unload(NULL) != 0);
igt_assert_neq(__igt_i915_driver_unload(NULL), 0)
--
Petri Latvala
> pmu_read_multi(fd[0], count, buf);
>
> igt_debug("Close perf\n");
> @@ -2114,7 +2114,7 @@ static void test_unload(unsigned int num_engines)
> igt_waitchildren();
>
> igt_debug("Final unload\n");
> - igt_assert_eq(__igt_i915_driver_unload(NULL), IGT_EXIT_SUCCESS);
> + igt_assert_eq(__igt_i915_driver_unload(NULL), 0);
> }
>
> #define test_each_engine(T, i915, ctx, e) \
> @@ -2394,7 +2394,7 @@ igt_main
> }
>
> igt_subtest("module-unload") {
> - igt_require(igt_i915_driver_unload() == IGT_EXIT_SUCCESS);
> + igt_require(igt_i915_driver_unload() == 0);
> for (int pass = 0; pass < 3; pass++)
> test_unload(num_engines);
> }
> --
> 2.26.2
>
More information about the igt-dev
mailing list