Commit 03f0f5ad authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux-kselftest-fixes-5.10-rc3' of...

Merge tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest fixes from Shuah Khan:
 "Fixes to the ftrace test and several fixes from Tommi Rantala for
  various other tests"

* tag 'linux-kselftest-fixes-5.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: binderfs: use SKIP instead of XFAIL
  selftests: clone3: use SKIP instead of XFAIL
  selftests: core: use SKIP instead of XFAIL in close_range_test.c
  selftests: proc: fix warning: _GNU_SOURCE redefined
  selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c
  selftests: pidfd: add CONFIG_CHECKPOINT_RESTORE=y to config
  selftests: pidfd: skip test on kcmp() ENOSYS
  selftests: pidfd: use ksft_test_result_skip() when skipping test
  selftests/harness: prettify SKIP message whitespace again
  selftests: pidfd: fix compilation errors due to wait.h
  selftests: filter kselftest headers from command in lib.mk
  selftests/ftrace: check for do_sys_openat2 in user-memory test
  selftests/ftrace: Use $FUNCTION_FORK to reference kernel fork function
parents d4fc9683 7d764b68
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ TEST(clone3_cap_checkpoint_restore)
	test_clone3_supported();

	EXPECT_EQ(getuid(), 0)
		XFAIL(return, "Skipping all tests as non-root\n");
		SKIP(return, "Skipping all tests as non-root");

	memset(&set_tid, 0, sizeof(set_tid));

+4 −4
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ TEST(close_range)
		fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
		ASSERT_GE(fd, 0) {
			if (errno == ENOENT)
				XFAIL(return, "Skipping test since /dev/null does not exist");
				SKIP(return, "Skipping test since /dev/null does not exist");
		}

		open_fds[i] = fd;
@@ -52,7 +52,7 @@ TEST(close_range)

	EXPECT_EQ(-1, sys_close_range(open_fds[0], open_fds[100], -1)) {
		if (errno == ENOSYS)
			XFAIL(return, "close_range() syscall not supported");
			SKIP(return, "close_range() syscall not supported");
	}

	EXPECT_EQ(0, sys_close_range(open_fds[0], open_fds[50], 0));
@@ -108,7 +108,7 @@ TEST(close_range_unshare)
		fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
		ASSERT_GE(fd, 0) {
			if (errno == ENOENT)
				XFAIL(return, "Skipping test since /dev/null does not exist");
				SKIP(return, "Skipping test since /dev/null does not exist");
		}

		open_fds[i] = fd;
@@ -197,7 +197,7 @@ TEST(close_range_unshare_capped)
		fd = open("/dev/null", O_RDONLY | O_CLOEXEC);
		ASSERT_GE(fd, 0) {
			if (errno == ENOENT)
				XFAIL(return, "Skipping test since /dev/null does not exist");
				SKIP(return, "Skipping test since /dev/null does not exist");
		}

		open_fds[i] = fd;
+4 −4
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static int __do_binderfs_test(struct __test_metadata *_metadata)
	ret = mount(NULL, binderfs_mntpt, "binder", 0, 0);
	EXPECT_EQ(ret, 0) {
		if (errno == ENODEV)
			XFAIL(goto out, "binderfs missing");
			SKIP(goto out, "binderfs missing");
		TH_LOG("%s - Failed to mount binderfs", strerror(errno));
		goto rmdir;
	}
@@ -475,10 +475,10 @@ TEST(binderfs_stress)
TEST(binderfs_test_privileged)
{
	if (geteuid() != 0)
		XFAIL(return, "Tests are not run as root. Skipping privileged tests");
		SKIP(return, "Tests are not run as root. Skipping privileged tests");

	if (__do_binderfs_test(_metadata))
		XFAIL(return, "The Android binderfs filesystem is not available");
		SKIP(return, "The Android binderfs filesystem is not available");
}

TEST(binderfs_test_unprivileged)
@@ -511,7 +511,7 @@ TEST(binderfs_test_unprivileged)
	ret = wait_for_pid(pid);
	if (ret) {
		if (ret == 2)
			XFAIL(return, "The Android binderfs filesystem is not available");
			SKIP(return, "The Android binderfs filesystem is not available");
		ASSERT_EQ(ret, 0) {
			TH_LOG("wait_for_pid() failed");
		}
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
echo 0 > events/enable
echo > dynamic_events

PLACE=kernel_clone
PLACE=$FUNCTION_FORK

echo "p:myevent1 $PLACE" >> dynamic_events
echo "r:myevent2 $PLACE" >> dynamic_events
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
echo 0 > events/enable
echo > dynamic_events

PLACE=kernel_clone
PLACE=$FUNCTION_FORK

setup_events() {
echo "p:myevent1 $PLACE" >> dynamic_events
Loading