[Intel-gfx] [PATCH i-g-t v3 16/19] tests/core_hotunplug: Explicitly ignore unused return values

2020-08-20 Thread Janusz Krzysztofik
Some return values are not useful and can be ignored. Wrap those cases inside igt_ignore_warn(), not only to make sure compilers are happy but also to clearly document our decisions. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 6 +++--- 1 file

[Intel-gfx] [PATCH i-g-t v3 07/19] tests/core_hotunplug: Pass errors via a data structure field

2020-08-20 Thread Janusz Krzysztofik
A pointer to fatal error messages can be passed around via hotunplug structure, no need to declare it as global. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 96 +- 1 file changed, 47

[Intel-gfx] [PATCH i-g-t v3 12/19] tests/core_hotunplug: Fail subtests on device close errors

2020-08-20 Thread Janusz Krzysztofik
Since health checks are now run from follow-up fixture sections, it is safe to fail subtests without the need to abort the test execution. Do that on device close errors instead of just emitting warnings. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests

[Intel-gfx] [PATCH i-g-t v3 13/19] tests/core_hotunplug: Let the driver time out essential sysfs operations

2020-08-20 Thread Janusz Krzysztofik
btest. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index e048f3a15..572c66474 100644 --- a/tests/core_hotunplug.c +++ b/

[Intel-gfx] [PATCH i-g-t v3 17/19] tests/core_hotunplug: More thorough i915 healthcheck and recovery

2020-08-20 Thread Janusz Krzysztofik
he current IGT test section on GPU hang so we are still able to perform the reset and retry. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 88 ++ 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/tests/core_hotunplug

[Intel-gfx] [PATCH i-g-t v3 19/19] tests/core_hotunplug: Un-blocklist *bind* subtests

2020-08-20 Thread Janusz Krzysztofik
Subtests which don't remove the device, only unbind the driver from it, seem relatively safe and harmless for CI. Remove them from the CI blocklist. Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/blacklist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [Intel-gfx] [PATCH i-g-t v3 00/19] tests/core_hotunplug: Fixes and enhancements

2020-08-21 Thread Janusz Krzysztofik
On Thu, 2020-08-20 at 16:51 +0200, Janusz Krzysztofik wrote: > Clean up the test code, add some new basic subtests, then unblock > unbind test variants. Hi, CI results show that i915 recovery after a failed healthcheck still needs some work, so please hold on with your reviews. I'

[Intel-gfx] [PATCH i-g-t v4 00/20] tests/core_hotunplug: Fixes and enhancements

2020-08-21 Thread Janusz Krzysztofik
positive, please give me your green light for merging this series if you have no objections. Thanks, Janusz Janusz Krzysztofik (20): tests/core_hotunplug: Use igt_assert_fd() tests/core_hotunplug: Constify dev_bus_addr string tests/core_hotunplug: Clean up device open error handling tests/co

[Intel-gfx] [PATCH i-g-t v4 02/20] tests/core_hotunplug: Constify dev_bus_addr string

2020-08-21 Thread Janusz Krzysztofik
Device bus address structure field is always initialized with a pointer to a substring of the device sysfs path and never used for its modification. Declare it as a constant string. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file

[Intel-gfx] [PATCH i-g-t v4 07/20] tests/core_hotunplug: Pass errors via a data structure field

2020-08-21 Thread Janusz Krzysztofik
A pointer to fatal error messages can be passed around via hotunplug structure, no need to declare it as global. v2: Rebase only. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 96 +- 1 file

[Intel-gfx] [PATCH i-g-t v4 06/20] tests/core_hotunplug: Maintain a single data structure instance

2020-08-21 Thread Janusz Krzysztofik
possible, maintain a single instance of hotunplug structure at igt_main level and pass it down to subtests. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 56 -- 1 file changed, 26 insertions(+), 30 deletions

[Intel-gfx] [PATCH i-g-t v4 04/20] tests/core_hotunplug: Consolidate duplicated debug messages

2020-08-21 Thread Janusz Krzysztofik
bodies. v2: Rebase only. v3: Refresh and extend over new case (local_drm_open_driver), - allow callers to specify a message suffix as well where applicable. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 39

[Intel-gfx] [PATCH i-g-t v4 05/20] tests/core_hotunplug: Assert successful device filter application

2020-08-21 Thread Janusz Krzysztofik
Return value of igt_device_filter_add() representing a number of successfully installed device filters is now ignored. Fail if not 1. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Intel-gfx] [PATCH i-g-t v4 11/20] tests/core_hotunplug: Recover from subtest failures

