linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next
@ 2024-02-15 18:12 Marcos Paulo de Souza
  2024-02-15 18:12 ` [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR Marcos Paulo de Souza
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-15 18:12 UTC (permalink / raw)
  To: Shuah Khan, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence
  Cc: linux-kselftest, linux-kernel, live-patching, Marcos Paulo de Souza

The changes doesn't change the current functionality. The changes on
lib.mk are both for simplification and also clarification, like in the
case of not handling TEST_GEN_MODS_DIR directly.

These changes apply on top of the current kselftest-next branch. Please
review!

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
Marcos Paulo de Souza (3):
      selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
      selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
      selftests: livepatch: Add initial .gitignore

 tools/testing/selftests/lib.mk               | 19 +++++++------------
 tools/testing/selftests/livepatch/.gitignore |  1 +
 2 files changed, 8 insertions(+), 12 deletions(-)
---
base-commit: 345e8abe4c355bc24bab3f4a5634122e55be8665
change-id: 20240215-lp-selftests-fixes-7d4bab3c0712

Best regards,
-- 
Marcos Paulo de Souza <mpdesouza@suse.com>


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

* [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-15 18:12 [PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next Marcos Paulo de Souza
@ 2024-02-15 18:12 ` Marcos Paulo de Souza
  2024-02-19  6:35   ` kernel test robot
  2024-02-15 18:12 ` [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling Marcos Paulo de Souza
  2024-02-15 18:12 ` [PATCH 3/3] selftests: livepatch: Add initial .gitignore Marcos Paulo de Souza
  2 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-15 18:12 UTC (permalink / raw)
  To: Shuah Khan, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence
  Cc: linux-kselftest, linux-kernel, live-patching, Marcos Paulo de Souza

The directory itself doesn't need have path handling, since it's only to
mean where is the directory that contains modules to be built.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 tools/testing/selftests/lib.mk | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 0d8b7db92715..286ce0ee102b 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -54,12 +54,9 @@ endif
 # TEST_PROGS are for test shell scripts.
 # TEST_CUSTOM_PROGS and TEST_PROGS will be run by common run_tests
 # and install targets. Common clean doesn't touch them.
-# TEST_GEN_MODS_DIR is used to specify a directory with modules to be built
-# before the test executes. These modules are cleaned on the clean target as well.
 TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS))
 TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED))
 TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES))
-TEST_GEN_MODS_DIR := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_MODS_DIR))
 
 all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) \
 	$(if $(TEST_GEN_MODS_DIR),gen_mods_dir)

-- 
2.42.1


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

* [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
  2024-02-15 18:12 [PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next Marcos Paulo de Souza
  2024-02-15 18:12 ` [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR Marcos Paulo de Souza
@ 2024-02-15 18:12 ` Marcos Paulo de Souza
  2024-02-19  7:16   ` kernel test robot
  2024-02-15 18:12 ` [PATCH 3/3] selftests: livepatch: Add initial .gitignore Marcos Paulo de Souza
  2 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-15 18:12 UTC (permalink / raw)
  To: Shuah Khan, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence
  Cc: linux-kselftest, linux-kernel, live-patching, Marcos Paulo de Souza

We don't need new targets only to run two make modules and make clean.
We can test if TEST_GEN_MODS_DIR is specified, and then run the
commands.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 tools/testing/selftests/lib.mk | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 286ce0ee102b..eddcd4a849dc 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -58,8 +58,9 @@ TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS))
 TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED))
 TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES))
 
-all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) \
-	$(if $(TEST_GEN_MODS_DIR),gen_mods_dir)
+all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
+	$(if $(TEST_GEN_MODS_DIR), \
+		$(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR))
 
 define RUN_TESTS
 	BASE_DIR="$(selfdir)";			\
@@ -85,11 +86,6 @@ else
 	@$(call RUN_TESTS, $(TEST_GEN_PROGS) $(TEST_CUSTOM_PROGS) $(TEST_PROGS))
 endif
 
-gen_mods_dir:
-	$(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR)
-
-clean_mods_dir:
-	$(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR) clean
 
 define INSTALL_SINGLE_RULE
 	$(if $(INSTALL_LIST),@mkdir -p $(INSTALL_PATH))
@@ -133,9 +129,11 @@ endif
 
 define CLEAN
 	$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
+	$(if $(TEST_GEN_MODS_DIR), \
+		$(Q)$(MAKE) -C $(TEST_GEN_MODS_DIR) clean)
 endef
 
-clean: $(if $(TEST_GEN_MODS_DIR),clean_mods_dir)
+clean:
 	$(CLEAN)
 
 # Enables to extend CFLAGS and LDFLAGS from command line, e.g.
@@ -166,4 +164,4 @@ $(OUTPUT)/%:%.S
 	$(LINK.S) $^ $(LDLIBS) -o $@
 endif
 
-.PHONY: run_tests all clean install emit_tests gen_mods_dir clean_mods_dir
+.PHONY: run_tests all clean install emit_tests

-- 
2.42.1


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

* [PATCH 3/3] selftests: livepatch: Add initial .gitignore
  2024-02-15 18:12 [PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next Marcos Paulo de Souza
  2024-02-15 18:12 ` [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR Marcos Paulo de Souza
  2024-02-15 18:12 ` [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling Marcos Paulo de Souza
@ 2024-02-15 18:12 ` Marcos Paulo de Souza
  2 siblings, 0 replies; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-15 18:12 UTC (permalink / raw)
  To: Shuah Khan, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence
  Cc: linux-kselftest, linux-kernel, live-patching, Marcos Paulo de Souza

Ignore the binary used to test livepatching a syscall.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 tools/testing/selftests/livepatch/.gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/livepatch/.gitignore b/tools/testing/selftests/livepatch/.gitignore
new file mode 100644
index 000000000000..f1e9c2a20e99
--- /dev/null
+++ b/tools/testing/selftests/livepatch/.gitignore
@@ -0,0 +1 @@
+test_klp-call_getpid

-- 
2.42.1


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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-15 18:12 ` [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR Marcos Paulo de Souza
@ 2024-02-19  6:35   ` kernel test robot
  2024-02-19 12:15     ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: kernel test robot @ 2024-02-19  6:35 UTC (permalink / raw)
  To: Marcos Paulo de Souza, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence
  Cc: oe-kbuild-all, linux-kselftest, linux-kernel, live-patching,
	Marcos Paulo de Souza

Hi Marcos,

kernel test robot noticed the following build errors:

[auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]

url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
base:   345e8abe4c355bc24bab3f4a5634122e55be8665
patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/

All errors (new ones prefixed by >>):

>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
  2024-02-15 18:12 ` [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling Marcos Paulo de Souza
@ 2024-02-19  7:16   ` kernel test robot
  2024-02-21 12:29     ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: kernel test robot @ 2024-02-19  7:16 UTC (permalink / raw)
  To: Marcos Paulo de Souza, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence
  Cc: oe-kbuild-all, linux-kselftest, linux-kernel, live-patching,
	Marcos Paulo de Souza

Hi Marcos,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 345e8abe4c355bc24bab3f4a5634122e55be8665]

url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
base:   345e8abe4c355bc24bab3f4a5634122e55be8665
patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-2-89f4a6f5cddc%40suse.com
patch subject: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191502.dALlSRz0-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402191502.dALlSRz0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> Makefile:11: warning: overriding recipe for target 'all'
>> ../lib.mk:62: warning: ignoring old recipe for target 'all'
   make[1]: *** [../lib.mk:62: all] Error 2
   Makefile:65: warning: overriding recipe for target 'emit_tests'
   ../lib.mk:120: warning: ignoring old recipe for target 'emit_tests'
   make[1]: *** No targets.  Stop.
   make[1]: *** No targets.  Stop.
   make[1]: *** No targets.  Stop.


vim +/all +11 Makefile

^1da177e4c3f41 Linus Torvalds 2005-04-16   7  
^1da177e4c3f41 Linus Torvalds 2005-04-16   8  # *DOCUMENTATION*
^1da177e4c3f41 Linus Torvalds 2005-04-16   9  # To see a list of typical targets execute "make help"
^1da177e4c3f41 Linus Torvalds 2005-04-16  10  # More info can be located in ./README
^1da177e4c3f41 Linus Torvalds 2005-04-16 @11  # Comments in this file are targeted only to the developer, do not
^1da177e4c3f41 Linus Torvalds 2005-04-16  12  # expect to learn how to build the kernel reading this file.
^1da177e4c3f41 Linus Torvalds 2005-04-16  13  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-19  6:35   ` kernel test robot
@ 2024-02-19 12:15     ` Marcos Paulo de Souza
  2024-02-19 13:53       ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-19 12:15 UTC (permalink / raw)
  To: kernel test robot
  Cc: Marcos Paulo de Souza, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence, oe-kbuild-all,
	linux-kselftest, linux-kernel, live-patching

On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:

> Hi Marcos,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> >> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.

We should ask the kernel test robot machine owners to install kernel-devel
package in order to have this fixed.

> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-19 12:15     ` Marcos Paulo de Souza
@ 2024-02-19 13:53       ` Marcos Paulo de Souza
  2024-02-21  0:19         ` Shuah Khan
  0 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-19 13:53 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: kernel test robot, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence, oe-kbuild-all,
	linux-kselftest, linux-kernel, live-patching

On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:

> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > Hi Marcos,
> > 
> > kernel test robot noticed the following build errors:
> > 
> > [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> > 
> > url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> > base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> > patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> > patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> > >> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> 
> We should ask the kernel test robot machine owners to install kernel-devel
> package in order to have this fixed.

Or maybe ask them to change the reproducer to specify KDIR to the git tree,
instead of /lib/modules/?

> 
> > 
> > -- 
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-19 13:53       ` Marcos Paulo de Souza
@ 2024-02-21  0:19         ` Shuah Khan
  2024-02-21 12:26           ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: Shuah Khan @ 2024-02-21  0:19 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: kernel test robot, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, oe-kbuild-all, linux-kselftest,
	linux-kernel, live-patching, Shuah Khan

On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> 
>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
>>
>>> Hi Marcos,
>>>
>>> kernel test robot noticed the following build errors:
>>>
>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
>>>
>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
>>>
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
>>
>> We should ask the kernel test robot machine owners to install kernel-devel
>> package in order to have this fixed.
> 
> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> instead of /lib/modules/?
> 

This would be a regression to automated test rings. Do you have any other
solutions?

We could remove livepatch from default test until these changes are made
to test ring environments?

thanks,
-- Shuah


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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-21  0:19         ` Shuah Khan
@ 2024-02-21 12:26           ` Marcos Paulo de Souza
  2024-02-21 21:12             ` Shuah Khan
  0 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-21 12:26 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Marcos Paulo de Souza, kernel test robot, Josh Poimboeuf,
	Jiri Kosina, Miroslav Benes, Petr Mladek, Joe Lawrence,
	oe-kbuild-all, linux-kselftest, linux-kernel, live-patching

On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:

> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> > On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> > 
> >> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> >>
> >>> Hi Marcos,
> >>>
> >>> kernel test robot noticed the following build errors:
> >>>
> >>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> >>>
> >>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> >>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> >>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> >>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> >>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> >>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> >>>
> >>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >>> the same patch/commit), kindly add following tags
> >>> | Reported-by: kernel test robot <lkp@intel.com>
> >>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> >>>
> >>> All errors (new ones prefixed by >>):
> >>>
> >>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> >>
> >> We should ask the kernel test robot machine owners to install kernel-devel
> >> package in order to have this fixed.
> > 
> > Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> > instead of /lib/modules/?
> > 
> 
> This would be a regression to automated test rings. Do you have any other
> solutions?

I would say that we could skip the these tests if kernel-devel package is not
installed. Would it be acceptable? At least we would avoid such issues like this
in the future as well.

> 
> We could remove livepatch from default test until these changes are made
> to test ring environments?
> 
> thanks,
> -- Shuah

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

* Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
  2024-02-19  7:16   ` kernel test robot
@ 2024-02-21 12:29     ` Marcos Paulo de Souza
  2024-02-23  3:40       ` Yujie Liu
  0 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-21 12:29 UTC (permalink / raw)
  To: kernel test robot
  Cc: Marcos Paulo de Souza, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence, oe-kbuild-all,
	linux-kselftest, linux-kernel, live-patching

On Mon, 19 Feb 2024 15:16:51 +0800 kernel test robot <lkp@intel.com> wrote:

> Hi Marcos,
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-2-89f4a6f5cddc%40suse.com
> patch subject: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191502.dALlSRz0-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191502.dALlSRz0-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
> >> Makefile:11: warning: overriding recipe for target 'all'
> >> ../lib.mk:62: warning: ignoring old recipe for target 'all'
>    make[1]: *** [../lib.mk:62: all] Error 2
>    Makefile:65: warning: overriding recipe for target 'emit_tests'
>    ../lib.mk:120: warning: ignoring old recipe for target 'emit_tests'
>    make[1]: *** No targets.  Stop.
>    make[1]: *** No targets.  Stop.
>    make[1]: *** No targets.  Stop.

I couldn't reproduce this one locally. Shuah, have you seen this issue in your
setup? I followed the steps to reproduce this issue (it's the same sequence
already reported in earlier patches...)

> 
> 
> vim +/all +11 Makefile
> 
> ^1da177e4c3f41 Linus Torvalds 2005-04-16   7  
> ^1da177e4c3f41 Linus Torvalds 2005-04-16   8  # *DOCUMENTATION*
> ^1da177e4c3f41 Linus Torvalds 2005-04-16   9  # To see a list of typical targets execute "make help"
> ^1da177e4c3f41 Linus Torvalds 2005-04-16  10  # More info can be located in ./README
> ^1da177e4c3f41 Linus Torvalds 2005-04-16 @11  # Comments in this file are targeted only to the developer, do not
> ^1da177e4c3f41 Linus Torvalds 2005-04-16  12  # expect to learn how to build the kernel reading this file.
> ^1da177e4c3f41 Linus Torvalds 2005-04-16  13  
> 
> -- 
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-21 12:26           ` Marcos Paulo de Souza
@ 2024-02-21 21:12             ` Shuah Khan
  2024-02-21 22:04               ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: Shuah Khan @ 2024-02-21 21:12 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: kernel test robot, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, oe-kbuild-all, linux-kselftest,
	linux-kernel, live-patching, Shuah Khan

On 2/21/24 05:26, Marcos Paulo de Souza wrote:
> On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> 
>> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
>>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
>>>
>>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
>>>>
>>>>> Hi Marcos,
>>>>>
>>>>> kernel test robot noticed the following build errors:
>>>>>
>>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
>>>>>
>>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
>>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
>>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
>>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
>>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
>>>>>
>>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>>>> the same patch/commit), kindly add following tags
>>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
>>>>>
>>>>> All errors (new ones prefixed by >>):
>>>>>
>>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
>>>>
>>>> We should ask the kernel test robot machine owners to install kernel-devel
>>>> package in order to have this fixed.
>>>
>>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
>>> instead of /lib/modules/?
>>>
>>
>> This would be a regression to automated test rings. Do you have any other
>> solutions?
> 
> I would say that we could skip the these tests if kernel-devel package is not
> installed. Would it be acceptable? At least we would avoid such issues like this
> in the future as well.
> 

We have to check and skip build. Something we could do in the livepatch
Makefile. Can you send patch for this - I will oull this in for next
so we don't break test rings.

thanks,
-- Shuah

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-21 21:12             ` Shuah Khan
@ 2024-02-21 22:04               ` Marcos Paulo de Souza
  2024-02-22  1:28                 ` Yujie Liu
  2024-02-23 22:07                 ` Shuah Khan
  0 siblings, 2 replies; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-21 22:04 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Marcos Paulo de Souza, kernel test robot, Josh Poimboeuf,
	Jiri Kosina, Miroslav Benes, Petr Mladek, Joe Lawrence,
	oe-kbuild-all, linux-kselftest, linux-kernel, live-patching

On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:

> On 2/21/24 05:26, Marcos Paulo de Souza wrote:
> > On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> > 
> >> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> >>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> >>>
> >>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> >>>>
> >>>>> Hi Marcos,
> >>>>>
> >>>>> kernel test robot noticed the following build errors:
> >>>>>
> >>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> >>>>>
> >>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> >>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> >>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> >>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> >>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> >>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> >>>>>
> >>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >>>>> the same patch/commit), kindly add following tags
> >>>>> | Reported-by: kernel test robot <lkp@intel.com>
> >>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> >>>>>
> >>>>> All errors (new ones prefixed by >>):
> >>>>>
> >>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> >>>>
> >>>> We should ask the kernel test robot machine owners to install kernel-devel
> >>>> package in order to have this fixed.
> >>>
> >>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> >>> instead of /lib/modules/?
> >>>
> >>
> >> This would be a regression to automated test rings. Do you have any other
> >> solutions?
> > 
> > I would say that we could skip the these tests if kernel-devel package is not
> > installed. Would it be acceptable? At least we would avoid such issues like this
> > in the future as well.
> > 
> 
> We have to check and skip build. Something we could do in the livepatch
> Makefile. Can you send patch for this - I will oull this in for next
> so we don't break test rings.

I added a new patch in the same patchset that would cover this, skipping the
build and test if kernel-devel is not installed. The patchset was sent earlier
today. Please check if the new patch fixes things on the build robot.

Thanks in advance,
  Marcos

> 
> thanks,
> -- Shuah

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-21 22:04               ` Marcos Paulo de Souza
@ 2024-02-22  1:28                 ` Yujie Liu
  2024-02-22  2:04                   ` Marcos Paulo de Souza
  2024-02-23 22:07                 ` Shuah Khan
  1 sibling, 1 reply; 20+ messages in thread
From: Yujie Liu @ 2024-02-22  1:28 UTC (permalink / raw)
  To: Shuah Khan, Marcos Paulo de Souza
  Cc: kernel test robot, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, oe-kbuild-all, linux-kselftest,
	linux-kernel, live-patching

On Wed, Feb 21, 2024 at 07:04:03PM -0300, Marcos Paulo de Souza wrote:
> On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> 
> > On 2/21/24 05:26, Marcos Paulo de Souza wrote:
> > > On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> > > 
> > >> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> > >>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> > >>>
> > >>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> > >>>>
> > >>>>> Hi Marcos,
> > >>>>>
> > >>>>> kernel test robot noticed the following build errors:
> > >>>>>
> > >>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> > >>>>>
> > >>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> > >>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> > >>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> > >>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> > >>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > >>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> > >>>>>
> > >>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > >>>>> the same patch/commit), kindly add following tags
> > >>>>> | Reported-by: kernel test robot <lkp@intel.com>
> > >>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> > >>>>>
> > >>>>> All errors (new ones prefixed by >>):
> > >>>>>
> > >>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> > >>>>
> > >>>> We should ask the kernel test robot machine owners to install kernel-devel
> > >>>> package in order to have this fixed.
> > >>>
> > >>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> > >>> instead of /lib/modules/?
> > >>>
> > >>
> > >> This would be a regression to automated test rings. Do you have any other
> > >> solutions?
> > > 
> > > I would say that we could skip the these tests if kernel-devel package is not
> > > installed. Would it be acceptable? At least we would avoid such issues like this
> > > in the future as well.
> > > 
> > 
> > We have to check and skip build. Something we could do in the livepatch
> > Makefile. Can you send patch for this - I will oull this in for next
> > so we don't break test rings.
> 
> I added a new patch in the same patchset that would cover this, skipping the
> build and test if kernel-devel is not installed. The patchset was sent earlier
> today. Please check if the new patch fixes things on the build robot.

Hi Shuah, Hi Marcos,

Sorry for this wrong report. The files are organized in a different way
in the bot and cause this issue. We have fixed the bot to explicitly
set KDIR to the correct path before building the selftests. The patch
[1] can also work well in bot's environment.

[1] https://lore.kernel.org/all/20240221-lp-selftests-fixes-v2-2-a19be1e029a7@suse.com/

Best Regards,
Yujie

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-22  1:28                 ` Yujie Liu
@ 2024-02-22  2:04                   ` Marcos Paulo de Souza
  2024-02-23 22:07                     ` Shuah Khan
  0 siblings, 1 reply; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-22  2:04 UTC (permalink / raw)
  To: Yujie Liu
  Cc: Shuah Khan, Marcos Paulo de Souza, kernel test robot,
	Josh Poimboeuf, Jiri Kosina, Miroslav Benes, Petr Mladek,
	Joe Lawrence, oe-kbuild-all, linux-kselftest, linux-kernel,
	live-patching

On Thu, 22 Feb 2024 09:28:19 +0800 Yujie Liu <yujie.liu@intel.com> wrote:

> On Wed, Feb 21, 2024 at 07:04:03PM -0300, Marcos Paulo de Souza wrote:
> > On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> > 
> > > On 2/21/24 05:26, Marcos Paulo de Souza wrote:
> > > > On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> > > > 
> > > >> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> > > >>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> > > >>>
> > > >>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> > > >>>>
> > > >>>>> Hi Marcos,
> > > >>>>>
> > > >>>>> kernel test robot noticed the following build errors:
> > > >>>>>
> > > >>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> > > >>>>>
> > > >>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> > > >>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> > > >>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> > > >>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> > > >>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > > >>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> > > >>>>>
> > > >>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > >>>>> the same patch/commit), kindly add following tags
> > > >>>>> | Reported-by: kernel test robot <lkp@intel.com>
> > > >>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> > > >>>>>
> > > >>>>> All errors (new ones prefixed by >>):
> > > >>>>>
> > > >>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> > > >>>>
> > > >>>> We should ask the kernel test robot machine owners to install kernel-devel
> > > >>>> package in order to have this fixed.
> > > >>>
> > > >>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> > > >>> instead of /lib/modules/?
> > > >>>
> > > >>
> > > >> This would be a regression to automated test rings. Do you have any other
> > > >> solutions?
> > > > 
> > > > I would say that we could skip the these tests if kernel-devel package is not
> > > > installed. Would it be acceptable? At least we would avoid such issues like this
> > > > in the future as well.
> > > > 
> > > 
> > > We have to check and skip build. Something we could do in the livepatch
> > > Makefile. Can you send patch for this - I will oull this in for next
> > > so we don't break test rings.
> > 
> > I added a new patch in the same patchset that would cover this, skipping the
> > build and test if kernel-devel is not installed. The patchset was sent earlier
> > today. Please check if the new patch fixes things on the build robot.
> 
> Hi Shuah, Hi Marcos,
> 
> Sorry for this wrong report. The files are organized in a different way
> in the bot and cause this issue. We have fixed the bot to explicitly
> set KDIR to the correct path before building the selftests. The patch
> [1] can also work well in bot's environment.
> 
> [1] https://lore.kernel.org/all/20240221-lp-selftests-fixes-v2-2-a19be1e029a7@suse.com/

