public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: tests: output the directory path for missing custom script
Date: Fri,  6 Feb 2026 10:57:04 +1030	[thread overview]
Message-ID: <a0cfce59143cf99e9c89baa0f4b0f189dfe40687.1770337623.git.wqu@suse.com> (raw)

I hit a mkfs failure locally where I reverted the commit which
introduced the mkfs/040 test case.

However that directory didn't got removed as there are local image files
left due to previous test failure.

This results a very confusing error message:

    [TEST/mkfs]   039-zoned-profiles
 custom test script not found or lacks execution permission
 make: *** [Makefile:557: test-mkfs] Error 1

The reality is, the failure is caused by 040 not 039, but the error
message lacks the proper info on it.

Add the directory name for every test script, so that now the failure
will be more readable:

  TEST     mkfs-tests.sh
    [TEST/mkfs]   001-basic-profiles
 custom test script not found or lacks execution permission ("/home/adam/btrfs-progs/tests/mkfs-tests/002-empty-dir-to-fail")
 make: *** [Makefile:557: test-mkfs] Error 1

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/cli-tests.sh     | 2 +-
 tests/convert-tests.sh | 2 +-
 tests/fuzz-tests.sh    | 2 +-
 tests/misc-tests.sh    | 2 +-
 tests/mkfs-tests.sh    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/cli-tests.sh b/tests/cli-tests.sh
index 3a13cf70ffb0..55dd559c2694 100755
--- a/tests/cli-tests.sh
+++ b/tests/cli-tests.sh
@@ -75,7 +75,7 @@ do
 			_fail "test failed for case $name"
 		fi
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh
index f11adebd4edf..157a8118e79d 100755
--- a/tests/convert-tests.sh
+++ b/tests/convert-tests.sh
@@ -85,7 +85,7 @@ run_one_test() {
 		fi
 		check_test_results "$RESULTS" "$testname"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$testdir\")"
 	fi
 }
 
diff --git a/tests/fuzz-tests.sh b/tests/fuzz-tests.sh
index 666f245836fd..52a2802f0e35 100755
--- a/tests/fuzz-tests.sh
+++ b/tests/fuzz-tests.sh
@@ -74,7 +74,7 @@ do
 			_fail "test failed for case $(basename $i)"
 		fi
 	else
-		_not_run "custom test script not found or lacks execution permission"
+		_not_run "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh
index 2cb8d6081c17..28756c2acde7 100755
--- a/tests/misc-tests.sh
+++ b/tests/misc-tests.sh
@@ -82,7 +82,7 @@ do
 		fi
 		check_test_results "$RESULTS" "$name"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/mkfs-tests.sh b/tests/mkfs-tests.sh
index 55d1dc7ac3e9..6ab1fb77d62b 100755
--- a/tests/mkfs-tests.sh
+++ b/tests/mkfs-tests.sh
@@ -77,7 +77,7 @@ do
 		fi
 		check_test_results "$RESULTS" "$name"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
-- 
2.52.0


WARNING: multiple messages have this Message-ID (diff)
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] btrfs-progs: tests: output the directory path for missing custom script
Date: Sat,  7 Feb 2026 15:05:23 +1030	[thread overview]
Message-ID: <a0cfce59143cf99e9c89baa0f4b0f189dfe40687.1770337623.git.wqu@suse.com> (raw)
Message-ID: <20260207043523.1DAqrQejKQJwdEoNS5YY3AB6UKEcleleiAQUn4N0Gn0@z> (raw)
In-Reply-To: <bac89ac52147344ab6244beef8c0085552a3aacb.1770438921.git.wqu@suse.com>

I hit a mkfs failure locally where I reverted the commit which
introduced the mkfs/040 test case.

However that directory didn't got removed as there are local image files
left due to previous test failure.

This results a very confusing error message:

    [TEST/mkfs]   039-zoned-profiles
 custom test script not found or lacks execution permission
 make: *** [Makefile:557: test-mkfs] Error 1

The reality is, the failure is caused by 040 not 039, but the error
message lacks the proper info on it.

Add the directory name for every test script, so that now the failure
will be more readable:

  TEST     mkfs-tests.sh
    [TEST/mkfs]   001-basic-profiles
 custom test script not found or lacks execution permission ("/home/adam/btrfs-progs/tests/mkfs-tests/002-empty-dir-to-fail")
 make: *** [Makefile:557: test-mkfs] Error 1

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 tests/cli-tests.sh     | 2 +-
 tests/convert-tests.sh | 2 +-
 tests/fuzz-tests.sh    | 2 +-
 tests/misc-tests.sh    | 2 +-
 tests/mkfs-tests.sh    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/cli-tests.sh b/tests/cli-tests.sh
index 3a13cf70ffb0..55dd559c2694 100755
--- a/tests/cli-tests.sh
+++ b/tests/cli-tests.sh
@@ -75,7 +75,7 @@ do
 			_fail "test failed for case $name"
 		fi
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/convert-tests.sh b/tests/convert-tests.sh
index f11adebd4edf..157a8118e79d 100755
--- a/tests/convert-tests.sh
+++ b/tests/convert-tests.sh
@@ -85,7 +85,7 @@ run_one_test() {
 		fi
 		check_test_results "$RESULTS" "$testname"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$testdir\")"
 	fi
 }
 
diff --git a/tests/fuzz-tests.sh b/tests/fuzz-tests.sh
index 666f245836fd..52a2802f0e35 100755
--- a/tests/fuzz-tests.sh
+++ b/tests/fuzz-tests.sh
@@ -74,7 +74,7 @@ do
 			_fail "test failed for case $(basename $i)"
 		fi
 	else
-		_not_run "custom test script not found or lacks execution permission"
+		_not_run "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh
index 2cb8d6081c17..28756c2acde7 100755
--- a/tests/misc-tests.sh
+++ b/tests/misc-tests.sh
@@ -82,7 +82,7 @@ do
 		fi
 		check_test_results "$RESULTS" "$name"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
diff --git a/tests/mkfs-tests.sh b/tests/mkfs-tests.sh
index 55d1dc7ac3e9..6ab1fb77d62b 100755
--- a/tests/mkfs-tests.sh
+++ b/tests/mkfs-tests.sh
@@ -77,7 +77,7 @@ do
 		fi
 		check_test_results "$RESULTS" "$name"
 	else
-		_fail "custom test script not found or lacks execution permission"
+		_fail "custom test script not found or lacks execution permission (\"$i\")"
 	fi
 	cd "$TEST_TOP"
 done
-- 
2.52.0


         reply	other threads:[~2026-02-06  0:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-07  4:35 [PATCH] btrfs-progs: docs: add a note for clear_cache mount option Qu Wenruo
2026-02-06  0:27 ` Qu Wenruo [this message]
2026-02-07  4:35   ` [PATCH] btrfs-progs: tests: output the directory path for missing custom script Qu Wenruo
2026-03-17 16:46   ` David Sterba
2026-03-17 16:24 ` [PATCH] btrfs-progs: docs: add a note for clear_cache mount option David Sterba

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=a0cfce59143cf99e9c89baa0f4b0f189dfe40687.1770337623.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox