Skip to contentSkip to conversation

selftests: livepatch use TEST_PROGS for test shell scripts

PATCH In review Shuah Khan 4 participants 8 messages Apr 12, 2019 – Apr 15, 2019

Subsystems (2)
lore
Share & tools
lore

Shuah Khan

author maintainer
#0 lore raw

PATCH 1/1 selftests: livepatch use TEST_PROGS for test shell scripts

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
 tools/testing/selftests/livepatch/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +2 -1
index af4aee79bebb..fd405402c3ff 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
 	test-livepatch.sh \
 	test-callbacks.sh \
 	test-shadow-vars.sh
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 16 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
 tools/testing/selftests/livepatch/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +0 -0
index af4aee79bebb..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 7

Quoted 8 lines
tools/testing/selftests/livepatch/Makefile +2 -1
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
 	test-livepatch.sh \
 	test-callbacks.sh \
 	test-shadow-vars.sh

Hi Shuah,

thanks for the patch. We have already something similar queued in our git tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Miroslav

author maintainer
#2 lore raw
Quoted 29 lines · Miroslav Benes
Quoted 16 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
  tools/testing/selftests/livepatch/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +0 -0
index af4aee79bebb..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 7

Quoted 8 lines
tools/testing/selftests/livepatch/Makefile +2 -1
@@ -1,6 +1,7 @@
  # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
  	test-livepatch.sh \
  	test-callbacks.sh \
  	test-shadow-vars.sh

Hi Shuah,

Quoted 6 lines

thanks for the patch. We have already something similar queued in our git tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Please do. What that does is when selftests are installed, functions.h gets installed as well so the the test can run from installed location.

Did I miss reviewing the original? I maintain the framework and try to catch these if patch gets sent to me.

thanks,
-- Shuah

maintainer
#3 lore raw
Quoted 35 lines · shuah
Quoted 34 lines · Miroslav Benes
Quoted 17 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
  tools/testing/selftests/livepatch/Makefile | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +0 -0
index af4aee79bebb..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 7

Quoted 8 lines
tools/testing/selftests/livepatch/Makefile +2 -1
@@ -1,6 +1,7 @@
  # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
   test-livepatch.sh \
   test-callbacks.sh \
   test-shadow-vars.sh

Hi Shuah,

thanks for the patch. We have already something similar queued in our git tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

Quoted 8 lines
Quoted 2 lines

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Please do. What that does is when selftests are installed, functions.h gets installed as well so the the test can run from installed location.

Did I miss reviewing the original? I maintain the framework and try to catch these if patch gets sent to me.

Unfortunately you did and it was our fault. You were not CCed, no one noticed and we were a bit trigger happy. Sorry about that. It should not have happened.

Would this work for you?

-->8--

Quoted 1 line

From c158f5595286dba46f096cc7cc4bcef5ad8b6c16 Mon Sep 17 00:00:00 2001

From: Miroslav Benes <mbenes at suse.cz>
Date: Fri, 12 Apr 2019 15:31:42 +0200
Subject: [PATCH] selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED

Add functions.sh to TEST_PROGS_EXTENDED so that it is installed along with the rest of the selftests and they can be run.

Originally-by: Shuah Khan <shuah at kernel.org>
Signed-off-by: Miroslav Benes <mbenes at suse.cz>

---
 tools/testing/selftests/livepatch/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/livepatch/Makefile +1 -0
index 114f43e2081a..fd405402c3ff 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
+TEST_PROGS_EXTENDED := functions.sh
 TEST_PROGS := \
 	test-livepatch.sh \
 	test-callbacks.sh \
Signature · 1 line
2.21.0
author maintainer
#4 lore raw
Quoted 43 lines · Miroslav Benes
Quoted 41 lines · shuah
Quoted 30 lines · Miroslav Benes
Quoted 17 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
   tools/testing/selftests/livepatch/Makefile | 3 ++-
   1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +0 -0
index af4aee79bebb..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 7

