Skip to contentSkip to conversation

Move runnable code (tests) from Documentation to selftests

PATCH Superseded Shuah Khan 6 participants 23 messages Sep 9, 2016 – Sep 13, 2016

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Shuah Khan

author
#0 lore raw

cover Move runnable code (tests) from Documentation to selftests

Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.

Jon Corbet and I discussed this in an email thread and as per that discussion, this patch series moves all the tests that are under the Documentation directory to selftests. There is more runnable code in the form of examples and utils and that is going to be another patch series. I moved just the tests and left the documentation files as is.

Checkpatch isn't happy with a few of the patches as some of the renamed files have existing checkpatch errors and warnings. I am working another patch series that will address those.

Shuah Khan (9):
selftests: move dnotify_test from Documentation/filesystems
selftests: update filesystems Makefile to work under selftests
selftests: move .gitignore from Documentation/filesystems
selftests: move prctl tests from Documentation/prctl
selftests: Update prctl Makefile to work under selftests
selftests: move ptp tests from Documentation/ptp
selftests: Update ptp Makefile to work under selftests
selftests: move vDSO tests from Documentation/vDSO
selftests: Update vDSO Makefile to work under selftests

 Documentation/filesystems/.gitignore               |   1 -
 Documentation/filesystems/Makefile                 |   5 -
 Documentation/filesystems/dnotify_test.c           |  34 --
 Documentation/prctl/.gitignore                     |   3 -
 Documentation/prctl/Makefile                       |  10 -
 .../prctl/disable-tsc-ctxt-sw-stress-test.c        |  97 ----
 .../prctl/disable-tsc-on-off-stress-test.c         |  96 ----
 Documentation/prctl/disable-tsc-test.c             |  95 ----
 Documentation/ptp/.gitignore                       |   1 -
 Documentation/ptp/Makefile                         |   8 -
 Documentation/ptp/testptp.c                        | 523 ---------------------
 Documentation/ptp/testptp.mk                       |  33 --
 Documentation/vDSO/.gitignore                      |   2 -
 Documentation/vDSO/Makefile                        |  17 -
 Documentation/vDSO/parse_vdso.c                    | 269 -----------
 Documentation/vDSO/vdso_standalone_test_x86.c      | 128 -----
 Documentation/vDSO/vdso_test.c                     |  52 --
 tools/testing/selftests/filesystems/.gitignore     |   1 +
 tools/testing/selftests/filesystems/Makefile       |   7 +
 tools/testing/selftests/filesystems/dnotify_test.c |  34 ++
 tools/testing/selftests/prctl/.gitignore           |   3 +
 tools/testing/selftests/prctl/Makefile             |  15 +
 .../prctl/disable-tsc-ctxt-sw-stress-test.c        |  97 ++++
 .../prctl/disable-tsc-on-off-stress-test.c         |  96 ++++
 tools/testing/selftests/prctl/disable-tsc-test.c   |  95 ++++
 tools/testing/selftests/ptp/.gitignore             |   1 +
 tools/testing/selftests/ptp/Makefile               |   8 +
 tools/testing/selftests/ptp/testptp.c              | 523 +++++++++++++++++++++
 tools/testing/selftests/ptp/testptp.mk             |  33 ++
 tools/testing/selftests/vDSO/.gitignore            |   2 +
 tools/testing/selftests/vDSO/Makefile              |  20 +
 tools/testing/selftests/vDSO/parse_vdso.c          | 269 +++++++++++
 .../selftests/vDSO/vdso_standalone_test_x86.c      | 128 +++++
 tools/testing/selftests/vDSO/vdso_test.c           |  52 ++
 34 files changed, 1384 insertions(+), 1374 deletions(-)
 delete mode 100644 Documentation/filesystems/.gitignore
 delete mode 100644 Documentation/filesystems/Makefile
 delete mode 100644 Documentation/filesystems/dnotify_test.c
 delete mode 100644 Documentation/prctl/.gitignore
 delete mode 100644 Documentation/prctl/Makefile
 delete mode 100644 Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
 delete mode 100644 Documentation/prctl/disable-tsc-on-off-stress-test.c
 delete mode 100644 Documentation/prctl/disable-tsc-test.c
 delete mode 100644 Documentation/ptp/.gitignore
 delete mode 100644 Documentation/ptp/Makefile
 delete mode 100644 Documentation/ptp/testptp.c
 delete mode 100644 Documentation/ptp/testptp.mk
 delete mode 100644 Documentation/vDSO/.gitignore
 delete mode 100644 Documentation/vDSO/Makefile
 delete mode 100644 Documentation/vDSO/parse_vdso.c
 delete mode 100644 Documentation/vDSO/vdso_standalone_test_x86.c
 delete mode 100644 Documentation/vDSO/vdso_test.c
 create mode 100644 tools/testing/selftests/filesystems/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/Makefile
 create mode 100644 tools/testing/selftests/filesystems/dnotify_test.c
 create mode 100644 tools/testing/selftests/prctl/.gitignore
 create mode 100644 tools/testing/selftests/prctl/Makefile
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-test.c
 create mode 100644 tools/testing/selftests/ptp/.gitignore
 create mode 100644 tools/testing/selftests/ptp/Makefile
 create mode 100644 tools/testing/selftests/ptp/testptp.c
 create mode 100644 tools/testing/selftests/ptp/testptp.mk
 create mode 100644 tools/testing/selftests/vDSO/.gitignore
 create mode 100644 tools/testing/selftests/vDSO/Makefile
 create mode 100644 tools/testing/selftests/vDSO/parse_vdso.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test.c
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/9 selftests: move dnotify_test from Documentation/filesystems

