All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
@ 2021-10-08  4:29 Stephen Rothwell
  2021-10-08 16:31 ` Shuah Khan
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2021-10-08  4:29 UTC (permalink / raw)
  To: Shuah Khan, Brendan Higgins
  Cc: Daniel Latypov, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2490 bytes --]

Hi all,

Today's linux-next merge of the kunit-next tree got a conflict in:

  tools/testing/kunit/kunit.py

between commit:

  d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")

from the kunit-fixes tree and commit:

  6710951ee039 ("kunit: tool: support running each suite/test separately")

from the kunit-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/kunit/kunit.py
index ac35c61f65f5,7197e5fb8342..000000000000
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@@ -16,9 -17,8 +17,8 @@@ assert sys.version_info >= (3, 7), "Pyt
  
  from collections import namedtuple
  from enum import Enum, auto
- from typing import Iterable, Sequence
 -from typing import Iterable, List
++from typing import Iterable, Sequence, List
  
- import kunit_config
  import kunit_json
  import kunit_kernel
  import kunit_parser
@@@ -184,28 -231,8 +231,28 @@@ def run_tests(linux: kunit_kernel.Linux
  				config_result.elapsed_time,
  				build_result.elapsed_time,
  				exec_result.elapsed_time))
- 	return parse_result
+ 	return exec_result
  
 +# Problem:
 +# $ kunit.py run --json
 +# works as one would expect and prints the parsed test results as JSON.
 +# $ kunit.py run --json suite_name
 +# would *not* pass suite_name as the filter_glob and print as json.
 +# argparse will consider it to be another way of writing
 +# $ kunit.py run --json=suite_name
 +# i.e. it would run all tests, and dump the json to a `suite_name` file.
 +# So we hackily automatically rewrite --json => --json=stdout
 +pseudo_bool_flag_defaults = {
 +		'--json': 'stdout',
 +		'--raw_output': 'kunit',
 +}
 +def massage_argv(argv: Sequence[str]) -> Sequence[str]:
 +	def massage_arg(arg: str) -> str:
 +		if arg not in pseudo_bool_flag_defaults:
 +			return arg
 +		return  f'{arg}={pseudo_bool_flag_defaults[arg]}'
 +	return list(map(massage_arg, argv))
 +
  def add_common_opts(parser) -> None:
  	parser.add_argument('--build_dir',
  			    help='As in the make command, it specifies the build '

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-08  4:29 linux-next: manual merge of the kunit-next tree with the kunit-fixes tree Stephen Rothwell
@ 2021-10-08 16:31 ` Shuah Khan
  2021-10-08 20:03   ` Brendan Higgins
  2021-10-19 21:26   ` Shuah Khan
  0 siblings, 2 replies; 11+ messages in thread
From: Shuah Khan @ 2021-10-08 16:31 UTC (permalink / raw)
  To: Stephen Rothwell, Brendan Higgins
  Cc: Daniel Latypov, Linux Kernel Mailing List,
	Linux Next Mailing List, Shuah Khan

On 10/7/21 10:29 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the kunit-next tree got a conflict in:
> 
>    tools/testing/kunit/kunit.py
> 
> between commit:
> 
>    d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")
> 
> from the kunit-fixes tree and commit:
> 
>    6710951ee039 ("kunit: tool: support running each suite/test separately")
> 
> from the kunit-next tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 

Thank you for the fixing it up. I will fix this up in the kunit-next once
the kunit-fixes pull request goes out.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-08 16:31 ` Shuah Khan
@ 2021-10-08 20:03   ` Brendan Higgins
  2021-10-08 20:48     ` Daniel Latypov
  2021-10-19 21:26   ` Shuah Khan
  1 sibling, 1 reply; 11+ messages in thread
From: Brendan Higgins @ 2021-10-08 20:03 UTC (permalink / raw)
  To: Daniel Latypov
  Cc: Shuah Khan, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Fri, Oct 8, 2021 at 9:31 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 10/7/21 10:29 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the kunit-next tree got a conflict in:
