[Intel-gfx] [PATCH i-g-t 7/9] lib/ktap: Drop workaround for missing top level KTAP headers

2023-10-03 Thread Janusz Krzysztofik
has fixed that issue, that workaround is no longer needed. Drop it. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 12 lib/tests/igt_ktap_parser.c | 3 +-- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index

[Intel-gfx] [PATCH i-g-t 8/9] lib/kunit: Fetch a list of test cases in advance

2023-10-03 Thread Janusz Krzysztofik
in advance, then we stop parsing KTAP report as soon as we get a result from the last test case from the list. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 217 +++-- 1 file changed, 157 insertions(+), 60 deletions(-) diff --git a/lib/igt_kmod.c b

[Intel-gfx] [PATCH i-g-t 5/9] lib/kunit: Omit suite name prefix if the same as subtest name

2023-10-03 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+),

[Intel-gfx] [PATCH i-g-t 4/9] lib/kunit: Parse KTAP report from the main process thread

2023-10-03 Thread Janusz Krzysztofik
been processed, - fix trailing newlines missing from error messages, - add more debug statements, - integrate common code around kunit_result_free() into it. v2: Interrupt blocking read() on modprobe failure. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v2 --- lib

[Intel-gfx] [PATCH i-g-t 3/9] lib/kunit: Fix misplaced igt_kunit() doc