Move dnotify_test from Documentation/filesystems to selftests/filesystems

---
 Documentation/filesystems/Makefile                 |  5 ----
 Documentation/filesystems/dnotify_test.c           | 34 ----------------------
 tools/testing/selftests/filesystems/Makefile       |  5 ++++
 tools/testing/selftests/filesystems/dnotify_test.c | 34 ++++++++++++++++++++++
 4 files changed, 39 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/filesystems/Makefile
 delete mode 100644 Documentation/filesystems/dnotify_test.c
 create mode 100644 tools/testing/selftests/filesystems/Makefile
 create mode 100644 tools/testing/selftests/filesystems/dnotify_test.c
Documentation/filesystems/Makefile deleted +0 -5
deleted file mode 100644
index 883010c..0000000
@@ -1,5 +0,0 @@
-# List of programs to build
-hostprogs-y := dnotify_test
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
Documentation/filesystems/dnotify_test.c deleted +0 -34
deleted file mode 100644
index 8b37b4a..0000000
@@ -1,34 +0,0 @@
-#define _GNU_SOURCE	/* needed to get the defines */
-#include <fcntl.h>	/* in glibc 2.2 this has the needed
-				   values defined */
-#include <signal.h>
-#include <stdio.h>
-#include <unistd.h>
-
-static volatile int event_fd;
-
-static void handler(int sig, siginfo_t *si, void *data)
-{
-	event_fd = si->si_fd;
-}
-
-int main(void)
-{
-	struct sigaction act;
-	int fd;
-
-	act.sa_sigaction = handler;
-	sigemptyset(&act.sa_mask);
-	act.sa_flags = SA_SIGINFO;
-	sigaction(SIGRTMIN + 1, &act, NULL);
-
-	fd = open(".", O_RDONLY);
-	fcntl(fd, F_SETSIG, SIGRTMIN + 1);
-	fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT);
-	/* we will now be notified if any of the files
-	   in "." is modified or new files are created */
-	while (1) {
-		pause();
-		printf("Got event on fd=%d\n", event_fd);
-	}
-}
tools/testing/selftests/filesystems/Makefile new file +5 -0
new file mode 100644
index 0000000..883010c
@@ -0,0 +1,5 @@
+# List of programs to build
+hostprogs-y := dnotify_test
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
tools/testing/selftests/filesystems/dnotify_test.c new file +34 -0
new file mode 100644
index 0000000..8b37b4a
@@ -0,0 +1,34 @@
+#define _GNU_SOURCE	/* needed to get the defines */
+#include <fcntl.h>	/* in glibc 2.2 this has the needed
+				   values defined */
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+
+static volatile int event_fd;
+
+static void handler(int sig, siginfo_t *si, void *data)
+{
+	event_fd = si->si_fd;
+}
+
+int main(void)
+{
+	struct sigaction act;
+	int fd;
+
+	act.sa_sigaction = handler;
+	sigemptyset(&act.sa_mask);
+	act.sa_flags = SA_SIGINFO;
+	sigaction(SIGRTMIN + 1, &act, NULL);
+
+	fd = open(".", O_RDONLY);
+	fcntl(fd, F_SETSIG, SIGRTMIN + 1);
+	fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT);
+	/* we will now be notified if any of the files
+	   in "." is modified or new files are created */
+	while (1) {
+		pause();
+		printf("Got event on fd=%d\n", event_fd);
+	}
+}
Signature · 1 line
2.7.4
#2 lore raw

Re: [PATCH 1/9] selftests: move dnotify_test from Documentation/filesystems

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538 config: i386-tinyconfig (attached as .config) compiler: gcc-6…

Hi Shuah,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> scripts/Makefile.build:44: Documentation/filesystems/Makefile: No such file or directory
>> make[3]: *** No rule to make target 'Documentation/filesystems/Makefile'.

make[3]: Failed to remake makefile 'Documentation/filesystems/Makefile'.

vim +44 scripts/Makefile.build

f77bf0142 Sam Ravnborg     2007-10-15  28  ldflags-y  :=
d72e5edbf Sam Ravnborg     2007-05-28  29  
720097d89 Sam Ravnborg     2009-04-19  30  subdir-asflags-y :=
720097d89 Sam Ravnborg     2009-04-19  31  subdir-ccflags-y :=
720097d89 Sam Ravnborg     2009-04-19  32  
3156fd052 Robert P. J. Day 2008-02-18  33  # Read auto.conf if it exists, otherwise ignore
c955ccafc Roman Zippel     2006-06-08  34  -include include/config/auto.conf
^1da177e4 Linus Torvalds   2005-04-16  35  
20a468b51 Sam Ravnborg     2006-01-22  36  include scripts/Kbuild.include
20a468b51 Sam Ravnborg     2006-01-22  37  
3156fd052 Robert P. J. Day 2008-02-18  38  # For backward compatibility check that these variables do not change
0c53c8e6e Sam Ravnborg     2007-10-14  39  save-cflags := $(CFLAGS)
0c53c8e6e Sam Ravnborg     2007-10-14  40  
2a6914703 Sam Ravnborg     2005-07-25  41  # The filename Kbuild has precedence over Makefile
db8c1a7b2 Sam Ravnborg     2005-07-27  42  kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
0c53c8e6e Sam Ravnborg     2007-10-14  43  kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
0c53c8e6e Sam Ravnborg     2007-10-14 @44  include $(kbuild-file)
^1da177e4 Linus Torvalds   2005-04-16  45  
0c53c8e6e Sam Ravnborg     2007-10-14  46  # If the save-* variables changed error out
0c53c8e6e Sam Ravnborg     2007-10-14  47  ifeq ($(KBUILD_NOPEDANTIC),)
0c53c8e6e Sam Ravnborg     2007-10-14  48          ifneq ("$(save-cflags)","$(CFLAGS)")
49c57d254 Arnaud Lacombe   2011-08-15  49                  $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y)
0c53c8e6e Sam Ravnborg     2007-10-14  50          endif
0c53c8e6e Sam Ravnborg     2007-10-14  51  endif
4a5838ad9 Borislav Petkov  2011-03-01  52  

