linux_kselftest-fixes-6.12-rc6
Kselftest fixes for Linux 6.12-rc6 - fix syntax error in frequency calculation arithmetic expression in intel_pstate run.sh - add missing cpupower dependency check intel_pstate run.sh - fix idmap_mount_tree_invalid test failure due to incorrect argument - fix watchdog-test run leaving the watchdog timer enabled causing system reboot. With this fix, the test disables the watchdog timer when it gets terminated with SIGTERM, SIGKILL, and SIGQUIT in addition to SIGINT -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEPZKym/RZuOCGeA/kCwJExA0NQxwFAmclRvcACgkQCwJExA0N Qxxapg//cyUd4ZHBtXV4Wh9C4GOkB57GO7svmwW1F/vxk7GEmoGUDlHL/EobRtbf CK6oHCu98xKe1dL6rkEg4VTc+tiV4Ew7b7iwT3zs6PO1FkiuEwsjDTAugLTIyg1m 1xwkbn5XPA1GopKVf/8JxUiCnpti0L9AhFG3JKYEoZ6DxhrLXLYL2/z61emv3Wgy zRe5SQ51deOIFSxODurDidWzXoNPBjI6Q5pWhpp3Zs+jj2aPZcPn8bjoR34t6Vpa Cqg/OZxCMblkpjANc9PBTOHtqtQUpJD0vQtkHtDMQCZ4lHKcjuszlzwCKXMTwTFI hhCN4WWdPDHHS43y7YyQDp9tacjsDygdD9X625JyO2kKX2BbAPpaRcv4ij8r6MH8 hubtFXUpSMHJQVfOdvd9YjAxBAQBwLOnzdjwRSe3NHN3XNdt3S4rePGP7xXvYbly StAMbrVpf5vwIv356z8O8JcRjJcrJhEL9mIwvIG0reVwxdJq3r7531EPiLxTIs8e U+fO88DDQViKsVzxBUz44ILDwTp4NUOVi0vr5VnZAxd5ahPuq067mnhm7T+7ijXd VgvVS1Rnfc7pQ5LSf7nCGoJrJwxfTZsnwLPydtbYzgzLQg9xfHE7sUSneGG4klvn gMYfdQSYOYhaPbOcCepdoGi/4gRmGSvN8hEZ0w/qyOqmz4yAW8A= =vl/l -----END PGP SIGNATURE----- Merge tag 'linux_kselftest-fixes-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: - fix syntax error in frequency calculation arithmetic expression in intel_pstate run.sh - add missing cpupower dependency check intel_pstate run.sh - fix idmap_mount_tree_invalid test failure due to incorrect argument - fix watchdog-test run leaving the watchdog timer enabled causing system reboot. With this fix, the test disables the watchdog timer when it gets terminated with SIGTERM, SIGKILL, and SIGQUIT in addition to SIGINT * tag 'linux_kselftest-fixes-6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/watchdog-test: Fix system accidentally reset after watchdog-test selftests/intel_pstate: check if cpupower is installed selftests/intel_pstate: fix operand expected error selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run
This commit is contained in:
commit
11066801dd
@ -44,6 +44,11 @@ if [ $UID != 0 ] && [ $EVALUATE_ONLY == 0 ]; then
|
||||
exit $ksft_skip
|
||||
fi
|
||||
|
||||
if ! command -v cpupower &> /dev/null; then
|
||||
echo $msg cpupower could not be found, please install it >&2
|
||||
exit $ksft_skip
|
||||
fi
|
||||
|
||||
max_cpus=$(($(nproc)-1))
|
||||
|
||||
function run_test () {
|
||||
@ -87,9 +92,9 @@ mkt_freq=${_mkt_freq}0
|
||||
|
||||
# Get the ranges from cpupower
|
||||
_min_freq=$(cpupower frequency-info -l | tail -1 | awk ' { print $1 } ')
|
||||
min_freq=$(($_min_freq / 1000))
|
||||
min_freq=$((_min_freq / 1000))
|
||||
_max_freq=$(cpupower frequency-info -l | tail -1 | awk ' { print $2 } ')
|
||||
max_freq=$(($_max_freq / 1000))
|
||||
max_freq=$((_max_freq / 1000))
|
||||
|
||||
|
||||
[ $EVALUATE_ONLY -eq 0 ] && for freq in `seq $max_freq -100 $min_freq`
|
||||
|
@ -1414,6 +1414,13 @@ TEST_F(mount_setattr_idmapped, idmap_mount_tree_invalid)
|
||||
ASSERT_EQ(expected_uid_gid(-EBADF, "/tmp/B/b", 0, 0, 0), 0);
|
||||
ASSERT_EQ(expected_uid_gid(-EBADF, "/tmp/B/BB/b", 0, 0, 0), 0);
|
||||
|
||||
ASSERT_EQ(mount("testing", "/mnt/A", "ramfs", MS_NOATIME | MS_NODEV,
|
||||
"size=100000,mode=700"), 0);
|
||||
|
||||
ASSERT_EQ(mkdir("/mnt/A/AA", 0777), 0);
|
||||
|
||||
ASSERT_EQ(mount("/tmp", "/mnt/A/AA", NULL, MS_BIND | MS_REC, NULL), 0);
|
||||
|
||||
open_tree_fd = sys_open_tree(-EBADF, "/mnt/A",
|
||||
AT_RECURSIVE |
|
||||
AT_EMPTY_PATH |
|
||||
@ -1433,6 +1440,8 @@ TEST_F(mount_setattr_idmapped, idmap_mount_tree_invalid)
|
||||
ASSERT_EQ(expected_uid_gid(-EBADF, "/tmp/B/BB/b", 0, 0, 0), 0);
|
||||
ASSERT_EQ(expected_uid_gid(open_tree_fd, "B/b", 0, 0, 0), 0);
|
||||
ASSERT_EQ(expected_uid_gid(open_tree_fd, "B/BB/b", 0, 0, 0), 0);
|
||||
|
||||
(void)umount2("/mnt/A", MNT_DETACH);
|
||||
}
|
||||
|
||||
TEST_F(mount_setattr, mount_attr_nosymfollow)
|
||||
|
@ -334,7 +334,13 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("Watchdog Ticking Away!\n");
|
||||
|
||||
/*
|
||||
* Register the signals
|
||||
*/
|
||||
signal(SIGINT, term);
|
||||
signal(SIGTERM, term);
|
||||
signal(SIGKILL, term);
|
||||
signal(SIGQUIT, term);
|
||||
|
||||
while (1) {
|
||||
keep_alive();
|
||||
|
Loading…
Reference in New Issue
Block a user