Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/core_hotunplug: Take care of closing fences before failing

2020-10-15 Thread Janusz Krzysztofik
On Thu, 2020-10-15 at 09:40 +0200, Marcin Bernatowicz wrote: > On Wed, 2020-10-14 at 18:55 +0200, Janusz Krzysztofik wrote: > > The test was designed to keep track of open device file descriptors > > for safe driver unbind on recovery from a failed subtest. In that > > conte

[Intel-gfx] [PATCH i-g-t v2] tests/core_hotunplug: Restore i915 debugfs health check

2020-10-12 Thread Janusz Krzysztofik
alth check a better chance to detect issues - run it before sysfs health checks. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/core_hotunplug.c | 61 ++ 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/tests/core_hotunplug

[Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Restore i915 debugfs health check

2020-10-09 Thread Janusz Krzysztofik
ugfs areas. Also, split hotrebind/hotreplug scenarios into a pair of each, one that performs the health check right after hot rebind/replug and delegates the device late close step to a follow up recovery phase while the other one checks device health only after late closing it. Signed-off-

[Intel-gfx] [PATCH i-g-t v3] tests/core_hotunplug: Restore i915 debugfs health check

2020-10-13 Thread Janusz Krzysztofik
ng it. v2: Give GPU health check a better chance to detect issues - run it before sysfs health checks. v3: Run sysfs health check on any hardware, not only i915. Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- Even if the root cause has occurred to be sitting on the IGT lib side an

[Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Take care of closing fences before failing

2020-10-14 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Cc: Chris Wilson --- tests/core_hotunplug.c | 46 -- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index 70669c590..d6db02bad 100644 --- a/tests/core_hotunplug.c +

[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
in 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 --- tests

[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

[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
e 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 green light for me

[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
. 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 file changed, 20

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

2020-08-28 Thread Janusz Krzysztofik
so 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

[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

[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 --git

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

2020-08-28 Thread Janusz Krzysztofik
. 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 +++ b/tests

[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/tests

[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
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 923b8cdfd

[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
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 -- 1 file changed, 33 insertions

[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

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

2020-08-28 Thread Janusz Krzysztofik
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_hotunplug.c index 25508db85..b7236190

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 >

[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/tests

[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

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

2020-08-21 Thread Janusz Krzysztofik
g 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: Janusz Krzysztofik Reviewed-

[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
. 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/tests

[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
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 100644

[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
-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 index f7a54010b..849a774ff 100644 --- a/tests

[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 --git

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

2020-08-21 Thread Janusz Krzysztofik
in 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 changed, 50

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

2020-08-21 Thread Janusz Krzysztofik
-by: 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 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
. For that to be 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 00/20] tests/core_hotunplug: Fixes and enhancements

2020-08-21 Thread Janusz Krzysztofik
e 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/core_hotunplug: C

[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 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
. 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 +++ b/tests

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'm

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

2020-08-20 Thread Janusz Krzysztofik
give me your green lite for merging this series if you have no objections. Thanks, Janusz Janusz Krzysztofik (19): 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/core_hotunplug

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

2020-08-20 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 v3 03/19] tests/core_hotunplug: Clean up device open error handling

2020-08-20 Thread Janusz Krzysztofik
. 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 +++ b/tests

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

2020-08-20 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. v3: Refresh. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski

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

2020-08-20 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 v3 11/19] tests/core_hotunplug: Recover from subtest failures

2020-08-20 Thread Janusz Krzysztofik
g 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: Janusz Krzysztofik Reviewed-

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

2020-08-20 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

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

2020-08-20 Thread Janusz Krzysztofik
. For that to be 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 v3 09/19] tests/core_hotunplug: Prepare invariant data once per test run

2020-08-20 Thread Janusz Krzysztofik
' function accordingly. A side benefit of using the PCI device sysfs node, not the DRM one, while removing the device is that a future subtest may now easily perform both driver unbind and device remove operations in a row. v3: Refresh. Suggested-by: Michał Winiarski Signed-off-by: Janusz

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

2020-08-20 Thread Janusz Krzysztofik
bodies. 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 --- 1 file

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

2020-08-20 Thread Janusz Krzysztofik
in 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 changed, 50

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

2020-08-20 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 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
. 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/tests

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

2020-08-20 Thread Janusz Krzysztofik
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.c b/tests

[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/tests

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

2020-08-20 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 --git

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

2020-08-20 Thread Janusz Krzysztofik
-by: 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 277679ea1..42a13f8b5 100644 --- a/tests

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 >

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

Re: [Intel-gfx] [RFC PATCH 3/4] drm/i915: Move GGTT cleanup from driver_release to _remove

2020-05-28 Thread Janusz Krzysztofik
On Wed, 2020-05-27 at 21:12 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-05-18 20:17:19) > > GGTT including its scratch page is not cleaned up until driver release. > > Since DMA mappings still exist before scratch page cleanup, unmapping > > them on la

Re: [Intel-gfx] [RFC PATCH 4/4] drm/i915: Move UC firmware cleanup from driver_release to _remove

2020-05-28 Thread Janusz Krzysztofik
Hi Michał, On Wed, 2020-05-27 at 21:15 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-05-18 20:17:20) > > UC firmware is stored in a GEM object. Clean it up on driver remove to >^ double whitespace That's a result of

Re: [Intel-gfx] [RFC PATCH 1/4] drm/i915: Drop user contexts on driver remove

2020-05-28 Thread Janusz Krzysztofik
Hi Tvrtko, On Thu, 2020-05-28 at 11:14 +0100, Tvrtko Ursulin wrote: > On 18/05/2020 19:17, Janusz Krzysztofik wrote: > > Contexts associated with open device file descriptors together with > > their assigned address spaces are now closed on device file close. On > > i915_ge

Re: [Intel-gfx] [RFC PATCH 1/4] drm/i915: Drop user contexts on driver remove

2020-05-28 Thread Janusz Krzysztofik
Hi Chris, On Thu, 2020-05-28 at 14:41 +0100, Chris Wilson wrote: > Quoting Tvrtko Ursulin (2020-05-28 14:34:42) > > On 28/05/2020 13:10, Janusz Krzysztofik wrote: > > > Hi Tvrtko, > > > > > > On Thu, 2020-05-28 at 11:14 +0100, Tvrtko Ursulin wrote: > > &

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_exec_nop: Specify timeout in milliseconds

2020-05-21 Thread Janusz Krzysztofik
eck the test requirements. For this we want to specify the baseline > measurement timeout in milliseconds, allowing us to speed up our other > baseline measurements elsewhere as well. > > Signed-off-by: Chris Wilson Reviewed-by: Janusz Krzysztofik Thanks, Janusz > --- >

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

2020-08-07 Thread Janusz Krzysztofik
, - rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 61 -- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c

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

2020-08-07 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. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski

[Intel-gfx] [PATCH i-g-t v2 11/16] tests/core_hotunplug: Follow failed subtests with health checks

2020-08-07 Thread Janusz Krzysztofik
igt_require() with 'if() return;' construct in recover() to reduce noise, - replace "subtest failure" message used as a request for healthcheck with a more appropriate "need healthcheck" for clarity, - rebase on current upstream master. Signed-off-by: Janusz Krzysztofik

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

2020-08-07 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 91 -- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index ffba32568..71ac4d169 100644 --- a/tests

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

2020-08-07 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 on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed

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

2020-08-07 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. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski

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

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

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

2020-08-07 Thread Janusz Krzysztofik
. For that to be possible, maintain a single instance of hotunplug structure at igt_main level and pass it down to subtests. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 56 -- 1 file changed

[Intel-gfx] [PATCH i-g-t v2 03/16] tests/core_hotunplug: Consolidate duplicated debug messages

2020-08-07 Thread Janusz Krzysztofik
bodies. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c index

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

2020-08-07 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 emitting warnings. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał

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

2020-08-07 Thread Janusz Krzysztofik
Clean up the test code and unblock unbind variants. @Michał: Since most v2 updates are trivial, I've preserved your Reviewd-by: except for patch 11/16 "Follow failed subtests with health checks" - please have a look and confirm if you are still OK with it. Thanks, Janusz Janusz Krzys

[Intel-gfx] [PATCH i-g-t v2 14/16] tests/core_hotunplug: Assert expected device presence/absence

2020-08-07 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. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 14 ++ 1 file

[Intel-gfx] [PATCH i-g-t v2 05/16] tests/core_hotunplug: Fix missing newline

2020-08-07 Thread Janusz Krzysztofik
A trailing newline is missing from one of fatal error messages, fix it. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core_hotunplug.c

[Intel-gfx] [PATCH i-g-t v2 13/16] tests/core_hotunplug: Process return values of sysfs operations

2020-08-07 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, - rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests

[Intel-gfx] [PATCH i-g-t v2 04/16] tests/core_hotunplug: Assert successful device filter application

2020-08-07 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. v2: Rebase on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 2 +- 1 file changed, 1

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

2020-08-07 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 on current upstream master. Signed-off-by: Janusz Krzysztofik Reviewed-by: Michał Winiarski --- tests/core_hotunplug.c | 92 +- 1

[Intel-gfx] [PATCH i-g-t 16/16] tests/core_hotunplug: Un-blocklist *unbind* subtests

2020-08-07 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/tests

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

2020-08-10 Thread Janusz Krzysztofik
On Fri, 2020-08-07 at 11:19 +0200, Janusz Krzysztofik wrote: > Clean up the test code and unblock unbind variants. From the CI report it looks for me like driver (hot)unbind-rebind operations affect hardware and the driver doesn't handle this correctly. Moreover, the test doesn't curren

Re: [Intel-gfx] [RFC PATCH i-g-t v2 8/8] tests/core_hotunplug: Add 'GEM batch' variant

2020-06-26 Thread Janusz Krzysztofik
Hi Michał, On Thu, 2020-06-25 at 22:02 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-06-22 18:44:15) > > Verify if a device with a GEM batch job still running on a GPU can be > > hot-unplugged cleanly and released, then recovered. > > >

Re: [Intel-gfx] [igt-dev] [RFC PATCH i-g-t v2 5/8] tests/core_hotunplug: Add 'GEM address space' variant

2020-06-26 Thread Janusz Krzysztofik
Hi Michał, thanks for review. On Thu, 2020-06-25 at 21:42 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-06-22 18:44:12) > > Verify if an additional address space associated with an open device > > file descriptor is cleaned up correctly on device hotunpl

Re: [Intel-gfx] [igt-dev] [RFC PATCH i-g-t v2 6/8] tests/core_hotunplug: Add 'GEM object' variant

2020-06-26 Thread Janusz Krzysztofik
Hi Michał, Thanks for review. On Thu, 2020-06-25 at 21:51 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-06-22 18:44:13) > > GEM objects belonging to user file descriptors still open on device > > hotunplug may exhibit still more driver issues.

Re: [Intel-gfx] [RFC PATCH i-g-t v2 1/8] tests/core_hotunplug: Duplicate debug messages in dmesg

2020-06-26 Thread Janusz Krzysztofik
Hi Michał, Thanks for review. On Thu, 2020-06-25 at 17:27 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-06-22 18:44:08) > > The purpose of debug messages displayed by the test is to make > > identification of a subtest phase that fails more easy. Since issue

Re: [Intel-gfx] [igt-dev] [RFC PATCH i-g-t v2 7/8] tests/core_hotunplug: Add 'PRIME handle' variant

2020-06-26 Thread Janusz Krzysztofik
Hi Michał, On Thu, 2020-06-25 at 21:57 +0200, Michał Winiarski wrote: > Quoting Janusz Krzysztofik (2020-06-22 18:44:14) > > Even if all device file descriptors are closed on device hotunplug, > > PRIME exported objects may still exists, referenced by still open > > dma-b

<    1   2   3   4   5   6   7   8   9   >