2023-10-03 Thread Janusz Krzysztofik
-by: Janusz Krzysztofik --- lib/igt_kmod.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index df0e650d49..426ae5b26f 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -762,15 +762,6 @@ static void *modprobe_task(void *arg

[Intel-gfx] [PATCH i-g-t 2/9] lib/kunit: Be more verbose on errors

2023-10-03 Thread Janusz Krzysztofik
Use a more verbose variant of igt_fail() when failing a dynamic sub- subtest on kernel taint. Also, print a debug message on string duplication failure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b

[Intel-gfx] [PATCH i-g-t 1/9] lib/kunit: Fix handling of potential errors from F_GETFL

2023-10-03 Thread Janusz Krzysztofik
Function fcntl(..., F_GETFL, ...) that returns file status flags may also return a negative error code. Handle that error instead of blindly using the returned value as flags. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[Intel-gfx] [PATCH i-g-t 0/9] Kunit fixes and improvements

2023-10-03 Thread Janusz Krzysztofik
Janusz Krzysztofik (9): lib/kunit: Fix handling of potential errors from F_GETFL lib/kunit: Be more verbose on errors lib/kunit: Fix misplaced igt_kunit() doc lib/kunit: Parse KTAP report from the main process thread lib/kunit: Omit suite name prefix if the same as subtest name tests

[Intel-gfx] [PATCH i-g-t v3 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-18 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v3 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-18 Thread Janusz Krzysztofik
y useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 23 --- tests/drm_mm.c | 42 +- 2 files changed, 41 insertions(+), 24 deletions(

[Intel-gfx] [PATCH i-g-t v3 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-18 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. v2: Interrupt blocking read() on modprobe failure. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 208 ++ lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 166 insertions

[Intel-gfx] [PATCH i-g-t v3 13/17] lib/ktap: Reimplement KTAP parser

2023-09-18 Thread Janusz Krzysztofik
ource file, - add license and copyright clauses to the test source file. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 422 lib/igt_ktap.h | 15 ++ lib/tests/igt_ktap_pars

[Intel-gfx] [PATCH i-g-t v3 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-18 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab

[Intel-gfx] [PATCH i-g-t v3 14/17] lib/kunit: Load test modules in background

2023-09-18 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 2941524bb4

[Intel-gfx] [PATCH i-g-t v3 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-18 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 12 +++- 1 file

[Intel-gfx] [PATCH i-g-t v3 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-18 Thread Janusz Krzysztofik
default signal handler kills the whole process anyway, - update commit description to also mention read error handling fix. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab # v1 --- lib/igt_kmod.c | 7 +- lib/igt_ktap.c | 66

[Intel-gfx] [PATCH i-g-t v3 09/17] lib/ktap: Drop is_running flag

2023-09-18 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 0db42d1243..5bc5e003d7 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6

[Intel-gfx] [PATCH i-g-t v3 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-18 Thread Janusz Krzysztofik
to break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff

[Intel-gfx] [PATCH i-g-t v3 07/17] lib/ktap: Drop checks for EINTR on read() failures

2023-09-18 Thread Janusz Krzysztofik
on user interrupt, only the whole process should be terminated. Drop checks for errno == EINTR as not applicable. v2: Drop handling of EINTR completely, update commit message and descripion. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_ktap.c | 15 --- 1

[Intel-gfx] [PATCH i-g-t v3 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-18 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c

[Intel-gfx] [PATCH i-g-t v3 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-18 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib

[Intel-gfx] [PATCH i-g-t v3 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-18 Thread Janusz Krzysztofik
from igt_ktest_fini() when only listing subtests, - call igt_ktest_end() from igt_fixture so it is not unnecessarily called when only listing subtests. Signed-off-by: Janusz Krzysztofik Cc: Mauro Carvalho Chehab --- lib/igt_kmod.c | 76 +++--- 1

[Intel-gfx] [PATCH i-g-t v3 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-18 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik Reviewed-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t v3 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-18 Thread Janusz Krzysztofik
y operation. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ static vo

[Intel-gfx] [PATCH i-g-t v3 01/17] lib/kunit: Drop unused file stream

2023-09-18 Thread Janusz Krzysztofik
descriptor with fileno() and raw data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik Acked-by: Mauro Carvalho Chehab --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t v3 00/17] Fix IGT Kunit implementation issues

2023-09-18 Thread Janusz Krzysztofik
includes in the test source file, - add license and copyright clauses to the test source file. Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed lib/kunit: Optimize calls

Re: [Intel-gfx] [PATCH] drm/tests: Fix incorrect argument in drm_test_mm_insert_range

2023-09-15 Thread Janusz Krzysztofik
Hi Maíra, Thanks for review. On Friday, 15 September 2023 16:01:31 CEST Maira Canal wrote: > Hi, > > On 9/11/23 10:03, Janusz Krzysztofik wrote: > > While drm_mm test was converted form igt selftest to kunit, unexpected > > value of "end" argument equal "s

Re: [Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-15 Thread Janusz Krzysztofik
On Friday, 15 September 2023 15:09:58 CEST Janusz Krzysztofik wrote: > Hi Mauro, > > On Friday, 15 September 2023 14:28:49 CEST Mauro Carvalho Chehab wrote: > > On Fri, 8 Sep 2023 14:32:47 +0200 > > Janusz Krzysztofik wrote: > > > > Fo

Re: [Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-15 Thread Janusz Krzysztofik
Hi Mauro, On Friday, 15 September 2023 14:28:49 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:47 +0200 > Janusz Krzysztofik wrote: > > Forgot to mention on my past review: > > > + , ) == 1

Re: [Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-15 Thread Janusz Krzysztofik
On Friday, 15 September 2023 14:25:24 CEST Mauro Carvalho Chehab wrote: > On Wed, 13 Sep 2023 16:04:10 +0200 > Janusz Krzysztofik wrote: > > > On Monday, 11 September 2023 11:01:42 CEST Mauro Carvalho Chehab wrote: > > > On Fri, 8 Sep 2023 14:32:41 +0200 > &g

Re: [Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-13 Thread Janusz Krzysztofik
On Monday, 11 September 2023 11:01:42 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:41 +0200 > Janusz Krzysztofik wrote: > > > While reading KTAP data from /dev/kmsg we now ignore interrupt signals > > that may occur during read() and we cont

Re: [Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-13 Thread Janusz Krzysztofik
On Monday, 11 September 2023 13:57:29 CEST Mauro Carvalho Chehab wrote: > On Mon, 11 Sep 2023 11:28:32 +0200 > Janusz Krzysztofik wrote: > > > Hi Mauro, > > > > Thanks for review. > > > > On Monday, 11 September 2023 10:52:51 CEST Mauro Carvalho Chehab wr

[Intel-gfx] [PATCH] drm/tests: Fix incorrect argument in drm_test_mm_insert_range

2023-09-11 Thread Janusz Krzysztofik
t;= start) is triggered. Fix it by restoring the original value. Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit") Signed-off-by: Janusz Krzysztofik Cc: "Maíra Canal" Cc: Arthur Grillo Cc: Javier Martinez Canillas Cc: Daniel Latypov Cc: sta...@vger.ke

Re: [Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-11 Thread Janusz Krzysztofik
Hi Mauro, Thanks for review. On Monday, 11 September 2023 10:52:51 CEST Mauro Carvalho Chehab wrote: > On Fri, 8 Sep 2023 14:32:39 +0200 > Janusz Krzysztofik wrote: > > > In a body of a subtest with dynamic sub-subtests, it is illegal to call > > igt_fail() and its

[Intel-gfx] [PATCH i-g-t v2 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-08 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t v2 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-08 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 158 +++--- lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 123 insertions(+), 625 deletions(-) diff --git a/lib/igt_kmod.c b/lib

[Intel-gfx] [PATCH i-g-t v2 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-08 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +++- 1 file changed, 11 insertions(+), 1

[Intel-gfx] [PATCH i-g-t v2 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-08 Thread Janusz Krzysztofik
y useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 26 ++ tests/drm_mm.c | 42 +- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/lib/igt_kmod.c b/

[Intel-gfx] [PATCH i-g-t v2 14/17] lib/kunit: Load test modules in background

2023-09-08 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c692954911..bbde3929f2 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t v2 13/17] lib/ktap: Reimplement KTAP parser

2023-09-08 Thread Janusz Krzysztofik
orrectness of their parsing is also provided. v2: Fix incorrect and missing includes in the test source file, - add license and copyright clauses to the test source file. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 422 lib/igt_ktap.h

[Intel-gfx] [PATCH i-g-t v2 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-08 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 28

[Intel-gfx] [PATCH i-g-t v2 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-08 Thread Janusz Krzysztofik
CPU usage can be observed. Simplify reading KTAP reports by first switching the file descriptor back to blocking mode. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 7 - lib/igt_ktap.c | 81 ++ 2 files changed, 28 insertions(+), 60

[Intel-gfx] [PATCH i-g-t v2 09/17] lib/ktap: Drop is_running flag

2023-09-08 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 1e75b2ec23..fe77b62680 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6 @@ struct ktap_parser_args { int

[Intel-gfx] [PATCH i-g-t v2 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-08 Thread Janusz Krzysztofik
to break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c

[Intel-gfx] [PATCH i-g-t v2 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-08 Thread Janusz Krzysztofik
igt_runner has no problems with killing us promptly on timeout. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 84fb13218f..3cfb55ec97 100644 --- a/lib/igt_ktap.c +++ b/lib

[Intel-gfx] [PATCH i-g-t v2 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-08 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -579,9 +579,7

[Intel-gfx] [PATCH i-g-t v2 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-08 Thread Janusz Krzysztofik
in a preceding igt_fixture section. Replace remaining illegal igt_fail() calls with more friendly skips. Let igt_runner decide if abort is needed. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 75 +++--- 1 file changed, 22 insertions(+), 53 deletions

[Intel-gfx] [PATCH i-g-t v2 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-08 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -814,12

[Intel-gfx] [PATCH i-g-t v2 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-08 Thread Janusz Krzysztofik
y operation. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ static void __igt_kunit(const char *modu

[Intel-gfx] [PATCH i-g-t v2 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-08 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[Intel-gfx] [PATCH i-g-t v2 01/17] lib/kunit: Drop unused file stream

2023-09-08 Thread Janusz Krzysztofik
with fileno() and the data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t v2 00/17] Fix IGT Kunit implementation issues

2023-09-08 Thread Janusz Krzysztofik
v2: Fix incorrect and missing includes in the test source file, - add license and copyright clauses to the test source file. Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed

[Intel-gfx] [PATCH i-g-t 17/17] lib/kunit: Omit suite name prefix if the same as subtest name

2023-09-08 Thread Janusz Krzysztofik
is into account when composing names for IGT dynamic sub-subtest names and drop the leading test suite name component when it is the same as subtest name. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/

[Intel-gfx] [PATCH i-g-t 15/17] lib/kunit: Parse KTAP report from the main process thread

2023-09-08 Thread Janusz Krzysztofik
needed functions from igt_ktap soruces. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 158 +++--- lib/igt_ktap.c | 568 - lib/igt_ktap.h | 22 -- 3 files changed, 123 insertions(+), 625 deletions(-) diff --git a/lib/igt_kmod.c b/lib

[Intel-gfx] [PATCH i-g-t 16/17] lib/kunit: Strip "_test" or "_kunit" suffix from subtest names

2023-09-08 Thread Janusz Krzysztofik
y useful information. Strip those suffixes from IGT subtest names. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 26 ++ tests/drm_mm.c | 42 +- 2 files changed, 43 insertions(+), 25 deletions(-) diff --git a/lib/igt_kmod.c b/

[Intel-gfx] [PATCH i-g-t 14/17] lib/kunit: Load test modules in background

2023-09-08 Thread Janusz Krzysztofik
parser, without waiting for completion of module loading. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index c692954911..bbde3929f2 100644 --- a/lib

[Intel-gfx] [PATCH i-g-t 13/17] lib/ktap: Reimplement KTAP parser

2023-09-08 Thread Janusz Krzysztofik
orrectness of their parsing is also provided. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 422 lib/igt_ktap.h | 15 ++ lib/tests/igt_ktap_parser.c | 235 lib/tests/meson.build | 1 + 4 files changed, 634

[Intel-gfx] [PATCH i-g-t 12/17] lib/ktap: Use IGT linked lists for storing KTAP results

2023-09-08 Thread Janusz Krzysztofik
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 28

[Intel-gfx] [PATCH i-g-t 09/17] lib/ktap: Drop is_running flag

2023-09-08 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 32 1 file changed, 32 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 1e75b2ec23..fe77b62680 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -18,7 +18,6 @@ struct ktap_parser_args { int

[Intel-gfx] [PATCH i-g-t 11/17] lib/kunit: Fail / skip on kernel taint

2023-09-08 Thread Janusz Krzysztofik
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +++- 1 file changed, 11 insertions(+), 1

[Intel-gfx] [PATCH i-g-t 08/17] lib/kunit: Cancel KTP parser on module load failure

2023-09-08 Thread Janusz Krzysztofik
to break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + lib/igt_ktap.c | 6 ++ lib/igt_ktap.h | 1 + 3 files changed, 8 insertions(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c

[Intel-gfx] [PATCH i-g-t 10/17] lib/ktap: Read /dev/kmsg in blocking mode

2023-09-08 Thread Janusz Krzysztofik
CPU usage can be observed. Simplify reading KTAP reports by first switching the file descriptor back to blocking mode. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 7 - lib/igt_ktap.c | 81 ++ 2 files changed, 28 insertions(+), 60

[Intel-gfx] [PATCH i-g-t 07/17] lib/ktap: Don't ignore interrupt signals

2023-09-08 Thread Janusz Krzysztofik
igt_runner has no problems with killing us promptly on timeout. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 84fb13218f..3cfb55ec97 100644 --- a/lib/igt_ktap.c +++ b/lib

[Intel-gfx] [PATCH i-g-t 03/17] lib/kunit: Fix struct kmod_module kunit_kmod not freed

2023-09-08 Thread Janusz Krzysztofik
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index

[Intel-gfx] [PATCH i-g-t 06/17] lib/ktap: Make sure we fail on premature cancel

2023-09-08 Thread Janusz Krzysztofik
by result of KTAP parsing. Signed-off-by: Janusz Krzysztofik --- lib/igt_ktap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/igt_ktap.c b/lib/igt_ktap.c index 123a40d183..84fb13218f 100644 --- a/lib/igt_ktap.c +++ b/lib/igt_ktap.c @@ -579,9 +579,7

[Intel-gfx] [PATCH i-g-t 05/17] lib/kunit: Fix illegal igt_fail() calls inside subtest body

2023-09-08 Thread Janusz Krzysztofik
in a preceding igt_fixture section. Replace remaining illegal igt_fail() calls with more friendly skips. Let igt_runner decide if abort is needed. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 75 +++--- 1 file changed, 22 insertions(+), 53 deletions

[Intel-gfx] [PATCH i-g-t 04/17] lib/kunit: Optimize calls to igt_success/skip/fail()

2023-09-08 Thread Janusz Krzysztofik
makes the code more compact. Go for it. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 34ddec3fad..1d1cd51170 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -814,12

[Intel-gfx] [PATCH i-g-t 02/17] lib/kunit: Stop loading kunit module explicitly

2023-09-08 Thread Janusz Krzysztofik
y operation. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 97667a896f..faf31afabc 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -789,12 +789,6 @@ static void __igt_kunit(const char *modu

[Intel-gfx] [PATCH i-g-t 01/17] lib/kunit: Drop unused file stream

2023-09-08 Thread Janusz Krzysztofik
with fileno() and the data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by: Janusz Krzysztofik --- lib/igt_kmod.c | 12 +- lib/igt_ktap.c | 62

[Intel-gfx] [PATCH i-g-t 00/17] Fix IGT Kunit implementation issues

2023-09-08 Thread Janusz Krzysztofik
Janusz Krzysztofik (17): lib/kunit: Drop unused file stream lib/kunit: Stop loading kunit module explicitly lib/kunit: Fix struct kmod_module kunit_kmod not freed lib/kunit: Optimize calls to igt_success/skip/fail() lib/kunit: Fix illegal igt_fail() calls inside subtest body lib/ktap

Re: [Intel-gfx] [RFC PATCH] kunit: Fix test log size limit too low for some tests

2023-08-30 Thread Janusz Krzysztofik
On Wednesday, 30 August 2023 11:23:43 CEST David Gow wrote: > On Wed, 30 Aug 2023 at 15:55, Janusz Krzysztofik > wrote: > > > > Now we have memory space available to a kunit test case log exposed via > > debugfs limited to 2048 bytes, while some para

[Intel-gfx] [RFC PATCH] kunit: Fix test log size limit too low for some tests

2023-08-30 Thread Janusz Krzysztofik
tools that rely on parsing of debugfs results can fail. Increase kunit test case log size limit to 4096 bytes. Signed-off-by: Janusz Krzysztofik --- include/kunit/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kunit/test.h b/include/kunit/test.h index

[Intel-gfx] [PATCH i-g-t] tests/core_hotunplug: Wait for device nodes to re-appear

2023-08-22 Thread Janusz Krzysztofik
es: https://gitlab.freedesktop.org/drm/intel/-/issues/8830 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/500 Signed-off-by: Janusz Krzysztofik Cc: Petri Latvala --- tests/core_hotunplug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/core_hotunplug.c b/tests/core_ho

[Intel-gfx] [PATCH v3] drm/i915: Fix premature release of request's reusable memory

2023-07-20 Thread Janusz Krzysztofik
(Chris) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8211 Fixes: df9f85d8582e ("drm/i915: Serialise i915_active_fence_set() with itself") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Cc: # v5.6+ --- drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH v2] drm/i915: Fix premature release of request's reusable memory

2023-07-17 Thread Janusz Krzysztofik
: Serialise i915_active_fence_set() with itself") Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik Cc: # v5.6+ --- drivers/gpu/drm/i915/i915_active.c | 99 - drivers/gpu/drm/i915/i915_request.c | 11 2 files changed, 81 insertions(+), 29 deletions(-) diff --git a

Re: [Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-17 Thread Janusz Krzysztofik
Hi Rick, On Monday, 10 July 2023 19:58:07 CEST Edgecombe, Rick P wrote: > On Mon, 2023-07-10 at 09:36 +0200, Janusz Krzysztofik wrote: > > The issue needs to be fixed by including _PAGE_PAT bit into a bitmask > > used > > by pgprot_modify() for selecting bits to be

Re: [Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-17 Thread Janusz Krzysztofik
Hi Borislav, On Monday, 10 July 2023 10:05:19 CEST Borislav Petkov wrote: > On Mon, Jul 10, 2023 at 09:36:14AM +0200, Janusz Krzysztofik wrote: > > Assume that adding _PAGE_PAT to _PAGE_CHG_MASK doesn't break pte_modify() > > and its users, and go for it. Also, add _PAGE_PAT_LARGE

[Intel-gfx] [PATCH v3 RESEND] x86/mm: Fix PAT bit missing from page protection modify mask

2023-07-10 Thread Janusz Krzysztofik
6: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by: Andi Shyti Reviewed-by: Juergen Gross Cc: Borislav Petkov Cc: Dave Hansen Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "Edgecombe, Rick P" Cc: sta...@

[Intel-gfx] [PATCH] drm/i915: Fix premature release of request's reusable memory

2023-07-04 Thread Janusz Krzysztofik
active i915 requests from being released while still accessing their memory. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8211 Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Janusz Krzysztofik Cc: # v5.5+ --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH v3] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-09 Thread Janusz Krzysztofik
6: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by: Andi Shyti Acked-by: Juergen Gross # v1 Cc: Borislav Petkov Cc: Dave Hansen Cc: "Edgecombe, Rick P" Cc: sta...@vger.kernel.org # v3.19+ --- arch/x86/include/as

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-08 Thread Janusz Krzysztofik
On Thursday, 8 June 2023 00:47:36 CEST Edgecombe, Rick P wrote: > On Wed, 2023-06-07 at 23:33 +0200, Janusz Krzysztofik wrote: > > > So since _PAGE_PSE is actually the same value as _PAGE_PAT, you > > > don't > > > actually need to have _PAGE_PSE in _HPAGE_CHG_MASK in

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
On Wednesday, 7 June 2023 23:12:13 CEST Edgecombe, Rick P wrote: > On Wed, 2023-06-07 at 19:11 +0200, Janusz Krzysztofik wrote: > > On Wednesday, 7 June 2023 17:31:24 CEST Dave Hansen wrote: > > > On 6/7/23 08:23, Janusz Krzysztofik wrote: > > > > > > >

Re: [Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
On Wednesday, 7 June 2023 17:31:24 CEST Dave Hansen wrote: > On 6/7/23 08:23, Janusz Krzysztofik wrote: > > > > Extend bitmask used by pgprot_modify() for selecting bits to be preserved > > with _PAGE_PAT bit. However, since that bit can be reused as _PAGE_PSE, > > an

[Intel-gfx] [PATCH v2] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-07 Thread Janusz Krzysztofik
Juergen). [1] https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/0f0754413f14 Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Fixes: 281d4078bec3 ("x86: Make page cache mode a real type") Signed-off-by: Janusz Krzysztofik Tested-by: Marek Marczykowski-Górecki Reviewed-by:

Re: [Intel-gfx] [RESUBMIT][PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-06-05 Thread Janusz Krzysztofik
(fixed misspelled Cc: email address of intel-gfx list) On Friday, 2 June 2023 16:53:30 CEST Juergen Gross wrote: > On 02.06.23 16:48, Juergen Gross wrote: > > On 02.06.23 16:43, Borislav Petkov wrote: > >> On Thu, Jun 01, 2023 at 10:47:39AM +0200, Juergen Gross wrote: > >>> As described in the

Re: [Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
On Friday, 19 May 2023 12:28:49 CEST Andrzej Hajda wrote: > On 19.05.2023 11:43, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have been confirmed with > > failures fr

[Intel-gfx] [PATCH i-g-t v3] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-19 Thread Janusz Krzysztofik
"derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Cc: Bhanuprakash Modem Reviewed-by: Andrzej Hajda # v2 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Andrzej, Thanks for review. On Tuesday, 16 May 2023 16:08:26 CEST Andrzej Hajda wrote: > On 16.05.2023 12:05, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor. Those observations have

[Intel-gfx] [PATCH i-g-t v2] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
subtest bodies to an updated and renamed helper, - drop "derived from ..." info from copyrights comment (Kamil), - fix order of includes (Kamil), - fix whitespace (Kamil), - Cc: Bhanuprakash (Kamil). Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz K

Re: [Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-16 Thread Janusz Krzysztofik
Hi Kamil, Thanks for review. On Monday, 15 May 2023 22:02:51 CEST Kamil Konieczny wrote: > Hi Janusz, > > On 2023-05-15 at 10:50:20 +0200, Janusz Krzysztofik wrote: > > Visible glitches have been observed when running graphics applications on > > Linux under Xen hypervisor

[Intel-gfx] [PATCH i-g-t] tests/i915: Exercise coherency of mmapped frame buffers

2023-05-15 Thread Janusz Krzysztofik
available mmap methods and caching modes expected to be device coherent. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Signed-off-by: Janusz Krzysztofik --- tests/i915/kms_fb_coherency.c | 354 ++ tests/meson.build | 1 + 2 files

[Intel-gfx] [RFC PATCH] x86/mm: Fix PAT bit missing from page protection modify mask

2023-04-24 Thread Janusz Krzysztofik
PAGE_CHG_MASK symbol, primarly used by pte_modify(), is likely intentionally defined with that bit not set, keep that symbol unchanged. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7648 Fixes: 281d4078bec3 ("x86: Make page cache mode a real type") Signed-off-b

[Intel-gfx] [PATCH i-g-t] tests/gem_reset_stats: Don't allow request watchdog to interfere

2023-04-13 Thread Janusz Krzysztofik
interfers with engine heartbeat and request preemption used by the test for exercising reset statistics. Disable request watchdog during the test execution. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8310 Signed-off-by: Janusz Krzysztofik --- tests/i915/gem_reset_stats.c | 7 +++ 1

[Intel-gfx] [PATCH 3/3] drm/i915/active: Simplify llist search-and-delete

2023-03-13 Thread Janusz Krzysztofik
a link between list nodes that precede and follow the deleted node. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_active.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index

[Intel-gfx] [PATCH 2/3] drm/i915/active: Serialize use of barriers as fence trackers

2023-03-13 Thread Janusz Krzysztofik
lf") Cc: Chris Wilson Cc: sta...@vger.kernel.org # v5.6+ Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_active.c | 65 -- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i91

[Intel-gfx] [PATCH 1/3] drm/i915/active: Serialize preallocation of idle barriers

2023-03-13 Thread Janusz Krzysztofik
it with collected proto-barriers (assuming we need that check). Fixes: 9ff33bbcda25 ("drm/i915: Reduce locking around i915_active_acquire_preallocate_barrier()") Cc: Chris Wilson Cc: sta...@vger.kernel.org # v5.10+ Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_act

[Intel-gfx] [PATCH 0/3] drm/i915/active: Fix other potential list corruption root causes

2023-03-13 Thread Janusz Krzysztofik
starting from v5.10. The third patch, while not fixing any real bug, is believed to make the code more predictable and easy to understand, then more easy to debug should other barrier related issue still exist. Janusz Krzysztofik (3): drm/i915/active: Serialize preallocation of idle barriers drm

Re: [Intel-gfx] [PATCH v2] drm/i915/active: Fix missing debug object activation

2023-03-13 Thread Janusz Krzysztofik
r "ref->count == 1" as __i915_active_activate() > already make sure of that. > > Fixes: 04240e30ed06 ("drm/i915: Skip taking acquire mutex for no ref->active > callback") > Cc: Chris Wilson > Cc: Tvrtko Ursulin > Cc: Thomas Hellström > Cc: Andi Shyti > Cc: i

Re: [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation

2023-03-13 Thread Janusz Krzysztofik
On Friday, 10 March 2023 17:48:10 CET Das, Nirmoy wrote: > Hi Janusz, > > On 3/10/2023 4:19 PM, Janusz Krzysztofik wrote: > > Hi Nirmoy, > > > > On Friday, 10 March 2023 15:11:38 CET Nirmoy Das wrote: > >> debug_active_activate() expected ref->count to

Re: [Intel-gfx] [PATCH] drm/i915/active: Fix missing debug object activation

2023-03-10 Thread Janusz Krzysztofik
Hi Nirmoy, On Friday, 10 March 2023 15:11:38 CET Nirmoy Das wrote: > debug_active_activate() expected ref->count to be zero > which is not true anymore as __i915_active_activate() calls > debug_active_activate() after incrementing the count. > > Fixes: 04240e30ed06 ("drm/i915: Skip taking

<    1   2   3   4   5   6   7   8   9   >