:::::: The code at line 44 was first introduced by commit
:::::: 0c53c8e6eb456cde30f2305421c605713856abc8 kbuild: check for wrong use of CFLAGS

:::::: TO: Sam Ravnborg <sam@neptun.(none)>
:::::: CC: Sam Ravnborg <sam@neptun.(none)>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author
#3 lore raw

PATCH 2/9 selftests: update filesystems Makefile to work under selftests

In reply to Shuah Khan

Update to work under selftests. dnotify_test will not be run as part of selftests suite and will not included in install targets. It can be built separately for now.

---
 tools/testing/selftests/filesystems/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
tools/testing/selftests/filesystems/Makefile +6 -4
index 883010c..f1dce5c 100644
@@ -1,5 +1,7 @@
-# List of programs to build
-hostprogs-y := dnotify_test
+TEST_PROGS := dnotify_test
+all: $(TEST_PROGS)
 
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
+include ../lib.mk
+
+clean:
+	rm -fr dnotify_test
Signature · 1 line
2.7.4
#4 lore raw

Re: [PATCH 2/9] selftests: update filesystems Makefile to work under selftests

Quoted 15 lines · Shuah Khan

Update to work under selftests. dnotify_test will not be run as part of selftests suite and will not included in install targets. It can be built separately for now.

---
 tools/testing/selftests/filesystems/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
tools/testing/selftests/filesystems/Makefile +0 -1
index 883010c..f1dce5c 100644
@@ -1,5 +1,7 @@
-# List of programs to build

tools/testing/selftests/filesystems/Makefile line 7

Quoted 10 lines
tools/testing/selftests/filesystems/Makefile +6 -3
-hostprogs-y := dnotify_test
+TEST_PROGS := dnotify_test
+all: $(TEST_PROGS)
 
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
+include ../lib.mk
+
+clean:
+	rm -fr dnotify_test

That's a complete rewrite of the Makefile, so I don't think there's any value in bringing its content across from Documentation.

Better IMHO would be to squash this with the previous patch, so we get a working test under selftests in a single commit.

cheers

author
#5 lore raw

Re: [PATCH 2/9] selftests: update filesystems Makefile to work under selftests

Quoted 21 lines · Michael Ellerman
Quoted 19 lines · Shuah Khan

Update to work under selftests. dnotify_test will not be run as part of selftests suite and will not included in install targets. It can be built separately for now.

---
 tools/testing/selftests/filesystems/Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
tools/testing/selftests/filesystems/Makefile +2 -2
index 883010c..f1dce5c 100644
@@ -1,5 +1,7 @@
-# List of programs to build
-hostprogs-y := dnotify_test
+TEST_PROGS := dnotify_test
+all: $(TEST_PROGS)
 
Quoted 9 lines

tools/testing/selftests/filesystems/Makefile line 7

Quoted 6 lines
tools/testing/selftests/filesystems/Makefile +4 -2
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
+include ../lib.mk
+
+clean:
+	rm -fr dnotify_test

That's a complete rewrite of the Makefile, so I don't think there's any value in bringing its content across from Documentation.

Moving Makefile accomplishes delete at the same time. I can combine the move and updating Makefile into one single patch.

Quoted 6 lines

Better IMHO would be to squash this with the previous patch, so we get a working test under selftests in a single commit.

cheers

thanks,
-- Shuah

author
#6 lore raw

PATCH 3/9 selftests: move .gitignore from Documentation/filesystems

In reply to Shuah Khan

Move .gitignore for dnotify_test from Documentation/filesystems to selftests/filesystems.

---
 Documentation/filesystems/.gitignore           | 1 -
 tools/testing/selftests/filesystems/.gitignore | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
 delete mode 100644 Documentation/filesystems/.gitignore
 create mode 100644 tools/testing/selftests/filesystems/.gitignore
Documentation/filesystems/.gitignore deleted +0 -1
deleted file mode 100644
index 31d6e42..0000000
@@ -1 +0,0 @@
-dnotify_test
tools/testing/selftests/filesystems/.gitignore new file +1 -0
new file mode 100644
index 0000000..31d6e42
@@ -0,0 +1 @@
+dnotify_test
Signature · 1 line
2.7.4
author
#7 lore raw

PATCH 4/9 selftests: move prctl tests from Documentation/prctl

In reply to Shuah Khan

Move prctl tests from Documentation/prctl to selftests/prctl.

