All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,sj@kernel.org,lienze@kylinos.cn,akpm@linux-foundation.org
Subject: [merged mm-stable] selftests-damon-introduce-_commonsh-to-host-shared-function.patch removed from -mm tree
Date: Sat, 26 Jul 2025 15:10:31 -0700	[thread overview]
Message-ID: <20250726221031.B1503C4CEED@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: selftests/damon: introduce _common.sh to host shared function
has been removed from the -mm tree.  Its filename was
     selftests-damon-introduce-_commonsh-to-host-shared-function.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Enze Li <lienze@kylinos.cn>
Subject: selftests/damon: introduce _common.sh to host shared function
Date: Fri, 18 Jul 2025 14:42:17 +0800

The current test scripts contain duplicated root permission checks in
multiple locations.  This patch consolidates these checks into _common.sh
to eliminate code redundancy.

Link: https://lkml.kernel.org/r/20250718064217.299300-1-lienze@kylinos.cn
Signed-off-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/selftests/damon/_common.sh                         |   11 ++++++++++
 tools/testing/selftests/damon/lru_sort.sh                        |    8 ++-----
 tools/testing/selftests/damon/reclaim.sh                         |    8 ++-----
 tools/testing/selftests/damon/sysfs.sh                           |   11 +---------
 tools/testing/selftests/damon/sysfs_update_removed_scheme_dir.sh |    8 ++-----
 5 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/tools/testing/selftests/damon/_common.sh a/tools/testing/selftests/damon/_common.sh
new file mode 100644
--- /dev/null
+++ a/tools/testing/selftests/damon/_common.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+
+check_dependencies()
+{
+	if [ $EUID -ne 0 ]
+	then
+		echo "Run as root"
+		exit $ksft_skip
+	fi
+}
--- a/tools/testing/selftests/damon/lru_sort.sh~selftests-damon-introduce-_commonsh-to-host-shared-function
+++ a/tools/testing/selftests/damon/lru_sort.sh
@@ -1,14 +1,12 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
+source _common.sh
+
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
-if [ $EUID -ne 0 ]
-then
-	echo "Run as root"
-	exit $ksft_skip
-fi
+check_dependencies
 
 damon_lru_sort_enabled="/sys/module/damon_lru_sort/parameters/enabled"
 if [ ! -f "$damon_lru_sort_enabled" ]
--- a/tools/testing/selftests/damon/reclaim.sh~selftests-damon-introduce-_commonsh-to-host-shared-function
+++ a/tools/testing/selftests/damon/reclaim.sh
@@ -1,14 +1,12 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
+source _common.sh
+
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
-if [ $EUID -ne 0 ]
-then
-	echo "Run as root"
-	exit $ksft_skip
-fi
+check_dependencies
 
 damon_reclaim_enabled="/sys/module/damon_reclaim/parameters/enabled"
 if [ ! -f "$damon_reclaim_enabled" ]
--- a/tools/testing/selftests/damon/sysfs.sh~selftests-damon-introduce-_commonsh-to-host-shared-function
+++ a/tools/testing/selftests/damon/sysfs.sh
@@ -1,6 +1,8 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
+source _common.sh
+
 # Kselftest frmework requirement - SKIP code is 4.
 ksft_skip=4
 
@@ -364,14 +366,5 @@ test_damon_sysfs()
 	test_kdamonds "$damon_sysfs/kdamonds"
 }
 
-check_dependencies()
-{
-	if [ $EUID -ne 0 ]
-	then
-		echo "Run as root"
-		exit $ksft_skip
-	fi
-}
-
 check_dependencies
 test_damon_sysfs "/sys/kernel/mm/damon/admin"
--- a/tools/testing/selftests/damon/sysfs_update_removed_scheme_dir.sh~selftests-damon-introduce-_commonsh-to-host-shared-function
+++ a/tools/testing/selftests/damon/sysfs_update_removed_scheme_dir.sh
@@ -1,14 +1,12 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0
 
+source _common.sh
+
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
-if [ $EUID -ne 0 ]
-then
-	echo "Run as root"
-	exit $ksft_skip
-fi
+check_dependencies
 
 damon_sysfs="/sys/kernel/mm/damon/admin"
 if [ ! -d "$damon_sysfs" ]
_

Patches currently in -mm which might be from lienze@kylinos.cn are



                 reply	other threads:[~2025-07-26 22:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250726221031.B1503C4CEED@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=lienze@kylinos.cn \
    --cc=mm-commits@vger.kernel.org \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.