[igt-dev] [PATCH i-g-t 7/7] runner/runner_tests: change a regex to match case-insensitive

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Mon Oct 30 09:56:13 UTC 2023


On Wed, 25 Oct 2023 11:56:22 +0200
Kamil Konieczny <kamil.konieczny at linux.intel.com> wrote:

> Hi Mauro,
> On 2023-10-24 at 16:11:10 +0200, Mauro Carvalho Chehab wrote:
> > From: Mauro Carvalho Chehab <mchehab at kernel.org>
> > 
> > As regular expressions are now case-insensitive, change an
> > unit test to verify that case-insensitive logic is working
> > as expected.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
> > ---
> >  runner/runner_tests.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/runner/runner_tests.c b/runner/runner_tests.c
> > index 11ff05bc0e7e..c35668bc8f0e 100644
> > --- a/runner/runner_tests.c
> > +++ b/runner/runner_tests.c
> > @@ -1812,7 +1812,7 @@ igt_main
> >  
> >  	igt_subtest_group {
> >  		const char testlisttext[] = "igt at successtest";
> > -		const char blocktext[] = "igt at successtest@first";
> > +		const char blocktext[] = "igt at successTEST@first";
> 
> Please make a separate test for this, also add Petri on Cc.
> You can also consider upper-case test names (or subtests).

Adding more than one test for case-insensitive regex is probably
overkill, as we don't want to check if glib is doing the right
thing. We just want to ensure that no regressions on IGT will
happen if one ever changes the arguments for g_regex_new() call
for blacklists at runner/settings.c.

Just sent a refresh of this one adding a new test instead of
modifying an existing one.

> 
> Regards,
> Kamil
> 
> >  		struct job_list *list = malloc(sizeof(*list));
> >  		volatile int dirfd = -1;
> >  		char dirname[] = "tmpdirXXXXXX";
> > -- 
> > 2.41.0
> > 


More information about the igt-dev mailing list