Quoted 8 lines
tools/testing/selftests/livepatch/Makefile +2 -1
@@ -1,6 +1,7 @@
   # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
    test-livepatch.sh \
    test-callbacks.sh \
    test-shadow-vars.sh

Hi Shuah,

Quoted 6 lines

thanks for the patch. We have already something similar queued in our git tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Please do. What that does is when selftests are installed, functions.h gets installed as well so the the test can run from installed location.

Quoted 8 lines
Quoted 2 lines

Did I miss reviewing the original? I maintain the framework and try to catch these if patch gets sent to me.

Unfortunately you did and it was our fault. You were not CCed, no one noticed and we were a bit trigger happy. Sorry about that. It should not have happened.

Would this work for you?

Looks good to me.

Quoted 23 lines

-->8--

Quoted 1 line

From c158f5595286dba46f096cc7cc4bcef5ad8b6c16 Mon Sep 17 00:00:00 2001

From: Miroslav Benes <mbenes at suse.cz>
Date: Fri, 12 Apr 2019 15:31:42 +0200
Subject: [PATCH] selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED

Add functions.sh to TEST_PROGS_EXTENDED so that it is installed along with the rest of the selftests and they can be run.

Originally-by: Shuah Khan <shuah at kernel.org>
Signed-off-by: Miroslav Benes <mbenes at suse.cz>

---
  tools/testing/selftests/livepatch/Makefile | 1 +
  1 file changed, 1 insertion(+)
tools/testing/selftests/livepatch/Makefile +0 -0
index 114f43e2081a..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 6

Quoted 6 lines
tools/testing/selftests/livepatch/Makefile +1 -0
@@ -1,5 +1,6 @@
  # SPDX-License-Identifier: GPL-2.0
 
+TEST_PROGS_EXTENDED := functions.sh
  TEST_PROGS := \
  	test-livepatch.sh \
  	test-callbacks.sh \

thanks,
-- Shuah

maintainer
#5 lore raw
Quoted 47 lines · shuah
Quoted 46 lines · Miroslav Benes
Quoted 43 lines · shuah
Quoted 30 lines · Miroslav Benes
Quoted 17 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>
---
    tools/testing/selftests/livepatch/Makefile | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +0 -0
index af4aee79bebb..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 7

Quoted 8 lines
tools/testing/selftests/livepatch/Makefile +2 -1
@@ -1,6 +1,7 @@
    # SPDX-License-Identifier: GPL-2.0
 
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
     test-livepatch.sh \
     test-callbacks.sh \
     test-shadow-vars.sh

Hi Shuah,

Quoted 6 lines

thanks for the patch. We have already something similar queued in our git tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Please do. What that does is when selftests are installed, functions.h gets installed as well so the the test can run from installed location.

Did I miss reviewing the original? I maintain the framework and try to catch these if patch gets sent to me.

Quoted 8 lines
Quoted 5 lines

Unfortunately you did and it was our fault. You were not CCed, no one noticed and we were a bit trigger happy. Sorry about that. It should not have happened.

Would this work for you?

Looks good to me.

Hi Shuah,

Thanks for spotting this and apologies for missing your CC on my earlier patch post. For future reference, do you prefer a direct CC, linux-kselftest, or both?

And for Miroslav, you can add my ack if needed.

-- Joe

Quoted 33 lines
Quoted 23 lines

-->8--

Quoted 1 line

From c158f5595286dba46f096cc7cc4bcef5ad8b6c16 Mon Sep 17 00:00:00 2001

From: Miroslav Benes <mbenes at suse.cz>
Date: Fri, 12 Apr 2019 15:31:42 +0200
Subject: [PATCH] selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED

Add functions.sh to TEST_PROGS_EXTENDED so that it is installed along with the rest of the selftests and they can be run.

Originally-by: Shuah Khan <shuah at kernel.org>
Signed-off-by: Miroslav Benes <mbenes at suse.cz>