---
 Documentation/prctl/.gitignore                     |  3 -
 Documentation/prctl/Makefile                       | 10 ---
 .../prctl/disable-tsc-ctxt-sw-stress-test.c        | 97 ----------------------
 .../prctl/disable-tsc-on-off-stress-test.c         | 96 ---------------------
 Documentation/prctl/disable-tsc-test.c             | 95 ---------------------
 tools/testing/selftests/prctl/.gitignore           |  3 +
 tools/testing/selftests/prctl/Makefile             | 10 +++
 .../prctl/disable-tsc-ctxt-sw-stress-test.c        | 97 ++++++++++++++++++++++
 .../prctl/disable-tsc-on-off-stress-test.c         | 96 +++++++++++++++++++++
 tools/testing/selftests/prctl/disable-tsc-test.c   | 95 +++++++++++++++++++++
 10 files changed, 301 insertions(+), 301 deletions(-)
 delete mode 100644 Documentation/prctl/.gitignore
 delete mode 100644 Documentation/prctl/Makefile
 delete mode 100644 Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c
 delete mode 100644 Documentation/prctl/disable-tsc-on-off-stress-test.c
 delete mode 100644 Documentation/prctl/disable-tsc-test.c
 create mode 100644 tools/testing/selftests/prctl/.gitignore
 create mode 100644 tools/testing/selftests/prctl/Makefile
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c
 create mode 100644 tools/testing/selftests/prctl/disable-tsc-test.c
Documentation/prctl/.gitignore deleted +0 -3
deleted file mode 100644
index 0b5c274..0000000
@@ -1,3 +0,0 @@
-disable-tsc-ctxt-sw-stress-test
-disable-tsc-on-off-stress-test
-disable-tsc-test
Documentation/prctl/Makefile deleted +0 -10
deleted file mode 100644
index 44de308..0000000
@@ -1,10 +0,0 @@
-ifndef CROSS_COMPILE
-# List of programs to build
-hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
-HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
-HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
-endif
Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c deleted +0 -97

97 lines not on this page · raw message

Documentation/prctl/disable-tsc-on-off-stress-test.c deleted +0 -96

96 lines not on this page · raw message

Documentation/prctl/disable-tsc-test.c deleted +0 -95

95 lines not on this page · raw message

tools/testing/selftests/prctl/.gitignore new file +3 -0
new file mode 100644
index 0000000..0b5c274
@@ -0,0 +1,3 @@
+disable-tsc-ctxt-sw-stress-test
+disable-tsc-on-off-stress-test
+disable-tsc-test
tools/testing/selftests/prctl/Makefile new file +10 -0
new file mode 100644
index 0000000..44de308
@@ -0,0 +1,10 @@
+ifndef CROSS_COMPILE
+# List of programs to build
+hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
+HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
+HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
+endif
tools/testing/selftests/prctl/disable-tsc-ctxt-sw-stress-test.c new file +97 -0

97 lines not on this page · raw message

tools/testing/selftests/prctl/disable-tsc-on-off-stress-test.c new file +96 -0

96 lines not on this page · raw message

tools/testing/selftests/prctl/disable-tsc-test.c new file +95 -0

95 lines not on this page · raw message

Signature · 1 line
2.7.4
#8 lore raw

Re: [PATCH 4/9] selftests: move prctl tests from Documentation/prctl

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538 config: i386-tinyconfig (attached as .config) compiler: gcc-6…

Hi Shuah,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

scripts/Makefile.clean:14: Documentation/prctl/Makefile: No such file or directory

>> make[3]: *** No rule to make target 'Documentation/prctl/Makefile'.

make[3]: Failed to remake makefile 'Documentation/prctl/Makefile'. make[2]: *** [Documentation/prctl] Error 2
scripts/Makefile.clean:14: Documentation/filesystems/Makefile: No such file or directory make[3]: *** No rule to make target 'Documentation/filesystems/Makefile'. make[3]: Failed to remake makefile 'Documentation/filesystems/Makefile'. make[2]: *** [Documentation/filesystems] Error 2
make[2]: Target '__clean' not remade because of errors.
make[1]: *** [_clean_Documentation] Error 2
make[1]: Target 'distclean' not remade because of errors.
make: *** [sub-make] Error 2

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

#9 lore raw

Re: [PATCH 4/9] selftests: move prctl tests from Documentation/prctl

In reply to Shuah Khan
url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538 config: i386-tinyconfig (attached as .config) compiler: gcc-6…

Hi Shuah,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> scripts/Makefile.build:44: Documentation/prctl/Makefile: No such file or directory

make[3]: *** No rule to make target 'Documentation/prctl/Makefile'. make[3]: Failed to remake makefile 'Documentation/prctl/Makefile'.

vim +44 scripts/Makefile.build

3156fd052 Robert P. J. Day 2008-02-18  38  # For backward compatibility check that these variables do not change
0c53c8e6e Sam Ravnborg     2007-10-14  39  save-cflags := $(CFLAGS)
0c53c8e6e Sam Ravnborg     2007-10-14  40  
2a6914703 Sam Ravnborg     2005-07-25  41  # The filename Kbuild has precedence over Makefile
db8c1a7b2 Sam Ravnborg     2005-07-27  42  kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
0c53c8e6e Sam Ravnborg     2007-10-14  43  kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
0c53c8e6e Sam Ravnborg     2007-10-14 @44  include $(kbuild-file)
^1da177e4 Linus Torvalds   2005-04-16  45  
0c53c8e6e Sam Ravnborg     2007-10-14  46  # If the save-* variables changed error out
0c53c8e6e Sam Ravnborg     2007-10-14  47  ifeq ($(KBUILD_NOPEDANTIC),)

:::::: The code at line 44 was first introduced by commit
:::::: 0c53c8e6eb456cde30f2305421c605713856abc8 kbuild: check for wrong use of CFLAGS