2020-08-21 Thread Janusz Krzysztofik
adequate abort reason reporting but clean the mark only on health check success, - call cleanup() also from post_healthcheck() in order to close a device file descriptor potentially left open by a failed health check, - reword commit message and update description. Signed-off-by:

[Intel-gfx] [PATCH i-g-t v4 14/20] tests/core_hotunplug: Process return values of sysfs operations

2020-08-21 Thread Janusz Krzysztofik
Return values of driver bind/unbind / device remove/recover sysfs operations are now ignored. Assert their correctness. v2: Add trailing newlines missing from igt_assert messages. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14

[Intel-gfx] [PATCH i-g-t v4 01/20] tests/core_hotunplug: Use igt_assert_fd()

2020-08-21 Thread Janusz Krzysztofik
There is a new library helper that asserts validity of open file descriptors. Use it instead of open coding. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t v4 13/20] tests/core_hotunplug: Let the driver time out essential sysfs operations

2020-08-21 Thread Janusz Krzysztofik
btest. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index e048f3a15..572c66474 100644 --- a/tests/core_hotunplug.c +++ b/

[Intel-gfx] [PATCH i-g-t v4 16/20] tests/core_hotunplug: Explicitly ignore unused return values

2020-08-21 Thread Janusz Krzysztofik
Some return values are not useful and can be ignored. Wrap those cases inside igt_ignore_warn(), not only to make sure compilers are happy but also to clearly document our decisions. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 6 +++--- 1 file

[Intel-gfx] [PATCH i-g-t v4 03/20] tests/core_hotunplug: Clean up device open error handling

2020-08-21 Thread Janusz Krzysztofik
re section. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index a4071f51e..e576a6c6c 100644 --- a/tests/core_hotunplug.c +

[Intel-gfx] [PATCH i-g-t v4 12/20] tests/core_hotunplug: Fail subtests on device close errors

2020-08-21 Thread Janusz Krzysztofik
Since health checks are now run from follow-up fixture sections, it is safe to fail subtests without the need to abort the test execution. Do that on device close errors instead of just emitting warnings. v2: Rebase only. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał

[Intel-gfx] [PATCH i-g-t v4 17/20] tests/core_hotunplug: More thorough i915 healthcheck and recovery

2020-08-21 Thread Janusz Krzysztofik
sibly left running by a failed health check attempt. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 97 ++ 1 file changed, 89 insertions(+), 8 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 24beed81a..13e7aa46f 10

[Intel-gfx] [PATCH i-g-t v4 09/20] tests/core_hotunplug: Prepare invariant data once per test run

2020-08-21 Thread Janusz Krzysztofik
Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 85 +++--- 1 file changed, 31 insertions(+), 54 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c

[Intel-gfx] [PATCH i-g-t v4 15/20] tests/core_hotunplug: Assert expected device presence/absence

2020-08-21 Thread Janusz Krzysztofik
Don't rely on successful write to sysfs control files, assert existence / non-existence of a respective device sysfs node as well. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14 ++ 1 file changed, 14 insertions(+) diff --

[Intel-gfx] [PATCH i-g-t v4 08/20] tests/core_hotunplug: Handle device close errors

2020-08-21 Thread Janusz Krzysztofik
post_healthcheck function name. v3: Don't fail on close error after successful health check, warn only, - move duplicated messages to helpers. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 64 +- 1 file change

[Intel-gfx] [PATCH i-g-t v4 18/20] tests/core_hotunplug: Add 'lateclose before restore' variants

2020-08-21 Thread Janusz Krzysztofik
: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v2 --- tests/core_hotunplug.c | 114 +++-- 1 file changed, 109 insertions(+), 5 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 13e7aa46f..f919fa6de 100644 --- a/tests

[Intel-gfx] [PATCH i-g-t v4 10/20] tests/core_hotunplug: Skip selectively on sysfs close errors

2020-08-21 Thread Janusz Krzysztofik
Since we no longer open a device DRM sysfs node, only a PCI one, driver unbind operations are no longer affected by missed or unsuccessful sysfs file close attempts. Skip only affected subtests if that happens. v2: Rebase only. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał

[Intel-gfx] [PATCH i-g-t v4 19/20] tests/core_hotunplug: Duplicate debug messages in dmesg

2020-08-21 Thread Janusz Krzysztofik
The purpose of debug messages displayed by the test is to make identification of a subtest phase that fails more easy. Since issues exhibited by the test are mostly reported to dmesg, print those debug messages to /dev/kmsg as well. v2: Rebase on upstream. v3: Refresh. Signed-off-by: Janusz

