Bug 103107

Summary: [CI] igt@gem_ctx_param@invalid-param-[get|set] - Failed assertion: __gem_context_get_param(fd, &arg) == -22
Product: DRI Reporter: Marta Löfstedt <marta.lofstedt>
Component: IGTAssignee: Kimmo Nikkanen <knikkane>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: low CC: intel-gfx-bugs
Version: DRI git   
Hardware: Other   
OS: All   
Whiteboard: ReadyForDev
i915 platform: BXT, HSW, KBL, SNB i915 features: GEM/Other

Description Marta Löfstedt 2017-10-05 06:41:57 UTC
starting at CI_DRM_3177 on all shards:

igt@gem_ctx_param@invalid-param-get
(gem_ctx_param:1459) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:147:
(gem_ctx_param:1459) CRITICAL: Failed assertion: __gem_context_get_param(fd, &arg) == -22
(gem_ctx_param:1459) CRITICAL: error: 0 != -22
Subtest invalid-param-get failed.
	
igt@gem_ctx_param@invalid-param-set
(gem_ctx_param:1533) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:152:
(gem_ctx_param:1533) CRITICAL: Failed assertion: __gem_context_set_param(fd, &arg) == -22
(gem_ctx_param:1533) CRITICAL: Last errno: 19, No such device
(gem_ctx_param:1533) CRITICAL: error: -19 != -22
Subtest invalid-param-set failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3177/shard-hsw2/igt@gem_ctx_param@invalid-param-get.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3177/shard-snb2/igt@gem_ctx_param@invalid-param-get.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3175/shard-apl4/igt@gem_ctx_param@invalid-param-get.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3175/shard-kbl2/igt@gem_ctx_param@invalid-param-get.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3177/shard-kbl2/igt@gem_ctx_param@invalid-param-get.html
Comment 1 Marta Löfstedt 2017-10-05 08:29:16 UTC
(In reply to Marta Löfstedt from comment #0)
> starting at CI_DRM_3177 on all shards:
> 
That is wrong this started at CI_DRM_3175
Comment 2 Chris Wilson 2017-10-05 08:48:26 UTC
Just your regular invalid negative test.
Comment 3 Marta Löfstedt 2017-10-18 11:31:35 UTC
Also, GLK-shards

(gem_ctx_param:1501) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:152:
(gem_ctx_param:1501) CRITICAL: Failed assertion: __gem_context_set_param(fd, &arg) == -22
(gem_ctx_param:1501) CRITICAL: error: 0 != -22
Subtest invalid-param-set failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3255/shard-glkb5/igt@gem_ctx_param@invalid-param-set.html

(gem_ctx_param:1476) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:147:
(gem_ctx_param:1476) CRITICAL: Failed assertion: __gem_context_get_param(fd, &arg) == -22
(gem_ctx_param:1476) CRITICAL: error: 0 != -22
Subtest invalid-param-get failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3255/shard-glkb3/igt@gem_ctx_param@invalid-param-get.html
Comment 4 Daniel Vetter 2017-11-08 09:04:41 UTC
(In reply to Chris Wilson from comment #2)
> Just your regular invalid negative test.

Also just your regular lack of invalid tests for the new flag.

Either way, pls fix this somehow. If you really insist the invalid tests aren't useful at all, then remove them.
Comment 5 Hector Velazquez 2017-11-17 20:57:04 UTC
This tests has the same failure on GLK QA

igt@gem_ctx_param@invalid-param-get
igt@gem_ctx_param@invalid-param-set

IGT-Version: 1.20-g88d6550 (x86_64) (Linux: 4.14.0-drm-tip-ww46-commit-1fc4fe8+ x86_64)
fastfeedback-nov-ww46-thursday-07-03-33-code-179785857
Comment 6 Jani Saarinen 2017-11-21 10:44:07 UTC
Reference: https://patchwork.freedesktop.org/series/33408/
Comment 7 Hector Velazquez 2017-11-29 20:12:22 UTC
This tests continue failing on CFL QA

igt@gem_ctx_param@invalid-param-get
igt@gem_ctx_param@invalid-param-set

IGT-Version: 1.20-g4c57ff4 (x86_64) (Linux: 4.14.0-drm-tip-ww47-commit-f710441+ x86_64)

Component: drm
    tag: libdrm-2.4.81-108-g0ab36da
    commit: 0ab36dafaf818c35a258dac0c75b779ab2ae792b

Component: cairo
    tag: 1.15.6-88-g84fc0ce
    commit: 84fc0ce91d1a57d20500f710abc0e17de82c67df

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-541-g5b3619f
    commit: 5b3619f3751ecef55fa993984ddb59a458fcebed

Component: piglit
    tag: piglit-v1
    commit: cb562a383229074b44db6998b85572d2abe7c363
Comment 8 Armando Antonio 2017-11-30 16:41:54 UTC
The following tests are failing on CNL too.

igt@gem_ctx_param@invalid-param-get
igt@gem_ctx_param@invalid-param-set

Configuration:
intel-gpu-tools (tag)       : intel-gpu-tools-1.20-169-gac6739b
kernel version              : 4.15.0-rc1-drm-intel-qa-ww48-commit-6d6c48b+
Comment 9 Octavio 2017-12-21 21:18:30 UTC
The following tests are failing on BXT 

igt@gem_ctx_param@invalid-param-get
igt@gem_ctx_param@invalid-param-set

using
IGT-Version: 1.20-gbeb26d8 (x86_64) (Linux: 4.15.0-rc4-drm-intel-qa-ww51-commit-b480e79+ x86_64)
Comment 10 Marta Löfstedt 2018-01-11 11:26:54 UTC
I believe this issue started when the I915_CONTEXT_PARAM_PRIORITY was added.

commit ac14fbd460d0ec16e7750e40dcd8199b0ff83d0a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 3 21:34:53 2017 +0100

    drm/i915/scheduler: Support user-defined priorities

so instead of hitting default case with -EINVAL return, in i915_gem_context_getparam_ioctl,  I915_CONTEXT_PARAM_BANNABLE + 1 gives us I915_CONTEXT_PARAM_PRIORITY.

So, we could just change I915_CONTEXT_PARAM_BANNABLE + 1 to I915_CONTEXT_PARAM_PRIORITY + 1, but there is a comment in the testcase:

/* NOTE: This testcase intentionally tests for the next free parameter
 * to catch ABI extensions. Don't "fix" this testcase without adding all
 * the tests for the new param first.
 */

As strict interpretation of this gives that subtest for the missing I915_CONTEXT_PARAM_GTT_SIZE, I915_CONTEXT_PARAM_NO_ERROR_CAPTURE, I915_CONTEXT_PARAM_BANNABLE and I915_CONTEXT_PARAM_PRIORITY, needs to be added before changing this test. I.e. this testcase fails because there are niot testcases for all context params.
Comment 11 Marta Löfstedt 2018-01-11 11:38:59 UTC
https://patchwork.freedesktop.org/patch/197018/
Comment 12 Ricardo Perez 2018-01-29 18:46:04 UTC
This tests continue failing on CFL QA

igt@gem_ctx_param@invalid-param-get
igt@gem_ctx_param@invalid-param-set

IGT-Version: 1.21-g37bd27f (x86_64) (Linux: 4.15.0-rc9-drm-intel-qa-ww4-commit-59275f1+ x86_64)
------------------------------------------------------------------------------
for igt@gem_ctx_param@invalid-param-get

**** DEBUG ****
(gem_ctx_param:8293) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:147:
(gem_ctx_param:8293) CRITICAL: Failed assertion: __gem_context_get_param(fd, &arg) == -22
(gem_ctx_param:8293) CRITICAL: error: 0 != -22
(gem_ctx_param:8293) igt-core-INFO: Stack trace:
(gem_ctx_param:8293) igt-core-INFO:   #0 [__igt_fail_assert+0x101]
(gem_ctx_param:8293) igt-core-INFO:   #1 [__real_main31+0x7fd]
(gem_ctx_param:8293) igt-core-INFO:   #2 [main+0x27]
(gem_ctx_param:8293) igt-core-INFO:   #3 [__libc_start_main+0xf1]
(gem_ctx_param:8293) igt-core-INFO:   #4 [_start+0x2a]
(gem_ctx_param:8293) igt-core-INFO:   #5 [<unknown>+0x2a]
****  END  ****

------------------------------------------------------------------------------

For igt@gem_ctx_param@invalid-param-set

**** DEBUG ****
(gem_ctx_param:8296) CRITICAL: Test assertion failure function __real_main31, file gem_ctx_param.c:152:
(gem_ctx_param:8296) CRITICAL: Failed assertion: __gem_context_set_param(fd, &arg) == -22
(gem_ctx_param:8296) CRITICAL: error: 0 != -22
(gem_ctx_param:8296) igt-core-INFO: Stack trace:
(gem_ctx_param:8296) igt-core-INFO:   #0 [__igt_fail_assert+0x101]
(gem_ctx_param:8296) igt-core-INFO:   #1 [__real_main31+0x71e]
(gem_ctx_param:8296) igt-core-INFO:   #2 [<unknown>+0x71e]
****  END  ****
Comment 13 Chris Wilson 2018-02-18 08:30:31 UTC
commit bf777c92448d51010aba51d1f1b657b0fdc673a6 (upstream/master, origin/master, origin/HEAD)
Author: Antonio Argenziano <antonio.argenziano@intel.com>
Date:   Wed Jan 24 17:00:02 2018 -0800

    tests/gem_ctx_param: Update invalid param
Comment 14 Marta Löfstedt 2018-02-19 07:55:16 UTC
Fix integrated to IGT_4264 I will archive bug from cibuglog perspective, but I can't close since QA has filed issues on it.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.