[linux] 12/17: selftests: Ignore compiler warnings
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Sat Oct 31 22:18:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch master
in repository linux.
commit ac28c69026ee6a909de51818f3245ae469af804f
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Sat Oct 31 18:45:20 2015 +0000
selftests: Ignore compiler warnings
We can't fix them all yet, and they shouldn't cause a test failure.
Patch memfd makefile to ensure we don't rebuild it and thus emit
warnings during a test run.
---
...selftests-memfd-stop-unnecessary-rebuilds.patch | 34 ++++++++++++++++++++++
debian/patches/series | 1 +
debian/tests/selftests | 3 ++
3 files changed, 38 insertions(+)
diff --git a/debian/patches/bugfix/all/selftests-memfd-stop-unnecessary-rebuilds.patch b/debian/patches/bugfix/all/selftests-memfd-stop-unnecessary-rebuilds.patch
new file mode 100644
index 0000000..a1951d2
--- /dev/null
+++ b/debian/patches/bugfix/all/selftests-memfd-stop-unnecessary-rebuilds.patch
@@ -0,0 +1,34 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Sat, 31 Oct 2015 18:04:28 +0000
+Subject: selftests: memfd: Stop unnecessary rebuilds
+
+Instead of explicitly running the compiler, add dependencies and take
+advantage of implicit rules to build only as necessary.
+
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+--- a/tools/testing/selftests/memfd/Makefile
++++ b/tools/testing/selftests/memfd/Makefile
+@@ -4,16 +4,16 @@ CFLAGS += -I../../../../include/uapi/
+ CFLAGS += -I../../../../include/
+ CFLAGS += -I../../../../usr/include/
+
+-all:
+- $(CC) $(CFLAGS) memfd_test.c -o memfd_test
+-
+ TEST_PROGS := memfd_test
+
++all: $(TEST_PROGS)
++
+ include ../lib.mk
+
+-build_fuse:
+- $(CC) $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt
+- $(CC) $(CFLAGS) fuse_test.c -o fuse_test
++build_fuse: fuse_mnt fuse_test
++
++fuse_mnt.o: CFLAGS += $(shell pkg-config fuse --cflags)
++fuse_mnt: LDFLAGS += $(shell pkg-config fuse --libs)
+
+ run_fuse: build_fuse
+ @./run_fuse_test.sh || echo "fuse_test: [FAIL]"
diff --git a/debian/patches/series b/debian/patches/series
index 4651cd2..c80fa22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -83,3 +83,4 @@ bugfix/all/media-uvcvideo-disable-hardware-timestamps-by-defaul.patch
bugfix/all/ovl-conditionally-use-o_largefile-in-ovl_copy_up.patch
bugfix/all/selftests-add-missing-include-directives.patch
+bugfix/all/selftests-memfd-stop-unnecessary-rebuilds.patch
diff --git a/debian/tests/selftests b/debian/tests/selftests
index b17f883..5acfaa7 100644
--- a/debian/tests/selftests
+++ b/debian/tests/selftests
@@ -43,6 +43,9 @@ if [ "$step" -ge 0 ]; then
cd $ADTTMP/build
make headers_install
+ # Ignore compiler warnings
+ make -C tools/testing/selftests 2>&1 || echo >&2 "Build failed"
+
# Enable testing CLONE_USERNS by unprivileged users
sysctl kernel.unprivileged_userns_clone=1
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list