[Intel-gfx] [PATCH i-g-t v4 20/20] tests/core_hotunplug: Un-blocklist *bind* subtests

2020-08-21 Thread Janusz Krzysztofik
Subtests which don't remove the device, only unbind the driver from it, seem relatively safe and harmless for CI. Remove them from the CI blocklist. Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/blacklist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests/core_hotunplug: Fixes and enhancements (rev4)

2020-08-24 Thread Janusz Krzysztofik
On Fri, 2020-08-21 at 17:40 +, Patchwork wrote: > Patch Details > Series: tests/core_hotunplug: Fixes and enhancements (rev4) > URL: https://patchwork.freedesktop.org/series/79671/ > State:failure > Details: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4901/index.html > CI

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests/core_hotunplug: Fixes and enhancements (rev4)

2020-08-24 Thread Janusz Krzysztofik
Hi Petri, On Mon, 2020-08-24 at 12:26 +0300, Petri Latvala wrote: > On Mon, Aug 24, 2020 at 10:42:10AM +0200, Janusz Krzysztofik wrote: > > On Fri, 2020-08-21 at 17:40 +, Patchwork wrote: > > > Patch Details > > > Series: tests/core_hotunplug: Fixes and en

[Intel-gfx] [PATCH i-g-t v5 02/21] tests/core_hotunplug: Constify dev_bus_addr string

2020-08-28 Thread Janusz Krzysztofik
Device bus address structure field is always initialized with a pointer to a substring of the device sysfs path and never used for its modification. Declare it as a constant string. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file

[Intel-gfx] [PATCH i-g-t v5 08/21] tests/core_hotunplug: Handle device close errors

2020-08-28 Thread Janusz Krzysztofik
post_healthcheck function name. v3: Don't fail on close error after successful health check, warn only, - move duplicated messages to helpers. v4: On start of each subtest assert device file descriptors closed cleanly. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 ---

[Intel-gfx] [PATCH i-g-t v5 01/21] tests/core_hotunplug: Use igt_assert_fd()

2020-08-28 Thread Janusz Krzysztofik
There is a new library helper that asserts validity of open file descriptors. Use it instead of open coding. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t v5 05/21] tests/core_hotunplug: Assert successful device filter application

2020-08-28 Thread Janusz Krzysztofik
Return value of igt_device_filter_add() representing a number of successfully installed device filters is now ignored. Fail if not 1. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Intel-gfx] [PATCH i-g-t v5 04/21] tests/core_hotunplug: Consolidate duplicated debug messages

2020-08-28 Thread Janusz Krzysztofik
bodies. v2: Rebase only. v3: Refresh and extend over new case (local_drm_open_driver), - allow callers to specify a message suffix as well where applicable. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 39

[Intel-gfx] [PATCH i-g-t v5 06/21] tests/core_hotunplug: Maintain a single data structure instance

2020-08-28 Thread Janusz Krzysztofik
instead of aborting. For that to be possible, maintain a single instance of hotunplug structure at igt_main level and pass it down to subtests. v2: Commit description refreshed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 56

[Intel-gfx] [PATCH i-g-t v5 14/21] tests/core_hotunplug: Process return values of sysfs operations

2020-08-28 Thread Janusz Krzysztofik
Return values of driver bind/unbind / device remove/recover sysfs operations are now ignored. Assert their correctness. v2: Add trailing newlines missing from igt_assert messages. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14

[Intel-gfx] [PATCH i-g-t v5 00/21] tests/core_hotunplug: Fixes and enhancements

2020-08-28 Thread Janusz Krzysztofik
licable. Please have a look and confirm if you are still OK with them. @Tvrtko: As I already asked before, please support my attempt to remove the unbind test variants from the blocklist. @Petri, @Martin: Assuming CI results will be as good as those obtained on Trybot, please give me your gre

[Intel-gfx] [PATCH i-g-t v5 12/21] tests/core_hotunplug: Fail subtests on device close errors

2020-08-28 Thread Janusz Krzysztofik
Since health checks are now run from follow-up fixture sections, it is safe to fail subtests without the need to abort the test execution. Do that on device close errors instead of just emitting warnings. v2: Rebase only. v3: Refresh. v4: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by

[Intel-gfx] [PATCH i-g-t v5 07/21] tests/core_hotunplug: Pass errors via a data structure field