:::::: TO: Sam Ravnborg <sam@neptun.(none)>
:::::: CC: Sam Ravnborg <sam@neptun.(none)>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author
#10 lore raw

PATCH 5/9 selftests: Update prctl Makefile to work under selftests

In reply to Shuah Khan

Update prctl Makefile to work under selftests. prctl will not be run as part of selftests suite and will not included in install targets. They can be built separately for now.

---
 tools/testing/selftests/prctl/Makefile | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
tools/testing/selftests/prctl/Makefile +12 -7
index 44de308..35aa1c8 100644
@@ -1,10 +1,15 @@
 ifndef CROSS_COMPILE
-# List of programs to build
-hostprogs-$(CONFIG_X86) := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test disable-tsc-test
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
+uname_M := $(shell uname -m 2>/dev/null || echo not)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
 
-HOSTCFLAGS_disable-tsc-ctxt-sw-stress-test.o += -I$(objtree)/usr/include
-HOSTCFLAGS_disable-tsc-on-off-stress-test.o += -I$(objtree)/usr/include
-HOSTCFLAGS_disable-tsc-test.o += -I$(objtree)/usr/include
+ifeq ($(ARCH),x86)
+TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \
+		disable-tsc-test
+all: $(TEST_PROGS)
+
+include ../lib.mk
+
+clean:
+	rm -fr $(TEST_PROGS)
+endif
 endif
Signature · 1 line
2.7.4
author
#11 lore raw

PATCH 6/9 selftests: move ptp tests from Documentation/ptp

In reply to Shuah Khan

Move ptp tests from Documentation/ptp to selftests/ptp.

---
 Documentation/ptp/.gitignore           |   1 -
 Documentation/ptp/Makefile             |   8 -
 Documentation/ptp/testptp.c            | 523 ---------------------------------
 Documentation/ptp/testptp.mk           |  33 ---
 tools/testing/selftests/ptp/.gitignore |   1 +
 tools/testing/selftests/ptp/Makefile   |   8 +
 tools/testing/selftests/ptp/testptp.c  | 523 +++++++++++++++++++++++++++++++++
 tools/testing/selftests/ptp/testptp.mk |  33 +++
 8 files changed, 565 insertions(+), 565 deletions(-)
 delete mode 100644 Documentation/ptp/.gitignore
 delete mode 100644 Documentation/ptp/Makefile
 delete mode 100644 Documentation/ptp/testptp.c
 delete mode 100644 Documentation/ptp/testptp.mk
 create mode 100644 tools/testing/selftests/ptp/.gitignore
 create mode 100644 tools/testing/selftests/ptp/Makefile
 create mode 100644 tools/testing/selftests/ptp/testptp.c
 create mode 100644 tools/testing/selftests/ptp/testptp.mk
Documentation/ptp/.gitignore deleted +0 -1
deleted file mode 100644
index f562e49..0000000
@@ -1 +0,0 @@
-testptp
Documentation/ptp/Makefile deleted +0 -8
deleted file mode 100644
index 293d6c0..0000000
@@ -1,8 +0,0 @@
-# List of programs to build
-hostprogs-y := testptp
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS_testptp.o += -I$(objtree)/usr/include
-HOSTLOADLIBES_testptp := -lrt
Documentation/ptp/testptp.c deleted +0 -523

523 lines not on this page · raw message

Documentation/ptp/testptp.mk deleted +0 -33
deleted file mode 100644
index 4ef2d97..0000000
@@ -1,33 +0,0 @@
-# PTP 1588 clock support - User space test program
-#
-# Copyright (C) 2010 OMICRON electronics GmbH
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-CC        = $(CROSS_COMPILE)gcc
-INC       = -I$(KBUILD_OUTPUT)/usr/include
-CFLAGS    = -Wall $(INC)
-LDLIBS    = -lrt
-PROGS     = testptp
-
-all: $(PROGS)
-
-testptp: testptp.o
-
-clean:
-	rm -f testptp.o
-
-distclean: clean
-	rm -f $(PROGS)
tools/testing/selftests/ptp/.gitignore new file +1 -0
new file mode 100644
index 0000000..f562e49
@@ -0,0 +1 @@
+testptp
tools/testing/selftests/ptp/Makefile new file +8 -0
new file mode 100644
index 0000000..293d6c0
@@ -0,0 +1,8 @@
+# List of programs to build
+hostprogs-y := testptp
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS_testptp.o += -I$(objtree)/usr/include
+HOSTLOADLIBES_testptp := -lrt
tools/testing/selftests/ptp/testptp.c new file +523 -0

523 lines not on this page · raw message

tools/testing/selftests/ptp/testptp.mk new file +33 -0
new file mode 100644
index 0000000..4ef2d97
@@ -0,0 +1,33 @@
+# PTP 1588 clock support - User space test program
+#
+# Copyright (C) 2010 OMICRON electronics GmbH
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software
+#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+CC        = $(CROSS_COMPILE)gcc
+INC       = -I$(KBUILD_OUTPUT)/usr/include
+CFLAGS    = -Wall $(INC)
+LDLIBS    = -lrt
+PROGS     = testptp
+
+all: $(PROGS)
+
+testptp: testptp.o
+
+clean:
+	rm -f testptp.o
+
+distclean: clean
+	rm -f $(PROGS)
Signature · 1 line
2.7.4
#12 lore raw

Re: [PATCH 6/9] selftests: move ptp tests from Documentation/ptp

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538 config: i386-tinyconfig (attached as .config) compiler: gcc-6…