> >
> >    tools/testing/kunit/kunit.py
> >
> > between commit:
> >
> >    d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")
> >
> > from the kunit-fixes tree and commit:
> >
> >    6710951ee039 ("kunit: tool: support running each suite/test separately")
> >
> > from the kunit-next tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
>
> Thank you for the fixing it up. I will fix this up in the kunit-next once
> the kunit-fixes pull request goes out.

Thanks for taking care of this everyone.

Daniel, can you double check the merge conflict to make sure it is
done correctly?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-08 20:03   ` Brendan Higgins
@ 2021-10-08 20:48     ` Daniel Latypov
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Latypov @ 2021-10-08 20:48 UTC (permalink / raw)
  To: Brendan Higgins
  Cc: Shuah Khan, Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Fri, Oct 8, 2021 at 1:03 PM Brendan Higgins
<brendanhiggins@google.com> wrote:
>
> On Fri, Oct 8, 2021 at 9:31 AM Shuah Khan <skhan@linuxfoundation.org> wrote:
> >
> > On 10/7/21 10:29 PM, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Today's linux-next merge of the kunit-next tree got a conflict in:
> > >
> > >    tools/testing/kunit/kunit.py
> > >
> > > between commit:
> > >
> > >    d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")
> > >
> > > from the kunit-fixes tree and commit:
> > >
> > >    6710951ee039 ("kunit: tool: support running each suite/test separately")
> > >
> > > from the kunit-next tree.
> > >
> > > I fixed it up (see below) and can carry the fix as necessary. This
> > > is now fixed as far as linux-next is concerned, but any non trivial
> > > conflicts should be mentioned to your upstream maintainer when your tree
> > > is submitted for merging.  You may also want to consider cooperating
> > > with the maintainer of the conflicting tree to minimise any particularly
> > > complex conflicts.
> > >
> >
> > Thank you for the fixing it up. I will fix this up in the kunit-next once
> > the kunit-fixes pull request goes out.
>
> Thanks for taking care of this everyone.
>
> Daniel, can you double check the merge conflict to make sure it is
> done correctly?

Looks good to me.
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/tools/testing/kunit/kunit.py

Not sure if I'm parsing the 3-way diff properly, but it looks like
it's just the typing import and the fact we added some code right
below run_tests(), which got changed.
So yeah, the combined Typing import and telling git it's being
paranoid about run_tests and massage_argv seems fine.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-08 16:31 ` Shuah Khan
  2021-10-08 20:03   ` Brendan Higgins
@ 2021-10-19 21:26   ` Shuah Khan
  2021-10-19 21:40     ` Daniel Latypov
  2021-10-19 22:20     ` Stephen Rothwell
  1 sibling, 2 replies; 11+ messages in thread
From: Shuah Khan @ 2021-10-19 21:26 UTC (permalink / raw)
  To: Stephen Rothwell, Daniel Latypov
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Shuah Khan,
	Brendan Higgins, Shuah Khan

On 10/8/21 10:31 AM, Shuah Khan wrote:
> On 10/7/21 10:29 PM, Stephen Rothwell wrote:
>> Hi all,
>>
>> Today's linux-next merge of the kunit-next tree got a conflict in:
>>
>>    tools/testing/kunit/kunit.py
>>
>> between commit:
>>
>>    d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")
>>
>> from the kunit-fixes tree and commit:
>>
>>    6710951ee039 ("kunit: tool: support running each suite/test separately")
>>
>> from the kunit-next tree.
>>
>> I fixed it up (see below) and can carry the fix as necessary. This
>> is now fixed as far as linux-next is concerned, but any non trivial
>> conflicts should be mentioned to your upstream maintainer when your tree
>> is submitted for merging.  You may also want to consider cooperating
>> with the maintainer of the conflicting tree to minimise any particularly
>> complex conflicts.
>>
> 
> Thank you for the fixing it up. I will fix this up in the kunit-next once
> the kunit-fixes pull request goes out.
> 

I fixed the merge conflict in kunit-next tree after rebase to Linux 5.15-rc6.
There is no need to carry this fix.

Daniel! Please review to see if it looks good. It was very minor fix-up.

- from typing import Iterable, Sequence
  -from typing import Iterable, List
++from typing import Iterable, Sequence, List

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-19 21:26   ` Shuah Khan
@ 2021-10-19 21:40     ` Daniel Latypov
  2021-10-19 22:20     ` Stephen Rothwell
  1 sibling, 0 replies; 11+ messages in thread