2020-08-28 Thread Janusz Krzysztofik
A pointer to fatal error messages can be passed around via hotunplug structure, no need to declare it as global. v2: Rebase only. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 96 +- 1 file

[Intel-gfx] [PATCH i-g-t v5 15/21] tests/core_hotunplug: Assert expected device presence/absence

2020-08-28 Thread Janusz Krzysztofik
Don't rely on successful write to sysfs control files, assert existence / non-existence of a respective device sysfs node as well. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14 ++ 1 file changed, 14 insertions(+) diff --

[Intel-gfx] [PATCH i-g-t v5 03/21] tests/core_hotunplug: Clean up device open error handling

2020-08-28 Thread Janusz Krzysztofik
re section. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index a4071f51e..e576a6c6c 100644 --- a/tests/core_hotunplug.c +

[Intel-gfx] [PATCH i-g-t v5 21/21] tests/core_hotunplug: Un-blocklist *bind* subtests

2020-08-28 Thread Janusz Krzysztofik
Subtests which don't remove the device, only unbind the driver from it, seem relatively safe and harmless for CI. Remove them from the CI blocklist. Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/blacklist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v5 10/21] tests/core_hotunplug: Skip selectively on sysfs close errors

2020-08-28 Thread Janusz Krzysztofik
Since we no longer open a device DRM sysfs node, only a PCI one, driver unbind operations are no longer affected by missed or unsuccessful sysfs file close attempts. Skip only affected subtests if that happens. v2: Rebase only. v3: Refresh. v4: Refresh. Signed-off-by: Janusz Krzysztofik

[Intel-gfx] [PATCH i-g-t v5 17/21] tests/core_hotunplug: More thorough i915 healthcheck and recovery

2020-08-28 Thread Janusz Krzysztofik
ice before recovery, - drop caches on i915 health check completion. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 114 + 1 file changed, 104 insertions(+), 10 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index

[Intel-gfx] [PATCH i-g-t v5 11/21] tests/core_hotunplug: Recover from subtest failures

2020-08-28 Thread Janusz Krzysztofik
their results should always matter. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 100 ++--- 1 file changed, 74 insertions(+), 26 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_ho

[Intel-gfx] [PATCH i-g-t v5 09/21] tests/core_hotunplug: Prepare invariant data once per test run

2020-08-28 Thread Janusz Krzysztofik
sh. v4: Still assert a device dile descriptor closed cleanly on subtest start, a device sysfs file descriptor still before open. Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 85

[Intel-gfx] [PATCH i-g-t v5 18/21] tests/core_hotunplug: Add 'lateclose before restore' variants

2020-08-28 Thread Janusz Krzysztofik
devices also before late close, - in order to be able to safely run a health check while still keeping an unbound / unplugged device instance open, also preserve the open device fd, not only a close error, - adjust subtest descriptions. Signed-off-by: Janusz Krzysztofik Reviewed-by

[Intel-gfx] [PATCH i-g-t v5 13/21] tests/core_hotunplug: Let the driver time out essential sysfs operations

2020-08-28 Thread Janusz Krzysztofik
btest. v2: Refresh, - don't time out on hot driver rebind / hot device restore in *-lateclose variants, those operations haven't been covered by other subtests. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 38 -- 1 f

[Intel-gfx] [PATCH i-g-t v5 20/21] tests/core_hotunplug: HSW audio issue workaround

2020-08-28 Thread Janusz Krzysztofik
display a warning to preserve visibility of the issue. Also tag the workaround with a FIXME comment. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 361d601af.

[Intel-gfx] [PATCH i-g-t v5 19/21] tests/core_hotunplug: Duplicate debug messages in dmesg

2020-08-28 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 305c57a3f..361d601af 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c @@ -52,6

[Intel-gfx] [PATCH i-g-t v5 16/21] tests/core_hotunplug: Explicitly ignore unused return values

2020-08-28 Thread Janusz Krzysztofik
Some return values are not useful and can be ignored. Wrap those cases inside igt_ignore_warn(), not only to make sure compilers are happy but also to clearly document our decisions. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 6 +++--- 1 file

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for tests/core_hotunplug: Fixes and enhancements (rev5)

2020-08-28 Thread Janusz Krzysztofik
On Fri, 2020-08-28 at 11:53 +, Patchwork wrote: > Patch Details > Series: tests/core_hotunplug: Fixes and enhancements (rev5) > URL: https://patchwork.freedesktop.org/series/79671/ > State:failure > Details: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4914/index.html > CI

[Intel-gfx] [PATCH i-g-t v6 00/24] tests/core_hotunplug: Fixes and enhancements