Hi Yujie, thanks for letting us know that the bot had different settings. Either
way the patch you mentioned should help to reduce noise in the future on
bot's that doesn't have kernel-devel installed.

Again, thanks a lot for fixing the issue!
  Marcos

> 
> Best Regards,
> Yujie

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

* Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
  2024-02-21 12:29     ` Marcos Paulo de Souza
@ 2024-02-23  3:40       ` Yujie Liu
  2024-02-23 16:12         ` Marcos Paulo de Souza
  0 siblings, 1 reply; 20+ messages in thread
From: Yujie Liu @ 2024-02-23  3:40 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: kernel test robot, Shuah Khan, Josh Poimboeuf, Jiri Kosina,
	Miroslav Benes, Petr Mladek, Joe Lawrence, oe-kbuild-all,
	linux-kselftest, linux-kernel, live-patching

On Wed, Feb 21, 2024 at 09:29:47AM -0300, Marcos Paulo de Souza wrote:
> On Mon, 19 Feb 2024 15:16:51 +0800 kernel test robot <lkp@intel.com> wrote:
> 
> > Hi Marcos,
> > 
> > kernel test robot noticed the following build warnings:
> > 
> > [auto build test WARNING on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> > 
> > url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> > base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> > patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-2-89f4a6f5cddc%40suse.com
> > patch subject: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191502.dALlSRz0-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202402191502.dALlSRz0-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > >> Makefile:11: warning: overriding recipe for target 'all'
> > >> ../lib.mk:62: warning: ignoring old recipe for target 'all'
> 
> I couldn't reproduce this one locally. Shuah, have you seen this issue in your
> setup? I followed the steps to reproduce this issue (it's the same sequence
> already reported in earlier patches...)

Hi Marcos,

This seems to be a warning when compiling futex selftest.

linux/tools/testing/selftests/futex$ make
Makefile:11: warning: overriding recipe for target 'all'
../lib.mk:62: warning: ignoring old recipe for target 'all'

There is no such warning if this patch is not applied. Looks like it is
due to the "all" target is defined in lib.mk but overridden in futex
Makefile? Could you please help take a look?

Thanks,
Yujie

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

* Re: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
  2024-02-23  3:40       ` Yujie Liu