From: Daniel Latypov @ 2021-10-19 21:40 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List, Brendan Higgins

On Tue, Oct 19, 2021 at 2:26 PM Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> On 10/8/21 10:31 AM, Shuah Khan wrote:
> > On 10/7/21 10:29 PM, Stephen Rothwell wrote:
> >> Hi all,
> >>
> >> Today's linux-next merge of the kunit-next tree got a conflict in:
> >>
> >>    tools/testing/kunit/kunit.py
> >>
> >> between commit:
> >>
> >>    d8c23ead708b ("kunit: tool: better handling of quasi-bool args (--json, --raw_output)")
> >>
> >> from the kunit-fixes tree and commit:
> >>
> >>    6710951ee039 ("kunit: tool: support running each suite/test separately")
> >>
> >> from the kunit-next tree.
> >>
> >> I fixed it up (see below) and can carry the fix as necessary. This
> >> is now fixed as far as linux-next is concerned, but any non trivial
> >> conflicts should be mentioned to your upstream maintainer when your tree
> >> is submitted for merging.  You may also want to consider cooperating
> >> with the maintainer of the conflicting tree to minimise any particularly
> >> complex conflicts.
> >>
> >
> > Thank you for the fixing it up. I will fix this up in the kunit-next once
> > the kunit-fixes pull request goes out.
> >
>
> I fixed the merge conflict in kunit-next tree after rebase to Linux 5.15-rc6.
> There is no need to carry this fix.
>
> Daniel! Please review to see if it looks good. It was very minor fix-up.

ff9e09a3762fbd7aba83cfd1530972b57ae52b3b looks good to me.
Thanks, Shuah!

To be extra safe, I checked

Test that test-level filtering and hermetic testing work as expected
$ ./tools/testing/kunit/kunit.py run --run_isolated=suite '*ex*.*skipped*'
$ ./tools/testing/kunit/kunit.py run --run_isolated=suite '*ex*.*s[iu]*'

kunit.py's unit test:
$ ./tools/testing/kunit/kunit_tool_test.py