2020-09-11 Thread Janusz Krzysztofik
Tvrtko: As I already asked before, please support my attempt to remove the unbind test variants from the blocklist. @Petri, @Martin: Assuming CI results will be as good as those obtained on Trybot, please give me your green light for merging this series if you have no objections. Thanks, Janusz J

[Intel-gfx] [PATCH i-g-t v6 01/24] tests/core_hotunplug: Use igt_assert_fd()

2020-09-11 Thread Janusz Krzysztofik
There is a new library helper that asserts validity of open file descriptors. Use it instead of open coding. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t v6 07/24] tests/core_hotunplug: Pass errors via a data structure field

2020-09-11 Thread Janusz Krzysztofik
A pointer to fatal error messages can be passed around via hotunplug structure, no need to declare it as global. v2: Rebase only. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 96 +- 1 file

[Intel-gfx] [PATCH i-g-t v6 05/24] tests/core_hotunplug: Assert successful device filter application

2020-09-11 Thread Janusz Krzysztofik
Return value of igt_device_filter_add() representing a number of successfully installed device filters is now ignored. Fail if not 1. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Intel-gfx] [PATCH i-g-t v6 04/24] tests/core_hotunplug: Consolidate duplicated debug messages

2020-09-11 Thread Janusz Krzysztofik
bodies. v2: Rebase only. v3: Refresh and extend over new case (local_drm_open_driver), - allow callers to specify a message suffix as well where applicable. v4: Rename prefix/suffix string arguments to more meaningful when/why. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski

[Intel-gfx] [PATCH i-g-t v6 03/24] tests/core_hotunplug: Clean up device open error handling

2020-09-11 Thread Janusz Krzysztofik
re section. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index a4071f51e..e576a6c6c 100644 --- a/tests/core_hotunplug.c +

[Intel-gfx] [PATCH i-g-t v6 12/24] tests/core_hotunplug: Fail subtests on device close errors

2020-09-11 Thread Janusz Krzysztofik
Since health checks are now run from follow-up fixture sections, it is safe to fail subtests without the need to abort the test execution. Do that on device close errors instead of just emitting warnings. v2: Rebase only. v3: Refresh. v4: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by

[Intel-gfx] [PATCH i-g-t v6 13/24] tests/core_hotunplug: Let the driver time out essential sysfs operations

2020-09-11 Thread Janusz Krzysztofik
btest. v2: Refresh, - don't time out on hot driver rebind / hot device restore in *-lateclose variants, those operations haven't been covered by other subtests. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 38 -- 1 f

[Intel-gfx] [PATCH i-g-t v6 11/24] tests/core_hotunplug: Recover from subtest failures

2020-09-11 Thread Janusz Krzysztofik
es, their results should always matter. v5: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 100 ++--- 1 file changed, 74 insertions(+), 26 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/c

[Intel-gfx] [PATCH i-g-t v6 21/24] tests/core_hotunplug: HSW/BDW audio issue workaround

2020-09-11 Thread Janusz Krzysztofik
d but also display a warning to preserve visibility of the issue. Also tag the workaround with a FIXME comment. v2: Extend the scope of the workaround over Broadwell Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 15 +++ 1 file changed, 15 insertions(+) diff --g

[Intel-gfx] [PATCH i-g-t v6 06/24] tests/core_hotunplug: Maintain a single data structure instance

2020-09-11 Thread Janusz Krzysztofik
instead of aborting. For that to be possible, maintain a single instance of hotunplug structure at igt_main level and pass it down to subtests. v2: Commit description refreshed. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 56

[Intel-gfx] [PATCH i-g-t v6 08/24] tests/core_hotunplug: Handle device close errors

2020-09-11 Thread Janusz Krzysztofik
dirty, - move device close debug messages to helper. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 76 -- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/tests/core_hotunplug.c b/

[Intel-gfx] [PATCH i-g-t v6 15/24] tests/core_hotunplug: Assert expected device presence/absence

2020-09-11 Thread Janusz Krzysztofik
Don't rely on successful write to sysfs control files, assert existence / non-existence of a respective device sysfs node as well. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14 ++ 1 file changed, 14 insertions(+) diff --

[Intel-gfx] [PATCH i-g-t v6 10/24] tests/core_hotunplug: Skip selectively on sysfs close errors

2020-09-11 Thread Janusz Krzysztofik
Since we no longer open a device DRM sysfs node, only a PCI one, driver unbind operations are no longer affected by missed or unsuccessful sysfs file close attempts. Skip only affected subtests if that happens. v2: Rebase only. v3: Refresh. v4: Refresh. Signed-off-by: Janusz Krzysztofik

