tests/drv_getparams: Skip instead of fail on EINVAL

Avoid failing on older kernels where the GETPARAM interfaces
don't exist.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89669
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
This commit is contained in:
Jeff McGee 2015-03-24 11:30:57 -07:00 committed by Daniel Vetter
parent 9ba93c43cf
commit 301b9e4bb3

View File

@ -77,6 +77,7 @@ subslice_total(void)
int ret; int ret;
ret = getparam(LOCAL_I915_PARAM_SUBSLICE_TOTAL, (int*)&subslice_total); ret = getparam(LOCAL_I915_PARAM_SUBSLICE_TOTAL, (int*)&subslice_total);
igt_skip_on_f(ret == -EINVAL, "Interface not supported by kernel\n");
if (ret) { if (ret) {
/* /*
@ -93,9 +94,7 @@ subslice_total(void)
* fail them if we are here. * fail them if we are here.
*/ */
} else { } else {
igt_assert_neq(ret, EINVAL); /* request not recognized? */ igt_assert_eq(ret, 0);
igt_assert_neq(ret, ENODEV); /* device not supported? */
igt_assert_eq(ret, 0); /* other error? */
} }
} else { } else {
/* /*
@ -115,6 +114,7 @@ eu_total(void)
int ret; int ret;
ret = getparam(LOCAL_I915_PARAM_EU_TOTAL, (int*)&eu_total); ret = getparam(LOCAL_I915_PARAM_EU_TOTAL, (int*)&eu_total);
igt_skip_on_f(ret == -EINVAL, "Interface not supported by kernel\n");
if (ret) { if (ret) {
/* /*
@ -131,9 +131,7 @@ eu_total(void)
* fail them if we are here. * fail them if we are here.
*/ */
} else { } else {
igt_assert_neq(ret, EINVAL); /* request not recognized? */ igt_assert_eq(ret, 0);
igt_assert_neq(ret, ENODEV); /* device not supported? */
igt_assert_eq(ret, 0); /* other error? */
} }
} else { } else {
/* /*