Type-checkers:
$ pytype ./tools/testing/kunit/*.py
$ mypy ./tools/testing/kunit/*.py  # this had the expected errors

>
> - from typing import Iterable, Sequence
>   -from typing import Iterable, List
> ++from typing import Iterable, Sequence, List
>
> thanks,
> -- Shuah
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2021-10-19 21:26   ` Shuah Khan
  2021-10-19 21:40     ` Daniel Latypov
@ 2021-10-19 22:20     ` Stephen Rothwell
  1 sibling, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2021-10-19 22:20 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Stephen Rothwell, Daniel Latypov, Linux Kernel Mailing List,
	Linux Next Mailing List, Brendan Higgins

[-- Attachment #1: Type: text/plain, Size: 594 bytes --]

Hi Shuah,

On Tue, 19 Oct 2021 15:26:40 -0600 Shuah Khan <skhan@linuxfoundation.org> wrote:
>
> I fixed the merge conflict in kunit-next tree after rebase to Linux 5.15-rc6.
> There is no need to carry this fix.
> 
> Daniel! Please review to see if it looks good. It was very minor fix-up.

There was really no need to rebase.  A simple merge of the kunit-fixes
tree into the kunit-next tree would has sufficed, maintained history
and allowed a place for an explanation.  Or you could have mentioned
the conflict to Linus during the merge window.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2023-02-01  4:31 ` David Gow
@ 2023-02-01  5:37   ` Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2023-02-01  5:37 UTC (permalink / raw)
  To: David Gow
  Cc: Shuah Khan, Brendan Higgins, Arnd Bergmann,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

Hi David,

On Wed, 1 Feb 2023 12:31:49 +0800 David Gow <davidgow@google.com> wrote:
>
> As you noted, the "hooks" patch is meant to supersede "kunit: Export
> kunit_running()", which is really meant as a fix for older kernels
> which won't get the "hooks" patch.
> 
> I imagine we'll rebase this once the fixes go upstream.

Or just merge what you ask Linus to merge, for a minimal change.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
  2023-02-01  2:49 Stephen Rothwell
@ 2023-02-01  4:31 ` David Gow
  2023-02-01  5:37   ` Stephen Rothwell
  0 siblings, 1 reply; 11+ messages in thread
From: David Gow @ 2023-02-01  4:31 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Shuah Khan, Brendan Higgins, Arnd Bergmann,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]

On Wed, 1 Feb 2023 at 10:49, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> Today's linux-next merge of the kunit-next tree got a conflict in:
>
>   lib/kunit/test.c
>
> between commit:
>
>   db105c37a4d6 ("kunit: Export kunit_running()")
>
> from the kunit-fixes tree and commit:
>
>   cc3ed2fe5c93 ("kunit: Add "hooks" to call into KUnit when it's built as a module")
>
> from the kunit-next tree.
>
> I fixed it up (the latter incorporated the former) and can carry the
> fix as necessary. This is now fixed as far as linux-next is concerned,
> but any non trivial conflicts should be mentioned to your upstream
> maintainer when your tree is submitted for merging.  You may also want
> to consider cooperating with the maintainer of the conflicting tree to
> minimise any particularly complex conflicts.
>

Thanks!

As you noted, the "hooks" patch is meant to supersede "kunit: Export
kunit_running()", which is really meant as a fix for older kernels
which won't get the "hooks" patch.

I imagine we'll rebase this once the fixes go upstream.

Cheers,
-- David

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4003 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
@ 2023-02-01  2:49 Stephen Rothwell
  2023-02-01  4:31 ` David Gow
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2023-02-01  2:49 UTC (permalink / raw)
  To: Shuah Khan, Brendan Higgins
  Cc: Arnd Bergmann, David Gow, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 766 bytes --]

Hi all,

Today's linux-next merge of the kunit-next tree got a conflict in:

  lib/kunit/test.c

between commit:

  db105c37a4d6 ("kunit: Export kunit_running()")

from the kunit-fixes tree and commit:

  cc3ed2fe5c93 ("kunit: Add "hooks" to call into KUnit when it's built as a module")

from the kunit-next tree.

I fixed it up (the latter incorporated the former) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* linux-next: manual merge of the kunit-next tree with the kunit-fixes tree
@ 2022-11-01  3:31 Stephen Rothwell
  0 siblings, 0 replies; 11+ messages in thread
From: Stephen Rothwell @ 2022-11-01  3:31 UTC (permalink / raw)
  To: Shuah Khan, Brendan Higgins
  Cc: Dan Carpenter, Dan Carpenter, Linux Kernel Mailing List,
	Linux Next Mailing List, YoungJun.park

[-- Attachment #1: Type: text/plain, Size: 779 bytes --]

Hi all,

Today's linux-next merge of the kunit-next tree got a conflict in:

  lib/kunit/string-stream.c

between commit:

  618887768bb7 ("kunit: update NULL vs IS_ERR() tests")

from the kunit-fixes tree and commit:

  29ad37f740d3 ("kunit: alloc_string_stream_fragment error handling bug fix")

from the kunit-next tree.

I fixed it up (I used the former part of the conflict) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-01  5:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  4:29 linux-next: manual merge of the kunit-next tree with the kunit-fixes tree Stephen Rothwell
2021-10-08 16:31 ` Shuah Khan
2021-10-08 20:03   ` Brendan Higgins
2021-10-08 20:48     ` Daniel Latypov
2021-10-19 21:26   ` Shuah Khan
2021-10-19 21:40     ` Daniel Latypov
2021-10-19 22:20     ` Stephen Rothwell
2022-11-01  3:31 Stephen Rothwell
2023-02-01  2:49 Stephen Rothwell
2023-02-01  4:31 ` David Gow
2023-02-01  5:37   ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.