From patchwork Fri Nov 1 22:25:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 13859820 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D4A11BDC3 for ; Fri, 1 Nov 2024 22:26:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730499965; cv=none; b=WBc7jqjuUn/36BAFuvqMpSbFc8wseVroZfMjClcJYufIcR2bZqzxhha1hqnRr6Dby2a0S0VlG/TUFdBUea7ijMd63jR7tghrLovxxmArkE7rcYRViMZilEaOlJDiUBPzqfm+evAt8JHSCs2bLxPFLZHoY4YWu+d4pPw1zfSFbBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730499965; c=relaxed/simple; bh=8WgB+62A7m8cWy56yXF5qm8X2qWqEnpgx23YDfgFxSQ=; h=Content-Type:Message-ID:Date:MIME-Version:To:Cc:From:Subject; b=XtTOFZMleKu5MxHBefLbJYTXBgVjGyIt6yPMyHBBCWHX9p33nLMxKFxwt2ywVTha1FaaLpa7phy5vLy985SnXaiPTZpNHe8fgVleuMlDfahzyHeQA+cduFTBg45KX1FS/Pb9KV4ia2bvBRct1ElI7HWVLsuL96Nt9f8WK32yo8Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Z5qGOj6c; arc=none smtp.client-ip=209.85.166.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Z5qGOj6c" Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3a6af694220so6308915ab.1 for ; Fri, 01 Nov 2024 15:26:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1730499962; x=1731104762; darn=vger.kernel.org; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8ge729bSSFQAYpLNOdK0tpr7ndevPxzGAiO91GEVbAI=; b=Z5qGOj6cp1OojGsOY+MNhmmCsflofIh7dT843Msu4Dd1Vs4RI9dW1fxchTH1wDJlzj 6M6lqBZ4v+D/IdmapvHPeKSFK38kGC6VmqlVm33meWxNE+4cqAWMNBZNBW+8d4/v95FR xXLdiG7pTajcnHsskUP9bRfkGOlk0v6zfn810= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730499962; x=1731104762; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8ge729bSSFQAYpLNOdK0tpr7ndevPxzGAiO91GEVbAI=; b=L2DhT9IiGJUOGm9YuEiIAtT+zcv1YUkb3TsnyzHL1YYP0V/9+iSxkLi+oBztQOq6xW m2ZsgJD4vnxlOltJ4H8v6jrqzG0VgCBd4HPiIzhCgZ2ZYOHQD01Co3UTyKIZbXm1pngH pjK/p0H5ZVFaUaMrSjsCaapBUWm9Dy/a2VEGL5sLvDVLP2YtBEZdGxskFcH2KIwJJ3WW xTJQ0Bi/uGJVp0KN+xsMEtdCVx2reHJS06Tu1oEyv2qvRlRdO58WaUpGhAlykg+hHx3j XKAPapwAfkSyQCoDyF4LAPOI3ue2xaMsWUEt32cik75PtkaUgAUDYAgL+8GoU35acB8x eAfA== X-Forwarded-Encrypted: i=1; AJvYcCV4O2WCgtT/Po8240IxoWh5e3Ib67SvcN9LUR1UkNQ8j/6UJct3m3E9bJEoQcxLC7xl9tZdg9VmM7HrAlwU0Rc=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3IAtIER7X4SP9HQhYQfTKrVEPrFKN/0+zJpJYwDr16bnpbimX nnbXxw1a+SaGZ/3OIaZquzAMHTnYfKLeJ8WBjnGn0j2VWuY/uchdTCUv8HUcbBU= X-Google-Smtp-Source: AGHT+IEvYE5zUHozExbViAHlGqJiGaGQHg144qdlk8/veuvlKcr3K0IHDHd14kM6ALRohdTfbejSxA== X-Received: by 2002:a05:6e02:152b:b0:3a6:af68:6679 with SMTP id e9e14a558f8ab-3a6b03cc437mr62099095ab.25.1730499961547; Fri, 01 Nov 2024 15:26:01 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3a6adbf2303sm8391095ab.47.2024.11.01.15.26.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Nov 2024 15:26:00 -0700 (PDT) Message-ID: <3ae64072-4327-4e92-b0f0-ead3743d4d54@linuxfoundation.org> Date: Fri, 1 Nov 2024 16:25:59 -0600 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Linus Torvalds Cc: shuah , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org From: Shuah Khan Subject: [GIT PULL] Kselftest fixes update for Linux 6.12-rc6 Hi Linus, Please pull the following kselftest fixes update for Linux 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 diff is attached. thanks, -- Shuah ---------------------------------------------------------------- The following changes since commit fe05c40ca9c18cfdb003f639a30fc78a7ab49519: selftest: hid: add the missing tests directory (2024-10-16 15:55:14 -0600) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-fixes-6.12-rc6 for you to fetch changes up to dc1308bee1ed03b4d698d77c8bd670d399dcd04d: selftests/watchdog-test: Fix system accidentally reset after watchdog-test (2024-10-28 21:34:43 -0600) ---------------------------------------------------------------- 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 ---------------------------------------------------------------- Alessandro Zanni (2): selftests/intel_pstate: fix operand expected error selftests/intel_pstate: check if cpupower is installed Li Zhijian (1): selftests/watchdog-test: Fix system accidentally reset after watchdog-test zhouyuhang (1): selftests/mount_setattr: fix idmap_mount_tree_invalid failed to run tools/testing/selftests/intel_pstate/run.sh | 9 +++++++-- tools/testing/selftests/mount_setattr/mount_setattr_test.c | 9 +++++++++ tools/testing/selftests/watchdog/watchdog-test.c | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) --------------------------------------------------------------- diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh index e7008f614ad7..6a3b8503264e 100755 --- a/tools/testing/selftests/intel_pstate/run.sh +++ b/tools/testing/selftests/intel_pstate/run.sh @@ -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` diff --git a/tools/testing/selftests/mount_setattr/mount_setattr_test.c b/tools/testing/selftests/mount_setattr/mount_setattr_test.c index c6a8c732b802..68801e1a9ec2 100644 --- a/tools/testing/selftests/mount_setattr/mount_setattr_test.c +++ b/tools/testing/selftests/mount_setattr/mount_setattr_test.c @@ -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) diff --git a/tools/testing/selftests/watchdog/watchdog-test.c b/tools/testing/selftests/watchdog/watchdog-test.c index bc71cbca0dde..a1f506ba5578 100644 --- a/tools/testing/selftests/watchdog/watchdog-test.c +++ b/tools/testing/selftests/watchdog/watchdog-test.c @@ -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();