Hi Shuah,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> scripts/Makefile.build:44: Documentation/ptp/Makefile: No such file or directory
>> make[3]: *** No rule to make target 'Documentation/ptp/Makefile'.

make[3]: Failed to remake makefile 'Documentation/ptp/Makefile'.

vim +44 scripts/Makefile.build

3156fd052 Robert P. J. Day 2008-02-18  38  # For backward compatibility check that these variables do not change
0c53c8e6e Sam Ravnborg     2007-10-14  39  save-cflags := $(CFLAGS)
0c53c8e6e Sam Ravnborg     2007-10-14  40  
2a6914703 Sam Ravnborg     2005-07-25  41  # The filename Kbuild has precedence over Makefile
db8c1a7b2 Sam Ravnborg     2005-07-27  42  kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
0c53c8e6e Sam Ravnborg     2007-10-14  43  kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
0c53c8e6e Sam Ravnborg     2007-10-14 @44  include $(kbuild-file)
^1da177e4 Linus Torvalds   2005-04-16  45  
0c53c8e6e Sam Ravnborg     2007-10-14  46  # If the save-* variables changed error out
0c53c8e6e Sam Ravnborg     2007-10-14  47  ifeq ($(KBUILD_NOPEDANTIC),)

:::::: The code at line 44 was first introduced by commit
:::::: 0c53c8e6eb456cde30f2305421c605713856abc8 kbuild: check for wrong use of CFLAGS

:::::: TO: Sam Ravnborg <sam@neptun.(none)>
:::::: CC: Sam Ravnborg <sam@neptun.(none)>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author
#13 lore raw

PATCH 7/9 selftests: Update ptp Makefile to work under selftests

In reply to Shuah Khan

Update ptp Makefile to work under selftests. ptp will not be run as part of selftests suite and will not included in install targets. They can be built separately for now.

---
 tools/testing/selftests/ptp/Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/ptp/Makefile +6 -6
index 293d6c0..f4a7238 100644
@@ -1,8 +1,8 @@
-# List of programs to build
-hostprogs-y := testptp
+TEST_PROGS := testptp
+LDLIBS += -lrt
+all: $(TEST_PROGS)
 
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
+include ../lib.mk
 
-HOSTCFLAGS_testptp.o += -I$(objtree)/usr/include
-HOSTLOADLIBES_testptp := -lrt
+clean:
+	rm -fr testptp
Signature · 1 line
2.7.4
#14 lore raw

Re: [PATCH 7/9] selftests: Update ptp Makefile to work under selftests

Hello.

Quoted 2 lines · Shuah Khan

Update ptp Makefile to work under selftests. ptp will not be run as part of selftests suite and will not included in install targets. They can be

^ be

Quoted 3 lines

built separately for now.

[...]

MBR, Sergei

author
#15 lore raw

PATCH 8/9 selftests: move vDSO tests from Documentation/vDSO

In reply to Shuah Khan

Move vDSO tests from Documentation/vDSO to selftests/vDSO.

---
 Documentation/vDSO/.gitignore                      |   2 -
 Documentation/vDSO/Makefile                        |  17 --
 Documentation/vDSO/parse_vdso.c                    | 269 ---------------------
 Documentation/vDSO/vdso_standalone_test_x86.c      | 128 ----------
 Documentation/vDSO/vdso_test.c                     |  52 ----
 tools/testing/selftests/vDSO/.gitignore            |   2 +
 tools/testing/selftests/vDSO/Makefile              |  17 ++
 tools/testing/selftests/vDSO/parse_vdso.c          | 269 +++++++++++++++++++++
 .../selftests/vDSO/vdso_standalone_test_x86.c      | 128 ++++++++++
 tools/testing/selftests/vDSO/vdso_test.c           |  52 ++++
 10 files changed, 468 insertions(+), 468 deletions(-)
 delete mode 100644 Documentation/vDSO/.gitignore
 delete mode 100644 Documentation/vDSO/Makefile
 delete mode 100644 Documentation/vDSO/parse_vdso.c
 delete mode 100644 Documentation/vDSO/vdso_standalone_test_x86.c
 delete mode 100644 Documentation/vDSO/vdso_test.c
 create mode 100644 tools/testing/selftests/vDSO/.gitignore
 create mode 100644 tools/testing/selftests/vDSO/Makefile
 create mode 100644 tools/testing/selftests/vDSO/parse_vdso.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_standalone_test_x86.c
 create mode 100644 tools/testing/selftests/vDSO/vdso_test.c
Documentation/vDSO/.gitignore deleted +0 -2
deleted file mode 100644
index 133bf9e..0000000
@@ -1,2 +0,0 @@
-vdso_test
-vdso_standalone_test_x86
Documentation/vDSO/Makefile deleted +0 -17
deleted file mode 100644
index b12e987..0000000
@@ -1,17 +0,0 @@
-ifndef CROSS_COMPILE
-# vdso_test won't build for glibc < 2.16, so disable it
-# hostprogs-y := vdso_test
-hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86
-vdso_standalone_test_x86-objs := vdso_standalone_test_x86.o parse_vdso.o
-vdso_test-objs := parse_vdso.o vdso_test.o
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99
-HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector
-HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib
-ifeq ($(CONFIG_X86_32),y)
-HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s
-endif
-endif
Documentation/vDSO/parse_vdso.c deleted +0 -269

269 lines not on this page · raw message

Documentation/vDSO/vdso_standalone_test_x86.c deleted +0 -128

128 lines not on this page · raw message

Documentation/vDSO/vdso_test.c deleted +0 -52