@ 2024-02-23 16:12         ` Marcos Paulo de Souza
  0 siblings, 0 replies; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-23 16:12 UTC (permalink / raw)
  To: Yujie Liu
  Cc: Marcos Paulo de Souza, kernel test robot, Shuah Khan,
	Josh Poimboeuf, Jiri Kosina, Miroslav Benes, Petr Mladek,
	Joe Lawrence, oe-kbuild-all, linux-kselftest, linux-kernel,
	live-patching

On Fri, 23 Feb 2024 11:40:00 +0800 Yujie Liu <yujie.liu@intel.com> wrote:

> On Wed, Feb 21, 2024 at 09:29:47AM -0300, Marcos Paulo de Souza wrote:
> > On Mon, 19 Feb 2024 15:16:51 +0800 kernel test robot <lkp@intel.com> wrote:
> > 
> > > Hi Marcos,
> > > 
> > > kernel test robot noticed the following build warnings:
> > > 
> > > [auto build test WARNING on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> > > 
> > > url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> > > base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> > > patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-2-89f4a6f5cddc%40suse.com
> > > patch subject: [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling
> > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191502.dALlSRz0-lkp@intel.com/reproduce)
> > > 
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202402191502.dALlSRz0-lkp@intel.com/
> > > 
> > > All warnings (new ones prefixed by >>):
> > > 
> > > >> Makefile:11: warning: overriding recipe for target 'all'
> > > >> ../lib.mk:62: warning: ignoring old recipe for target 'all'
> > 
> > I couldn't reproduce this one locally. Shuah, have you seen this issue in your
> > setup? I followed the steps to reproduce this issue (it's the same sequence
> > already reported in earlier patches...)
> 
> Hi Marcos,
> 
> This seems to be a warning when compiling futex selftest.
> 
> linux/tools/testing/selftests/futex$ make
> Makefile:11: warning: overriding recipe for target 'all'
> ../lib.mk:62: warning: ignoring old recipe for target 'all'
> 
> There is no such warning if this patch is not applied. Looks like it is
> due to the "all" target is defined in lib.mk but overridden in futex
> Makefile? Could you please help take a look?

I believe that I understood what's going on:

Before this patch, the 'all' from lib.mk target didn't have a "recipe" only
dependencies. The TARGET_GEN_MODS_DIR variable was used while resolving the
dependencies from it.

The proposed patch simplified the process by removing the gen_mods_dir target,
and checked TARGET_GEN_MODS_DIR variable as a recipe.

Per my local tests, we can have two targets with the same name on two different
Makefiles (one that includes in the other in case), as long as only one of them
have a recipe (commands to execute). The dependencies of the target
on the included file would will be checked and executed either way.

But, if both targets have commands to execute, make will say the target was
overridden. In both cases, only the target from the file that includes the other
will execute. I believe this matches the current expectation of the futex
selftests, as they jump on into "functional" directory and execute the tests
there. That makefile also includes lib.mk...

It seems that planned to include more directories since they introduced the
selftests, but never did:


  commit 2aa8470f02a9b9e6a410d1264fe6c8fa6c402eff
  Author: Darren Hart <dvhart@linux.intel.com>
  Date:   Tue May 12 21:07:52 2015 -0700

      selftests: Add futex functional tests

      The futextest testsuite [1] provides functional, stress, and
      performance tests for the various futex op codes. Those tests will be of
      more use to futex developers if they are included with the kernel
      source.

      Copy the core infrastructure and the functional tests into selftests,
      but adapt them for inclusion in the kernel:

      - Update the Makefile to include the run_tests target, remove reference
        to the performance and stress tests from the contributed sources.
      - Replace my dead IBM email address with my current Intel email address.
      - Remove the warrantee and write-to paragraphs from the license blurbs.
      - Remove the NAME section as the filename is easily determined. ;-)
      - Make the whitespace usage consistent in a couple of places.
      - Cleanup various CodingStyle violations.

      A future effort will explore moving the performance and stress tests
      into the kernel.

      1. http://git.kernel.org/cgit/linux/kernel/git/dvhart/futextest.git

Either way, if my change adds a new warning, I think that we can drop that patch
and move on. OTOH, I believe that futex selftests could be simplified in order
to remove this awkward setup to run their tests.

> 
> Thanks,
> Yujie

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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-21 22:04               ` Marcos Paulo de Souza
  2024-02-22  1:28                 ` Yujie Liu
@ 2024-02-23 22:07                 ` Shuah Khan
  2024-02-23 22:31                   ` Marcos Paulo de Souza
  1 sibling, 1 reply; 20+ messages in thread
From: Shuah Khan @ 2024-02-23 22:07 UTC (permalink / raw)
  To: Marcos Paulo de Souza
  Cc: kernel test robot, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, oe-kbuild-all, linux-kselftest,
	linux-kernel, live-patching, Shuah Khan

On 2/21/24 15:04, Marcos Paulo de Souza wrote:
> On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> 
>> On 2/21/24 05:26, Marcos Paulo de Souza wrote:
>>> On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>
>>>> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
>>>>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
>>>>>
>>>>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
>>>>>>
>>>>>>> Hi Marcos,
>>>>>>>
>>>>>>> kernel test robot noticed the following build errors:
>>>>>>>
>>>>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
>>>>>>>
>>>>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
>>>>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
>>>>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
>>>>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
>>>>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>>>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
>>>>>>>
>>>>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>>>>>> the same patch/commit), kindly add following tags
>>>>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
>>>>>>>
>>>>>>> All errors (new ones prefixed by >>):
>>>>>>>
>>>>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
>>>>>>
>>>>>> We should ask the kernel test robot machine owners to install kernel-devel
>>>>>> package in order to have this fixed.
>>>>>
>>>>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
>>>>> instead of /lib/modules/?
>>>>>
>>>>
>>>> This would be a regression to automated test rings. Do you have any other
>>>> solutions?
>>>
>>> I would say that we could skip the these tests if kernel-devel package is not
>>> installed. Would it be acceptable? At least we would avoid such issues like this
>>> in the future as well.
>>>
>>
>> We have to check and skip build. Something we could do in the livepatch
>> Makefile. Can you send patch for this - I will oull this in for next
>> so we don't break test rings.
> 
> I added a new patch in the same patchset that would cover this, skipping the
> build and test if kernel-devel is not installed. The patchset was sent earlier
> today. Please check if the new patch fixes things on the build robot.
> 

Did you send the patch to me so I can apply it on top of what I have in next?

thanks,
-- Shuah


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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-22  2:04                   ` Marcos Paulo de Souza
@ 2024-02-23 22:07                     ` Shuah Khan
  0 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2024-02-23 22:07 UTC (permalink / raw)
  To: Marcos Paulo de Souza, Yujie Liu
  Cc: kernel test robot, Josh Poimboeuf, Jiri Kosina, Miroslav Benes,
	Petr Mladek, Joe Lawrence, oe-kbuild-all, linux-kselftest,
	linux-kernel, live-patching, Shuah Khan

On 2/21/24 19:04, Marcos Paulo de Souza wrote:
> On Thu, 22 Feb 2024 09:28:19 +0800 Yujie Liu <yujie.liu@intel.com> wrote:
> 
>> On Wed, Feb 21, 2024 at 07:04:03PM -0300, Marcos Paulo de Souza wrote:
>>> On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>
>>>> On 2/21/24 05:26, Marcos Paulo de Souza wrote:
>>>>> On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
>>>>>
>>>>>> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
>>>>>>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
>>>>>>>
>>>>>>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Marcos,
>>>>>>>>>
>>>>>>>>> kernel test robot noticed the following build errors:
>>>>>>>>>
>>>>>>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
>>>>>>>>>
>>>>>>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
>>>>>>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
>>>>>>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
>>>>>>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
>>>>>>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
>>>>>>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
>>>>>>>>>
>>>>>>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>>>>>>>> the same patch/commit), kindly add following tags
>>>>>>>>> | Reported-by: kernel test robot <lkp@intel.com>
>>>>>>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
>>>>>>>>>
>>>>>>>>> All errors (new ones prefixed by >>):
>>>>>>>>>
>>>>>>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
>>>>>>>>
>>>>>>>> We should ask the kernel test robot machine owners to install kernel-devel
>>>>>>>> package in order to have this fixed.
>>>>>>>
>>>>>>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
>>>>>>> instead of /lib/modules/?
>>>>>>>
>>>>>>
>>>>>> This would be a regression to automated test rings. Do you have any other
>>>>>> solutions?
>>>>>
>>>>> I would say that we could skip the these tests if kernel-devel package is not
>>>>> installed. Would it be acceptable? At least we would avoid such issues like this
>>>>> in the future as well.
>>>>>
>>>>
>>>> We have to check and skip build. Something we could do in the livepatch
>>>> Makefile. Can you send patch for this - I will oull this in for next
>>>> so we don't break test rings.
>>>
>>> I added a new patch in the same patchset that would cover this, skipping the
>>> build and test if kernel-devel is not installed. The patchset was sent earlier
>>> today. Please check if the new patch fixes things on the build robot.
>>
>> Hi Shuah, Hi Marcos,
>>
>> Sorry for this wrong report. The files are organized in a different way
>> in the bot and cause this issue. We have fixed the bot to explicitly
>> set KDIR to the correct path before building the selftests. The patch
>> [1] can also work well in bot's environment.
>>
>> [1] https://lore.kernel.org/all/20240221-lp-selftests-fixes-v2-2-a19be1e029a7@suse.com/
> 
> Hi Yujie, thanks for letting us know that the bot had different settings. Either
> way the patch you mentioned should help to reduce noise in the future on
> bot's that doesn't have kernel-devel installed.
> 

Marcos, If you send me the patch, I will apply it to linux-kselftest next.
> Again, thanks a lot for fixing the issue!
>    Marcos
> 

Thank you Yujie

thanks,
--- Shuah


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

* Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
  2024-02-23 22:07                 ` Shuah Khan