---
   tools/testing/selftests/livepatch/Makefile | 1 +
   1 file changed, 1 insertion(+)
tools/testing/selftests/livepatch/Makefile +0 -0
index 114f43e2081a..fd405402c3ff 100644

tools/testing/selftests/livepatch/Makefile line 6

Quoted 6 lines
tools/testing/selftests/livepatch/Makefile +1 -0
@@ -1,5 +1,6 @@
   # SPDX-License-Identifier: GPL-2.0
 
+TEST_PROGS_EXTENDED := functions.sh
   TEST_PROGS := \
   	test-livepatch.sh \
   	test-callbacks.sh \

thanks,
-- Shuah

author maintainer
#6 lore raw
Quoted 56 lines · Joe Lawrence
Quoted 55 lines · shuah
Quoted 53 lines · Miroslav Benes
Quoted 37 lines · shuah
Quoted 36 lines · Miroslav Benes
Quoted 24 lines · Shuah Khan

TEST_PROGS variable is for test shell scripts and common clean target in lib.mk doesn't touch them. TEST_GEN_PROGS are removed by it.

Fix it to use TEST_PROGS for test shell scripts and TEST_PROGS_EXTENDED
for common functions.sh.

Signed-off-by Shuah Khan <shuah at kernel.org>

---
    tools/testing/selftests/livepatch/Makefile | 3 ++-

    1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/Makefile +2 -1
index af4aee79bebb..fd405402c3ff 100644
@@ -1,6 +1,7 @@
     # SPDX-License-Identifier: GPL-2.0
-TEST_GEN_PROGS := \
+TEST_PROGS_EXTENDED := functions.sh
+TEST_PROGS := \
      test-livepatch.sh \
      test-callbacks.sh \
Quoted 1 line

     test-shadow-vars.sh

Hi Shuah,

thanks for the patch. We have already something similar queued in our git
tree. See
https://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git/commit/?h=for-5.1/upstream-fixes&id=abfe3c4560684864f66641438fee3075de098e89

Quoted 8 lines
Quoted 2 lines

It is missing TEST_PROGS_EXTENDED though. Should we add it?

Please do. What that does is when selftests are installed, functions.h gets installed as well so the the test can run from installed location.

Did I miss reviewing the original? I maintain the framework and try to catch these if patch gets sent to me.

Unfortunately you did and it was our fault. You were not CCed, no one noticed and we were a bit trigger happy. Sorry about that. It should not have happened.

Would this work for you?

Quoted 8 lines
Quoted 2 lines

Looks good to me.

Hi Shuah,

Thanks for spotting this and apologies for missing your CC on my earlier patch post.  For future reference, do you prefer a direct CC, linux-kselftest, or both?

No worries. Happy to report the problem. Couldn't have missed it with all the deleted lines showing up whenever I ran diff on my changes. :)

Direct to or cc to me and cc linux-kselftest list is preferred Same as any other patch really, everybody getmaintainer.pl recommends.

thanks,
-- Shuah

maintainer
#7 lore raw
In reply to Miroslav Benes
Quoted 26 lines · Miroslav Benes

From: Miroslav Benes <mbenes at suse.cz>
Date: Fri, 12 Apr 2019 15:31:42 +0200
Subject: [PATCH] selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED

Add functions.sh to TEST_PROGS_EXTENDED so that it is installed along with the rest of the selftests and they can be run.

Originally-by: Shuah Khan <shuah at kernel.org>
Signed-off-by: Miroslav Benes <mbenes at suse.cz>

---
 tools/testing/selftests/livepatch/Makefile | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/livepatch/Makefile +1 -0
index 114f43e2081a..fd405402c3ff 100644
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
+TEST_PROGS_EXTENDED := functions.sh
 TEST_PROGS := \
 	test-livepatch.sh \
 	test-callbacks.sh \
Signature · 1 line
2.21.0

The patch has been committed into the branch for-5.1/upstream-fixes.

Best Regards,
Petr