52 lines not on this page · raw message

tools/testing/selftests/vDSO/.gitignore new file +2 -0
new file mode 100644
index 0000000..133bf9e
@@ -0,0 +1,2 @@
+vdso_test
+vdso_standalone_test_x86
tools/testing/selftests/vDSO/Makefile new file +17 -0
new file mode 100644
index 0000000..b12e987
@@ -0,0 +1,17 @@
+ifndef CROSS_COMPILE
+# vdso_test won't build for glibc < 2.16, so disable it
+# hostprogs-y := vdso_test
+hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86
+vdso_standalone_test_x86-objs := vdso_standalone_test_x86.o parse_vdso.o
+vdso_test-objs := parse_vdso.o vdso_test.o
+
+# Tell kbuild to always build the programs
+always := $(hostprogs-y)
+
+HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99
+HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector
+HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib
+ifeq ($(CONFIG_X86_32),y)
+HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s
+endif
+endif
tools/testing/selftests/vDSO/parse_vdso.c new file +269 -0

269 lines not on this page · raw message

tools/testing/selftests/vDSO/vdso_standalone_test_x86.c new file +128 -0

128 lines not on this page · raw message

tools/testing/selftests/vDSO/vdso_test.c new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.7.4
#16 lore raw

Re: [PATCH 8/9] selftests: move vDSO tests from Documentation/vDSO

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538 config: i386-tinyconfig (attached as .config) compiler: gcc-6…

Hi Shuah,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.8-rc5 next-20160909]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Shuah-Khan/Move-runnable-code-tests-from-Documentation-to-selftests/20160910-063538
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:

        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> scripts/Makefile.build:44: Documentation/vDSO/Makefile: No such file or directory
>> make[3]: *** No rule to make target 'Documentation/vDSO/Makefile'.

make[3]: Failed to remake makefile 'Documentation/vDSO/Makefile'.

vim +44 scripts/Makefile.build

f77bf0142 Sam Ravnborg     2007-10-15  28  ldflags-y  :=
d72e5edbf Sam Ravnborg     2007-05-28  29  
720097d89 Sam Ravnborg     2009-04-19  30  subdir-asflags-y :=
720097d89 Sam Ravnborg     2009-04-19  31  subdir-ccflags-y :=
720097d89 Sam Ravnborg     2009-04-19  32  
3156fd052 Robert P. J. Day 2008-02-18  33  # Read auto.conf if it exists, otherwise ignore
c955ccafc Roman Zippel     2006-06-08  34  -include include/config/auto.conf
^1da177e4 Linus Torvalds   2005-04-16  35  
20a468b51 Sam Ravnborg     2006-01-22  36  include scripts/Kbuild.include
20a468b51 Sam Ravnborg     2006-01-22  37  
3156fd052 Robert P. J. Day 2008-02-18  38  # For backward compatibility check that these variables do not change
0c53c8e6e Sam Ravnborg     2007-10-14  39  save-cflags := $(CFLAGS)
0c53c8e6e Sam Ravnborg     2007-10-14  40  
2a6914703 Sam Ravnborg     2005-07-25  41  # The filename Kbuild has precedence over Makefile
db8c1a7b2 Sam Ravnborg     2005-07-27  42  kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
0c53c8e6e Sam Ravnborg     2007-10-14  43  kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
0c53c8e6e Sam Ravnborg     2007-10-14 @44  include $(kbuild-file)
^1da177e4 Linus Torvalds   2005-04-16  45  
0c53c8e6e Sam Ravnborg     2007-10-14  46  # If the save-* variables changed error out
0c53c8e6e Sam Ravnborg     2007-10-14  47  ifeq ($(KBUILD_NOPEDANTIC),)
0c53c8e6e Sam Ravnborg     2007-10-14  48          ifneq ("$(save-cflags)","$(CFLAGS)")
49c57d254 Arnaud Lacombe   2011-08-15  49                  $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y)
0c53c8e6e Sam Ravnborg     2007-10-14  50          endif
0c53c8e6e Sam Ravnborg     2007-10-14  51  endif
4a5838ad9 Borislav Petkov  2011-03-01  52  

:::::: The code at line 44 was first introduced by commit
:::::: 0c53c8e6eb456cde30f2305421c605713856abc8 kbuild: check for wrong use of CFLAGS

:::::: TO: Sam Ravnborg <sam@neptun.(none)>
:::::: CC: Sam Ravnborg <sam@neptun.(none)>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

author
#17 lore raw

PATCH 9/9 selftests: Update vDSO Makefile to work under selftests

In reply to Shuah Khan

Update vDSO Makefile to work under selftests. vDSO will not be run as part of selftests suite and will not included in install targets. They can be built separately for now.

---
 tools/testing/selftests/vDSO/Makefile | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
tools/testing/selftests/vDSO/Makefile +16 -13
index b12e987..706b68b 100644
@@ -1,17 +1,20 @@
 ifndef CROSS_COMPILE
-# vdso_test won't build for glibc < 2.16, so disable it
-# hostprogs-y := vdso_test
-hostprogs-$(CONFIG_X86) := vdso_standalone_test_x86
-vdso_standalone_test_x86-objs := vdso_standalone_test_x86.o parse_vdso.o
-vdso_test-objs := parse_vdso.o vdso_test.o
-
-# Tell kbuild to always build the programs
-always := $(hostprogs-y)
-
-HOSTCFLAGS := -I$(objtree)/usr/include -std=gnu99
-HOSTCFLAGS_vdso_standalone_test_x86.o := -fno-asynchronous-unwind-tables -fno-stack-protector
-HOSTLOADLIBES_vdso_standalone_test_x86 := -nostdlib
+CFLAGS := -std=gnu99
+CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
 ifeq ($(CONFIG_X86_32),y)