[Intel-gfx] [PATCH i-g-t v6 20/24] tests/core_hotunplug: Check health both before and after late close

2020-09-11 Thread Janusz Krzysztofik
. For still being able to perform late close while also handling cleanup of potential device close misses in health checks, we need to maintain two separate device file descriptors in our private data structure. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 26

[Intel-gfx] [PATCH i-g-t v6 24/24] tests/core_hotunplug: Add unbind-rebind subtest to BAT scope

2020-09-11 Thread Janusz Krzysztofik
Unbinding and rebinding the driver to a device scenario is a subset of unloading and reloading the module and should give equally correct results. Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/fast-feedback.testlist | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/intel-ci/fast

[Intel-gfx] [PATCH i-g-t v6 09/24] tests/core_hotunplug: Prepare invariant data once per test run

2020-09-11 Thread Janusz Krzysztofik
. v4: Refresh, still assert a device dile descriptor closed cleanly on subtest start, a device sysfs file descriptor still before open. Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v1 --- tests/core_hotunplug.c | 83 +

[Intel-gfx] [PATCH i-g-t v6 02/24] tests/core_hotunplug: Constify dev_bus_addr string

2020-09-11 Thread Janusz Krzysztofik
Device bus address structure field is always initialized with a pointer to a substring of the device sysfs path and never used for its modification. Declare it as a constant string. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file

[Intel-gfx] [PATCH i-g-t v6 14/24] tests/core_hotunplug: Process return values of sysfs operations

2020-09-11 Thread Janusz Krzysztofik
Return values of driver bind/unbind / device remove/recover sysfs operations are now ignored. Assert their correctness. v2: Add trailing newlines missing from igt_assert messages. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14

[Intel-gfx] [PATCH i-g-t v6 18/24] tests/core_hotunplug: More thorough i915 healthcheck and recovery

2020-09-11 Thread Janusz Krzysztofik
do its job correctly without that. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 115 - 1 file changed, 101 insertions(+), 14 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 5e9eba8e7..bc82ae3fb 100644 -

[Intel-gfx] [PATCH i-g-t v6 19/24] tests/core_hotunplug: Add 'lateclose before restore' variants

2020-09-11 Thread Janusz Krzysztofik
checks and related changes, introduced in v4, to a separate patch. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski # v2 --- tests/core_hotunplug.c | 78 +++--- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/tests

[Intel-gfx] [PATCH i-g-t v6 17/24] tests/core_hotunplug: Also check health of render device node

2020-09-11 Thread Janusz Krzysztofik
health of both device nodes before running any subtests. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 42 +++--- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 6cf56d047

[Intel-gfx] [PATCH i-g-t v6 16/24] tests/core_hotunplug: Explicitly ignore unused return values

2020-09-11 Thread Janusz Krzysztofik
Some return values are not useful and can be ignored. Wrap those cases inside igt_ignore_warn(), not only to make sure compilers are happy but also to clearly document our decisions. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 6 +++--- 1 file

[Intel-gfx] [PATCH i-g-t v6 23/24] tests/core_hotunplug: Un-blocklist *bind* subtests

2020-09-11 Thread Janusz Krzysztofik
Subtests which don't remove the device, only unbind the driver from it, seem relatively safe and harmless for CI. Remove them from the CI blocklist. Signed-off-by: Janusz Krzysztofik --- tests/intel-ci/blacklist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v6 22/24] tests/core_hotunplug: Duplicate debug messages in dmesg

2020-09-11 Thread Janusz Krzysztofik
. Signed-off-by: Janusz Krzysztofik --- tests/core_hotunplug.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 3e2a76ddb..67e67627f 100644 --- a/tests/core_hotunplug.c +++ b/tests/core_hotunplug.c

Re: [Intel-gfx] [PATCH i-g-t v6 23/24] tests/core_hotunplug: Un-blocklist *bind* subtests

2020-09-11 Thread Janusz Krzysztofik
Hi Petri, On Fri, 2020-09-11 at 14:51 +0300, Petri Latvala wrote: > On Fri, Sep 11, 2020 at 12:30:38PM +0200, Janusz Krzysztofik wrote: > > Subject: [PATCH i-g-t v6 23/24] tests/core_hotunplug: Un-blocklist *bind* > > subtests > > Change to > > intel-ci: Un-b

Re: [Intel-gfx] [PATCH i-g-t v6 24/24] tests/core_hotunplug: Add unbind-rebind subtest to BAT scope