@ 2024-02-23 22:31                   ` Marcos Paulo de Souza
  0 siblings, 0 replies; 20+ messages in thread
From: Marcos Paulo de Souza @ 2024-02-23 22:31 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Marcos Paulo de Souza, kernel test robot, Josh Poimboeuf,
	Jiri Kosina, Miroslav Benes, Petr Mladek, Joe Lawrence,
	oe-kbuild-all, linux-kselftest, linux-kernel, live-patching

On Fri, 23 Feb 2024 15:07:20 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:

> On 2/21/24 15:04, Marcos Paulo de Souza wrote:
> > On Wed, 21 Feb 2024 14:12:00 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> > 
> >> On 2/21/24 05:26, Marcos Paulo de Souza wrote:
> >>> On Tue, 20 Feb 2024 17:19:54 -0700 Shuah Khan <skhan@linuxfoundation.org> wrote:
> >>>
> >>>> On 2/19/24 06:53, Marcos Paulo de Souza wrote:
> >>>>> On Mon, 19 Feb 2024 09:15:15 -0300 Marcos Paulo de Souza <mpdesouza@suse.com> wrote:
> >>>>>
> >>>>>> On Mon, 19 Feb 2024 14:35:16 +0800 kernel test robot <lkp@intel.com> wrote:
> >>>>>>
> >>>>>>> Hi Marcos,
> >>>>>>>
> >>>>>>> kernel test robot noticed the following build errors:
> >>>>>>>
> >>>>>>> [auto build test ERROR on 345e8abe4c355bc24bab3f4a5634122e55be8665]
> >>>>>>>
> >>>>>>> url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/selftests-lib-mk-Do-not-process-TEST_GEN_MODS_DIR/20240216-021601
> >>>>>>> base:   345e8abe4c355bc24bab3f4a5634122e55be8665
> >>>>>>> patch link:    https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com
> >>>>>>> patch subject: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
> >>>>>>> compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> >>>>>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240219/202402191417.XULH88Ct-lkp@intel.com/reproduce)
> >>>>>>>
> >>>>>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> >>>>>>> the same patch/commit), kindly add following tags
> >>>>>>> | Reported-by: kernel test robot <lkp@intel.com>
> >>>>>>> | Closes: https://lore.kernel.org/oe-kbuild-all/202402191417.XULH88Ct-lkp@intel.com/
> >>>>>>>
> >>>>>>> All errors (new ones prefixed by >>):
> >>>>>>>
> >>>>>>>>> make[3]: *** /lib/modules/5.9.0-2-amd64/build: No such file or directory.  Stop.
> >>>>>>
> >>>>>> We should ask the kernel test robot machine owners to install kernel-devel
> >>>>>> package in order to have this fixed.
> >>>>>
> >>>>> Or maybe ask them to change the reproducer to specify KDIR to the git tree,
> >>>>> instead of /lib/modules/?
> >>>>>
> >>>>
> >>>> This would be a regression to automated test rings. Do you have any other
> >>>> solutions?
> >>>
> >>> I would say that we could skip the these tests if kernel-devel package is not
> >>> installed. Would it be acceptable? At least we would avoid such issues like this
> >>> in the future as well.
> >>>
> >>
> >> We have to check and skip build. Something we could do in the livepatch
> >> Makefile. Can you send patch for this - I will oull this in for next
> >> so we don't break test rings.
> > 
> > I added a new patch in the same patchset that would cover this, skipping the
> > build and test if kernel-devel is not installed. The patchset was sent earlier
> > today. Please check if the new patch fixes things on the build robot.
> > 
> 
> Did you send the patch to me so I can apply it on top of what I have in next?

Yes, I have sent the patchset. The message id is

https://lore.kernel.org/linux-kselftest/20240221-lp-selftests-fixes-v2-0-a19be1e029a7@suse.com/T/#t

BTW, you can skip the last patch, since it introduced a warning when running
furex selftests. The rest is ok per Yujie.

> 
> thanks,
> -- Shuah

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

end of thread, other threads:[~2024-02-23 22:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 18:12 [PATCH 0/3] Improvements to livepatch kselftests on top of kselftest-next Marcos Paulo de Souza
2024-02-15 18:12 ` [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR Marcos Paulo de Souza
2024-02-19  6:35   ` kernel test robot
2024-02-19 12:15     ` Marcos Paulo de Souza
2024-02-19 13:53       ` Marcos Paulo de Souza
2024-02-21  0:19         ` Shuah Khan
2024-02-21 12:26           ` Marcos Paulo de Souza
2024-02-21 21:12             ` Shuah Khan
2024-02-21 22:04               ` Marcos Paulo de Souza
2024-02-22  1:28                 ` Yujie Liu
2024-02-22  2:04                   ` Marcos Paulo de Souza
2024-02-23 22:07                     ` Shuah Khan
2024-02-23 22:07                 ` Shuah Khan
2024-02-23 22:31                   ` Marcos Paulo de Souza
2024-02-15 18:12 ` [PATCH 2/3] selftests: lib.mk: Simplify TEST_GEN_MODS_DIR handling Marcos Paulo de Souza
2024-02-19  7:16   ` kernel test robot
2024-02-21 12:29     ` Marcos Paulo de Souza
2024-02-23  3:40       ` Yujie Liu
2024-02-23 16:12         ` Marcos Paulo de Souza
2024-02-15 18:12 ` [PATCH 3/3] selftests: livepatch: Add initial .gitignore Marcos Paulo de Souza

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).