lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260108031604.12379-1-sun.jian.kdev@gmail.com>
Date: Thu,  8 Jan 2026 11:16:04 +0800
From: Sun Jian <sun.jian.kdev@...il.com>
To: Shuah Khan <shuah@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	David Hildenbrand <david@...nel.org>,
	linux-kselftest@...r.kernel.org,
	linux-mm@...ck.org,
	linux-kernel@...r.kernel.org,
	Sun Jian <sun.jian.kdev@...il.com>
Subject: [PATCH] selftests/mm: run_vmtests.sh: fix relative path handling

run_vmtests.sh relies on being invoked from its own directory and uses
relative paths to run tests.

Change to the script directory at startup so it can be run from any
working directory without failing.

Signed-off-by: Sun Jian <sun.jian.kdev@...il.com>
---
 tools/testing/selftests/mm/run_vmtests.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index d9173f2312b7..74c33fd07764 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -5,6 +5,10 @@
 # Kselftest framework requirement - SKIP code is 4.
 ksft_skip=4
 
+# Ensure relative paths work regardless of caller's cwd.
+SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
+cd "$SCRIPT_DIR" || exit 1
+
 count_total=0
 count_pass=0
 count_fail=0
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