2020-09-11 Thread Janusz Krzysztofik
On Fri, 2020-09-11 at 14:52 +0300, Petri Latvala wrote: > On Fri, Sep 11, 2020 at 12:30:39PM +0200, Janusz Krzysztofik wrote: > > Subject: [PATCH i-g-t v6 24/24] tests/core_hotunplug: Add unbind-rebind > > subtest to BAT scope > > Same here, prefix with intel-ci >

Re: [Intel-gfx] [PATCH i-g-t v6 21/24] tests/core_hotunplug: HSW/BDW audio issue workaround

2020-09-11 Thread Janusz Krzysztofik
Hi Petri, On Fri, 2020-09-11 at 15:22 +0300, Petri Latvala wrote: > On Fri, Sep 11, 2020 at 12:30:36PM +0200, Janusz Krzysztofik wrote: > > Unbinding the i915 driver on some Haswell and Broadwell platforms with > > Azalia audio results in a kernel WARNING on "i915 raw-wakere

Re: [Intel-gfx] [PATCH i-g-t v6 00/24] tests/core_hotunplug: Fixes and enhancements

2020-09-14 Thread Janusz Krzysztofik
On Mon, 2020-09-14 at 20:18 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-09-11 12:30:15) > > Clean up the test code, add some new basic subtests, then unblock > > unbind test variants. > > > > No incompletes / aborts nor subsequently run test issue

Re: [Intel-gfx] [PATCH i-g-t v6 00/24] tests/core_hotunplug: Fixes and enhancements

2020-09-15 Thread Janusz Krzysztofik
nks, Janusz > Otherwise I filed the issue > https://gitlab.freedesktop.org/drm/intel/-/issues/2464 > > Thanks, > Lakshmi. > > -Original Message- > From: Janusz Krzysztofik > Sent: Monday, September 14, 2020 12:31 PM > To: Winiarski, Michal ; > igt-..

Re: [Intel-gfx] [PATCH i-g-t v6 00/24] tests/core_hotunplug: Fixes and enhancements

2020-09-16 Thread Janusz Krzysztofik
ible. Thanks, Janusz > > Thanks, > Lakshmi > > > -Original Message- > From: Janusz Krzysztofik > Sent: Tuesday, September 15, 2020 12:47 AM > To: Vudum, Lakshminarayana ; Winiarski, > Michal ; igt-...@lists.freedesktop.org > Cc: Michał Winiarski ; intel-gfx@lis

[Intel-gfx] [RFC PATCH] drm/i915/userptr: Don't activate MMU notifier if no pages can be acquired

2020-02-19 Thread Janusz Krzysztofik
es the notifier. However, a time window exists when the notifier can be called for an object even with no pages set yet. Postpone activation of the userptr MMU notifier for an object until some pages are successfully acquired. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i9

Re: [Intel-gfx] [RFC PATCH] drm/i915/userptr: Don't activate MMU notifier if no pages can be acquired

2020-02-19 Thread Janusz Krzysztofik
Hi Chris, On Wednesday, February 19, 2020 1:17:12 PM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-02-19 12:09:44) > > The purpose of userptr MMU notifier is to invalidate object pages as > > soon as someone unpins them from memory. While doing that, > > obj

[Intel-gfx] [RFC PATCH v2] drm/i915/userptr: Activate MMU notifier only after pages are set

2020-02-19 Thread Janusz Krzysztofik
ot been set. Signed-off-by: Janusz Krzysztofik --- Hi, This is a slightly modified alternative to the patch "drm/i915/userptr: Don't activate MMU notifier if no pages can be acquired" just submitted. I think it is better than the original as it prevents the notifier from being usel

[Intel-gfx] [PATCH i-g-t] tests/gem_userptr_blits: Refresh map-fixed-invalidate* subtests

2020-02-19 Thread Janusz Krzysztofik
other mapping types, not only GTT. Use the new IOCTL and dynamically examine all MMAP_OFFSET types supported by hardware. v2: Examine all supported MMAP_OFFSET types, not only the first one that works, - add subtest description. Signed-off-by: Janusz Krzysztofik Cc: Michał Winiarski --- As

Re: [Intel-gfx] [RFC PATCH i-g-t v2] tests/gem_userptr_blits: Enhance invalid mapping exercise

2020-02-20 Thread Janusz Krzysztofik
Hi Chris, On Tuesday, February 11, 2020 5:44:59 PM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-02-11 14:30:48) > > @@ -2009,8 +2016,31 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL) > > igt_subt

