Hi Linus,
Please pull the following Kselftest update for 4.17-rc1
This Kselftest update for 4.17-rc1 consists of:
- Test build error fixes.
- Fixes to prevent intel_pstate from building on non-x86 systems.
- New test for ion with vgem driver.
- Change to print the test name to /dev/kmsg to add context to kernel
failures if any uncovered from running the test.
- Kselftest framework enhancements to add KSFT_TAP_LEVEL environment
variable to prevent nested TAP headers being printed in the Kselftest
output. Nested TAP13 headers could cause problems for some parsers.
This change suppresses the nested headers from test programs and test
shell scripts with changes to framework and Makefiles without changing
the tests.
Diff for the update is attached.
thanks,
-- Shuah
-----------------------------------------------------------------------------------
The following changes since commit 661e50bc853209e41a5c14a290ca4decc43cbfd1:
Linux 4.16-rc4 (2018-03-04 14:54:11 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-4.17-rc1
for you to fetch changes up to 6aa69043d9f3f4adc5b3817ccfcac1fddfe10ded:
selftests/intel_pstate: Fix build rule for x86 (2018-04-02 11:55:47 -0600)
----------------------------------------------------------------
linux-kselftest-4.17-rc1
This Kselftest update for 4.17-rc1 consists of:
- Test build error fixes.
- Fixes to prevent intel_pstate from building on non-x86 systems.
- New test for ion with vgem driver.
- Change to print the test name to /dev/kmsg to add context to kernel
failures if any uncovered from running the test.
- Kselftest framework enhancements to add KSFT_TAP_LEVEL environment
variable to prevent nested TAP headers being printed in the Kselftest
output. Nested TAP13 headers could cause problems for some parsers.
This change suppresses the nested headers from test programs and test
shell scripts with changes to framework and Makefiles without changing
the tests.
----------------------------------------------------------------
Anders Roxell (1):
selftests/android/ion: Makefile: fix build error
Daniel Díaz (1):
selftests/intel_pstate: Fix build rule for x86
Kees Cook (1):
selftests/seccomp: Allow get_metadata to XFAIL
Laura Abbott (2):
selftests: ion: Remove some prints
selftests: ion: Add simple test with the vgem driver
Michael Ellerman (1):
selftests: Print the test we're running to /dev/kmsg
Shuah Khan (4):
selftests: kselftest framework: add handling for TAP header level
selftests: lib.mk set KSFT_TAP_LEVEL to prevent nested TAP headers
selftests: Makefile set KSFT_TAP_LEVEL to prevent nested TAP headers
selftests: futex Makefile add top level TAP header echo to RUN_TESTS
tools/testing/selftests/Makefile | 11 +-
tools/testing/selftests/android/ion/.gitignore | 1 +
tools/testing/selftests/android/ion/Makefile | 5 +-
tools/testing/selftests/android/ion/config | 1 +
tools/testing/selftests/android/ion/ionmap_test.c | 136 ++++++++++++++++++++++
tools/testing/selftests/android/ion/ionutils.c | 6 -
tools/testing/selftests/futex/Makefile | 4 +
tools/testing/selftests/intel_pstate/Makefile | 5 +-
tools/testing/selftests/kselftest.h | 3 +-
tools/testing/selftests/kselftest_harness.h | 26 ++++-
tools/testing/selftests/lib.mk | 1 +
tools/testing/selftests/seccomp/seccomp_bpf.c | 15 ++-
12 files changed, 200 insertions(+), 14 deletions(-)
create mode 100644 tools/testing/selftests/android/ion/ionmap_test.c
-----------------------------------------------------------------------------------
gcc warns about implicit declaration.
gcc -D_FILE_OFFSET_BITS=64 -I../../../../include/uapi/
-I../../../../include/ -I../../../../usr/include/
memfd_test.c common.o -o memfd_test
memfd_test.c: In function ‘mfd_assert_get_seals’:
memfd_test.c:74:6: warning: implicit declaration of function ‘fcntl’
[-Wimplicit-function-declaration]
r = fcntl(fd, F_GET_SEALS);
^~~~~
memfd_test.c: In function ‘mfd_assert_open’:
memfd_test.c:197:6: warning: implicit declaration of function ‘open’
[-Wimplicit-function-declaration]
r = open(buf, flags, mode);
^~~~
memfd_test.c: In function ‘mfd_assert_write’:
memfd_test.c:328:6: warning: implicit declaration of function ‘fallocate’
[-Wimplicit-function-declaration]
r = fallocate(fd,
^~~~~~~~~
In the current code, we include the headers that the functions want
according to the man pages, and we add some defines that will be used if
they isn't found in glibc. The defines was added into the kernel source
in kernel >= 3.16 and glibc requires kernel header files >= 3.2.
Fixes: 4f5ce5e8d7e2 ("selftests: add memfd_create() + sealing tests")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/memfd/memfd_test.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index 10baa1652fc2..0dbeb29c094c 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -6,7 +6,6 @@
#include <inttypes.h>
#include <limits.h>
#include <linux/falloc.h>
-#include <linux/fcntl.h>
#include <linux/memfd.h>
#include <sched.h>
#include <stdio.h>
@@ -14,13 +13,37 @@
#include <signal.h>
#include <string.h>
#include <sys/mman.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/wait.h>
+#include <fcntl.h>
#include <unistd.h>
#include "common.h"
+#ifndef F_LINUX_SPECIFIC_BASE
+# define F_LINUX_SPECIFIC_BASE 1024
+#endif
+#ifndef F_ADD_SEALS
+# define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#endif
+#ifndef F_GET_SEALS
+# define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#endif
+#ifndef F_SEAL_SEAL
+# define F_SEAL_SEAL 0x0001 /* prevent further seals from being set */
+#endif
+#ifndef F_SEAL_SHRINK
+# define F_SEAL_SHRINK 0x0002 /* prevent file from shrinking */
+#endif
+#ifndef F_SEAL_GROW
+# define F_SEAL_GROW 0x0004 /* prevent file from growing */
+#endif
+#ifndef F_SEAL_WRITE
+# define F_SEAL_WRITE 0x0008 /* prevent writes */
+#endif
+
#define MEMFD_STR "memfd:"
#define MEMFD_HUGE_STR "memfd-hugetlb:"
#define SHARED_FT_STR "(shared file-table)"
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Commit 65c79230576 tried to clear the custom firmware path on exit by
writing a single space to the firmware_class.path parameter. This
doesn't work because nothing strips this space from the value stored
and fw_get_filesystem_firmware() only ignores zero-length paths.
Instead, write a null byte.
Fixes: 0a8adf58475 ("test: add firmware_class loader test")
Fixes: 65c79230576 ("test_firmware: fix setting old custom fw path back on exit")
Signed-off-by: Ben Hutchings <ben.hutchings(a)codethink.co.uk>
---
tools/testing/selftests/firmware/fw_filesystem.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing/selftests/firmware/fw_filesystem.sh
index f9508e1a4058..6b63b6bf2661 100755
--- a/tools/testing/selftests/firmware/fw_filesystem.sh
+++ b/tools/testing/selftests/firmware/fw_filesystem.sh
@@ -46,9 +46,11 @@ test_finish()
echo "$OLD_TIMEOUT" >/sys/class/firmware/timeout
fi
if [ "$OLD_FWPATH" = "" ]; then
- OLD_FWPATH=" "
+ # A zero-length write won't work; write a null byte
+ printf '\000' >/sys/module/firmware_class/parameters/path
+ else
+ echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
fi
- echo -n "$OLD_FWPATH" >/sys/module/firmware_class/parameters/path
rm -f "$FW"
rmdir "$FWPATH"
}
--
2.16.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Colin Ian King <colin.king(a)canonical.com>
Trivial fix to spelling mistake in message text
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
index c5ef8b9d02b3..1b8faf4c318c 100644
--- a/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
+++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc
@@ -35,7 +35,7 @@ do_reset
reset_trigger
-echo "Test histogram multiple tiggers"
+echo "Test histogram multiple triggers"
echo 'hist:keys=parent_pid:vals=child_pid' > events/sched/sched_process_fork/trigger
echo 'hist:keys=parent_comm:vals=child_pid' >> events/sched/sched_process_fork/trigger
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html