* [PATCH] kbuild: teach kselftest-merge to find nested config files @ 2019-05-20 15:16 Dan Rue 2019-05-20 17:56 ` Greg KH 2019-06-04 17:30 ` Masahiro Yamada 0 siblings, 2 replies; 5+ messages in thread From: Dan Rue @ 2019-05-20 15:16 UTC (permalink / raw) To: dan.rue Cc: linux-kselftest, Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel Current implementation of kselftest-merge only finds config files that are one level deep using `$(srctree)/tools/testing/selftests/*/config`. Often, config files are added in nested directories, and do not get picked up by kselftest-merge. Use `find` to catch all config files under `$(srctree)/tools/testing/selftests` instead. Signed-off-by: Dan Rue <dan.rue@linaro.org> --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a45f84a7e811..e99e7f9484af 100644 --- a/Makefile +++ b/Makefile @@ -1228,9 +1228,8 @@ kselftest-clean: PHONY += kselftest-merge kselftest-merge: $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!)) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ - -m $(objtree)/.config \ - $(srctree)/tools/testing/selftests/*/config + $(Q)find $(srctree)/tools/testing/selftests -name config | \ + xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig # --------------------------------------------------------------------------- -- 2.21.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: teach kselftest-merge to find nested config files 2019-05-20 15:16 [PATCH] kbuild: teach kselftest-merge to find nested config files Dan Rue @ 2019-05-20 17:56 ` Greg KH 2019-05-30 19:00 ` Dan Rue 2019-06-04 17:30 ` Masahiro Yamada 1 sibling, 1 reply; 5+ messages in thread From: Greg KH @ 2019-05-20 17:56 UTC (permalink / raw) To: Dan Rue Cc: linux-kselftest, Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel On Mon, May 20, 2019 at 10:16:14AM -0500, Dan Rue wrote: > Current implementation of kselftest-merge only finds config files that > are one level deep using `$(srctree)/tools/testing/selftests/*/config`. > > Often, config files are added in nested directories, and do not get > picked up by kselftest-merge. > > Use `find` to catch all config files under > `$(srctree)/tools/testing/selftests` instead. > > Signed-off-by: Dan Rue <dan.rue@linaro.org> > --- > Makefile | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) To be more specific here, the binderfs test is not catching the config entry, so it would be nice to get this into the stable trees as well :) > diff --git a/Makefile b/Makefile > index a45f84a7e811..e99e7f9484af 100644 > --- a/Makefile > +++ b/Makefile > @@ -1228,9 +1228,8 @@ kselftest-clean: > PHONY += kselftest-merge > kselftest-merge: > $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!)) > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ > - -m $(objtree)/.config \ > - $(srctree)/tools/testing/selftests/*/config > + $(Q)find $(srctree)/tools/testing/selftests -name config | \ > + xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig > > # --------------------------------------------------------------------------- is find run with $(Q)? It isn't with other instances in the Makefile. thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: teach kselftest-merge to find nested config files 2019-05-20 17:56 ` Greg KH @ 2019-05-30 19:00 ` Dan Rue 2019-05-31 1:52 ` Masahiro Yamada 0 siblings, 1 reply; 5+ messages in thread From: Dan Rue @ 2019-05-30 19:00 UTC (permalink / raw) To: Greg KH Cc: linux-kselftest, Masahiro Yamada, Michal Marek, linux-kbuild, linux-kernel On Mon, May 20, 2019 at 07:56:41PM +0200, Greg KH wrote: > On Mon, May 20, 2019 at 10:16:14AM -0500, Dan Rue wrote: > > Current implementation of kselftest-merge only finds config files that > > are one level deep using `$(srctree)/tools/testing/selftests/*/config`. > > > > Often, config files are added in nested directories, and do not get > > picked up by kselftest-merge. > > > > Use `find` to catch all config files under > > `$(srctree)/tools/testing/selftests` instead. > > > > Signed-off-by: Dan Rue <dan.rue@linaro.org> > > --- > > Makefile | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > To be more specific here, the binderfs test is not catching the config > entry, so it would be nice to get this into the stable trees as well :) > > > diff --git a/Makefile b/Makefile > > index a45f84a7e811..e99e7f9484af 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1228,9 +1228,8 @@ kselftest-clean: > > PHONY += kselftest-merge > > kselftest-merge: > > $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!)) > > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ > > - -m $(objtree)/.config \ > > - $(srctree)/tools/testing/selftests/*/config > > + $(Q)find $(srctree)/tools/testing/selftests -name config | \ > > + xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config > > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig > > > > # --------------------------------------------------------------------------- > > is find run with $(Q)? It isn't with other instances in the Makefile. I'm not entirely sure all the ways that $(Q) is used (it looks like it just gets set to @), but if i run 'KBUILD_VERBOSE=1 make kselftest-merge' I do see the find command printed before running: find ./tools/testing/selftests -name config | \ xargs ./scripts/kconfig/merge_config.sh -m ./.config I noticed find used inconsistently (sometimes with @, sometimes with $(Q), sometimes with neither), so I picked the usage that seemed most correct to me. Dan > > thanks, > > greg k-h -- Linaro - Kernel Validation ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: teach kselftest-merge to find nested config files 2019-05-30 19:00 ` Dan Rue @ 2019-05-31 1:52 ` Masahiro Yamada 0 siblings, 0 replies; 5+ messages in thread From: Masahiro Yamada @ 2019-05-31 1:52 UTC (permalink / raw) To: Dan Rue Cc: Greg KH, open list:KERNEL SELFTEST FRAMEWORK, Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List On Fri, May 31, 2019 at 4:00 AM Dan Rue <dan.rue@linaro.org> wrote: > > On Mon, May 20, 2019 at 07:56:41PM +0200, Greg KH wrote: > > On Mon, May 20, 2019 at 10:16:14AM -0500, Dan Rue wrote: > > > Current implementation of kselftest-merge only finds config files that > > > are one level deep using `$(srctree)/tools/testing/selftests/*/config`. > > > > > > Often, config files are added in nested directories, and do not get > > > picked up by kselftest-merge. > > > > > > Use `find` to catch all config files under > > > `$(srctree)/tools/testing/selftests` instead. > > > > > > Signed-off-by: Dan Rue <dan.rue@linaro.org> > > > --- > > > Makefile | 5 ++--- > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > To be more specific here, the binderfs test is not catching the config > > entry, so it would be nice to get this into the stable trees as well :) > > > > > diff --git a/Makefile b/Makefile > > > index a45f84a7e811..e99e7f9484af 100644 > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -1228,9 +1228,8 @@ kselftest-clean: > > > PHONY += kselftest-merge > > > kselftest-merge: > > > $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!)) > > > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ > > > - -m $(objtree)/.config \ > > > - $(srctree)/tools/testing/selftests/*/config > > > + $(Q)find $(srctree)/tools/testing/selftests -name config | \ > > > + xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config > > > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig > > > > > > # --------------------------------------------------------------------------- > > > > is find run with $(Q)? It isn't with other instances in the Makefile. > > I'm not entirely sure all the ways that $(Q) is used (it looks like it > just gets set to @), but if i run 'KBUILD_VERBOSE=1 make > kselftest-merge' I do see the find command printed before running: > > find ./tools/testing/selftests -name config | \ > xargs ./scripts/kconfig/merge_config.sh -m ./.config > > I noticed find used inconsistently (sometimes with @, sometimes with > $(Q), sometimes with neither), so I picked the usage that seemed most > correct to me. I agree. Using $(Q) looks correct to me. > Dan > > > > > thanks, > > > > greg k-h > > -- > Linaro - Kernel Validation -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kbuild: teach kselftest-merge to find nested config files 2019-05-20 15:16 [PATCH] kbuild: teach kselftest-merge to find nested config files Dan Rue 2019-05-20 17:56 ` Greg KH @ 2019-06-04 17:30 ` Masahiro Yamada 1 sibling, 0 replies; 5+ messages in thread From: Masahiro Yamada @ 2019-06-04 17:30 UTC (permalink / raw) To: Dan Rue Cc: open list:KERNEL SELFTEST FRAMEWORK, Michal Marek, Linux Kbuild mailing list, Linux Kernel Mailing List On Tue, May 21, 2019 at 12:19 AM Dan Rue <dan.rue@linaro.org> wrote: > > Current implementation of kselftest-merge only finds config files that > are one level deep using `$(srctree)/tools/testing/selftests/*/config`. > > Often, config files are added in nested directories, and do not get > picked up by kselftest-merge. > > Use `find` to catch all config files under > `$(srctree)/tools/testing/selftests` instead. > > Signed-off-by: Dan Rue <dan.rue@linaro.org> > --- > Makefile | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index a45f84a7e811..e99e7f9484af 100644 > --- a/Makefile > +++ b/Makefile > @@ -1228,9 +1228,8 @@ kselftest-clean: > PHONY += kselftest-merge > kselftest-merge: > $(if $(wildcard $(objtree)/.config),, $(error No .config exists, config your kernel first!)) > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ > - -m $(objtree)/.config \ > - $(srctree)/tools/testing/selftests/*/config > + $(Q)find $(srctree)/tools/testing/selftests -name config | \ > + xargs $(srctree)/scripts/kconfig/merge_config.sh -m $(objtree)/.config > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig > > # --------------------------------------------------------------------------- > -- > 2.21.0 > Applied to linux-kbuild/fixes. Thanks. -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-04 17:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-05-20 15:16 [PATCH] kbuild: teach kselftest-merge to find nested config files Dan Rue 2019-05-20 17:56 ` Greg KH 2019-05-30 19:00 ` Dan Rue 2019-05-31 1:52 ` Masahiro Yamada 2019-06-04 17:30 ` Masahiro Yamada
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).