-HOSTLOADLIBES_vdso_standalone_test_x86 += -lgcc_s
+LDLIBS += -lgcc_s
 endif
+
+TEST_PROGS := vdso_test vdso_standalone_test_x86
+
+all: $(TEST_PROGS)
+vdso_test: parse_vdso.c vdso_test.c
+vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
+	$(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
+		vdso_standalone_test_x86.c parse_vdso.c \
+		-o vdso_standalone_test_x86
+
+include ../lib.mk
+clean:
+	rm -fr $(TEST_PROGS)
 endif
Signature · 1 line
2.7.4
#18 lore raw

Re: [PATCH 9/9] selftests: Update vDSO Makefile to work under selftests

Quoted 2 lines · Shuah Khan

Update vDSO Makefile to work under selftests. vDSO will not be run as part of selftests suite and will not included in install targets. They can be

^ be

Quoted 3 lines

built separately for now.

[...]

MBR, Sergei

maintainer
#19 lore raw
In reply to Shuah Khan
Quoted 8 lines · On Fri, 9 Sep 2016 16:22:41 -0600 Shuah Khan <[email protected]> wrote:

Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.

Jon Corbet and I discussed this in an email thread and as per that discussion, this patch series moves all the tests that are under the Documentation directory to selftests. There is more runnable code in the form of examples and utils and that is going to be another patch series. I moved just the tests and left the documentation files as is.

I'm fine with the idea, but it looks like a couple of tweaks are needed, in particular to avoid leaving behind dangling references in Documentation/Makefile that cause build errors.

I think the individual patches probably need a wider CC list as well. I'd use the get_maintainer script (or git) to see who has taken an interest in the individual tests and make sure they are aware of the move.

Thanks,

jon

#20 lore raw
Quoted 12 lines · Jonathan Corbet
Quoted 8 lines · On Fri, 9 Sep 2016 16:22:41 -0600 Shuah Khan <[email protected]> wrote:

Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.

Jon Corbet and I discussed this in an email thread and as per that discussion, this patch series moves all the tests that are under the Documentation directory to selftests. There is more runnable code in the form of examples and utils and that is going to be another patch series. I moved just the tests and left the documentation files as is.

Quoted 8 lines

I'm fine with the idea, but it looks like a couple of tweaks are needed, in particular to avoid leaving behind dangling references in Documentation/Makefile that cause build errors.

I think the individual patches probably need a wider CC list as well. I'd use the get_maintainer script (or git) to see who has taken an interest in the individual tests and make sure they are aware of the move.

FWIW, I'm in favor of moving *all* the code away from Documentation, not just tests. Essentially removing the CONFIG_BUILD_DOCSRC config option, and reserving Documentation/Makefile for documentation build. After this series, some of the remaining code belongs under samples, some under tools.

We could make it possible to include the code samples from samples into the Sphinx built documentation.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
author
#21 lore raw
Quoted 22 lines · Jani Nikula
Quoted 12 lines · Jonathan Corbet
Quoted 8 lines · On Fri, 9 Sep 2016 16:22:41 -0600 Shuah Khan <[email protected]> wrote:

Move runnable code (tests) from Documentation to selftests and update Makefiles to work under selftests.

Jon Corbet and I discussed this in an email thread and as per that discussion, this patch series moves all the tests that are under the Documentation directory to selftests. There is more runnable code in the form of examples and utils and that is going to be another patch series. I moved just the tests and left the documentation files as is.

Quoted 8 lines

I'm fine with the idea, but it looks like a couple of tweaks are needed, in particular to avoid leaving behind dangling references in Documentation/Makefile that cause build errors.

I think the individual patches probably need a wider CC list as well. I'd use the get_maintainer script (or git) to see who has taken an interest in the individual tests and make sure they are aware of the move.

Quoted 5 lines

FWIW, I'm in favor of moving *all* the code away from Documentation, not just tests. Essentially removing the CONFIG_BUILD_DOCSRC config option, and reserving Documentation/Makefile for documentation build. After this series, some of the remaining code belongs under samples, some under tools.

I am planning another patch series to move all the examples and samples and tools to their right location.

Quoted 7 lines

We could make it possible to include the code samples from samples into the Sphinx built documentation.

BR,
Jani.

I can't say I understand Sphinx, however, it might make sense to include samples into Sphinx build. Is this approach different from the way they are built under Documentation via Doc Makfiles now?

thanks,
-- Shuah

#22 lore raw
Quoted 9 lines · Shuah Khan
Quoted 5 lines · Jani Nikula

FWIW, I'm in favor of moving *all* the code away from Documentation, not just tests. Essentially removing the CONFIG_BUILD_DOCSRC config option, and reserving Documentation/Makefile for documentation build. After this series, some of the remaining code belongs under samples, some under tools.

I am planning another patch series to move all the examples and samples and tools to their right location.

Great!

Quoted 6 lines
Quoted 2 lines

We could make it possible to include the code samples from samples into the Sphinx built documentation.

I can't say I understand Sphinx, however, it might make sense to include samples into Sphinx build. Is this approach different from the way they are built under Documentation via Doc Makfiles now?

It's just that by default Sphinx won't allow including files outside of its root directory, which is Documentation in this case. It just needs an extension for this.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center