Commit 27cc6fdf authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'linux_kselftest-fixes-6.12-rc2' of...

Merge tag 'linux_kselftest-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull kselftest fixes from Shuah Khan:
 "Fixes to build warnings, install scripts, run-time error path, and git
  status cleanups to tests:

   - devices/probe: fix for Python3 regex string syntax warnings

   - clone3: removing unused macro from clone3_cap_checkpoint_restore()

   - vDSO: fix to align getrandom states to cache line

   - core and exec: add missing executables to .gitignore files

   - rtc: change to skip test if /dev/rtc0 can't be accessed

   - timers/posix: fix warn_unused_result result in __fatal_error()

   - breakpoints: fix to detect suspend successful condition correctly

   - hid: fix to install required dependencies to run the test"

* tag 'linux_kselftest-fixes-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: breakpoints: use remaining time to check if suspend succeed
  kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python3
  selftest: hid: add missing run-hid-tools-tests.sh
  selftests: vDSO: align getrandom states to cache line
  selftests: exec: update gitignore for load_address
  selftests: core: add unshare_test to gitignore
  clone3: clone3_cap_checkpoint_restore: remove unused MAX_PID_NS_LEVEL macro
  selftests:timers: posix_timers: Fix warn_unused_result in __fatal_error()
  selftest: rtc: Check if could access /dev/rtc0 before testing
parents ac308609 c66be905
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -152,7 +152,10 @@ void suspend(void)
	if (err < 0)
		ksft_exit_fail_msg("timerfd_settime() failed\n");

	if (write(power_state_fd, "mem", strlen("mem")) != strlen("mem"))
	system("(echo mem > /sys/power/state) 2> /dev/null");

	timerfd_gettime(timerfd, &spec);
	if (spec.it_value.tv_sec != 0 || spec.it_value.tv_nsec != 0)
		ksft_exit_fail_msg("Failed to enter Suspend state\n");

	close(timerfd);
+0 −2
Original line number Diff line number Diff line
@@ -27,8 +27,6 @@
#include "../kselftest_harness.h"
#include "clone3_selftests.h"

#define MAX_PID_NS_LEVEL 32

static void child_exit(int ret)
{
	fflush(stdout);
+1 −0
Original line number Diff line number Diff line
close_range_test
unshare_test
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ def find_pci_controller_dirs():


def find_usb_controller_dirs():
    usb_controller_sysfs_dir = "usb[\d]+"
    usb_controller_sysfs_dir = r"usb[\d]+"

    dir_regex = re.compile(usb_controller_sysfs_dir)
    for d in os.scandir(sysfs_usb_devices):
@@ -91,7 +91,7 @@ def get_acpi_uid(sysfs_dev_dir):


def get_usb_version(sysfs_dev_dir):
    re_usb_version = re.compile("PRODUCT=.*/(\d)/.*")
    re_usb_version = re.compile(r"PRODUCT=.*/(\d)/.*")
    with open(os.path.join(sysfs_dev_dir, "uevent")) as f:
        return int(re_usb_version.search(f.read()).group(1))

+2 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@ execveat.ephemeral
execveat.denatured
non-regular
null-argv
/load_address_*
/load_address.*
!load_address.c
/recursion-depth
xxxxxxxx*
pipe
Loading