[Intel-gfx] [RFC PATCH i-g-t] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

2020-02-20 Thread Janusz Krzysztofik
fset could redefine the macro back to its initial form for internal use. Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- lib/i915/gem_mman.h | 5 +++-- tests/i915/gem_ctx_sseu.c| 2 +- tests/i915/gem_exec_params.c | 2 +- tests/i915/gem_madvise.

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 9/9] i915: Exercise I915_CONTEXT_PARAM_RINGSIZE

2020-02-20 Thread Janusz Krzysztofik
Hi Chris, On Monday, December 2, 2019 3:59:19 PM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-12-02 14:42:58) > > Hi Chris, > > > > I have a few questions rather than comments. I hope they are worth > > spending > > your time. > > > &g

[Intel-gfx] [PATCH i-g-t v2] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

2020-02-20 Thread Janusz Krzysztofik
fset could redefine the macro back to its initial form for internal use. v2: Move extra condition to a separate function and call it via for_each_if(), in case we need to fix it again in future (Chris) Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- lib/i915/

Re: [Intel-gfx] [PATCH i-g-t v2] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

2020-02-20 Thread Janusz Krzysztofik
Please ignore this submission, the code is broken. Sorry for that. Janusz On Thursday, February 20, 2020 6:08:19 PM CET Janusz Krzysztofik wrote: > Commit b0da8bb705c0 ("lib/i915: for_each_mmap_offset_type()") > introduced a macro that makes it easy to repeat a test body wit

[Intel-gfx] [PATCH i-g-t v3] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

2020-02-20 Thread Janusz Krzysztofik
fset could redefine the macro back to its initial form for internal use. v2: Move extra condition to a separate function and call it via for_each_if(), in case we need to fix it again in future (Chris) v3: Fix blind copy-paste Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Cc: Ch

[Intel-gfx] [RFC PATCH i-g-t v2 2/2] tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr

2020-02-21 Thread Janusz Krzysztofik
Currently unavoidable lockedp loop related to userptr MMU notifier exists in the i915 driver. For that reason, attempts to set up a mmap-offset (or mmap-gtt) mapping to a userptr object may be now preventively rejected by the driver. A test should exists which checks for that. Would a mapping at

[Intel-gfx] [RFC PATCH i-g-t v2 1/2] lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support

2020-02-21 Thread Janusz Krzysztofik
fset could redefine the macro back to its initial form for internal use. v2: Move extra condition to a separate function and call it via for_each_if(), in case we need to fix it again in future (Chris) v3: Fix blind copy-paste Suggested-by: Michał Winiarski Signed-off-by: Janusz Krzysztofik Cc: Ch

[Intel-gfx] [RFC PATCH i-g-t v2 0/2] tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr

2020-02-21 Thread Janusz Krzysztofik
t mapping to userptr". Thanks, Janusz Janusz Krzysztofik (2): lib/i915: Restrict mmap types to GTT if no MMAP_OFFSET support tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr lib/i915/gem_mman.c| 5 lib/i915/gem_mman.h| 7 -- tests/i915

Re: [Intel-gfx] [PATCH i-g-t] i915: Exercise I915_CONTEXT_PARAM_RINGSIZE

2020-02-21 Thread Janusz Krzysztofik
amp;bbe, sizeof(bbe)); > + > + return handle; > +} > + > +static uint32_t batch_create(int i915) > +{ > + return __batch_create(i915, 0); > +} > + > +static unsigned int measure_inflight(int i915, unsigned int engine, int > timeout) > +{ > + IGT_CORK_FENCE(cork); > +

Re: [Intel-gfx] [RFC PATCH i-g-t v2 2/2] tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr

2020-02-21 Thread Janusz Krzysztofik
Hi Chris, Thanks for review. On Friday, February 21, 2020 3:28:03 PM CET Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-02-21 11:17:01) > > Currently unavoidable lockedp loop related to userptr MMU notifier > > exists in the i915 driver. For that reason, attempts to se

Re: [Intel-gfx] [RFC PATCH i-g-t v2 2/2] tests/gem_userptr_blits: Exercise mmap-offset mapping to userptr

2020-02-25 Thread Janusz Krzysztofik
Hi Chris, On Fri, 2020-02-21 at 14:28 +, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2020-02-21 11:17:01) > > Currently unavoidable lockedp loop related to userptr MMU notifier > > exists in the i915 driver. For that reason, attempts to set up a > > mmap-offset (or

<    1   2   3   4   5   6   7   8   9   >