* [LTP] [PATCH 0/3] CI: Run metadata tests
@ 2026-07-09 13:01 Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 1/3] build.sh: Add support for test-metadata Petr Vorel
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Petr Vorel @ 2026-07-09 13:01 UTC (permalink / raw)
To: ltp
Hi,
trivial patchset to run metadata tests in the CI.
Petr Vorel (3):
build.sh: Add support for test-metadata
ci: Test metadata in docker build testing
metadata: test.sh: Print the test name and result
.github/workflows/ci-docker-build.yml | 5 +++++
build.sh | 5 +++--
metadata/tests/test.sh | 6 ++++--
3 files changed, 12 insertions(+), 4 deletions(-)
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 6+ messages in thread
* [LTP] [PATCH 1/3] build.sh: Add support for test-metadata
2026-07-09 13:01 [LTP] [PATCH 0/3] CI: Run metadata tests Petr Vorel
@ 2026-07-09 13:01 ` Petr Vorel
2026-07-09 13:53 ` [LTP] " linuxtestproject.agent
2026-07-09 13:01 ` [LTP] [PATCH 2/3] ci: Test metadata in docker build testing Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 3/3] metadata: test.sh: Print the test name and result Petr Vorel
2 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2026-07-09 13:01 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
build.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/build.sh b/build.sh
index 47a5a7b050..57bb9e904c 100755
--- a/build.sh
+++ b/build.sh
@@ -178,6 +178,7 @@ configure run only 'configure'
build run only 'make'
test run only 'make test' (not supported for cross-compile build)
test-c run only 'make test-c' (not supported for cross-compile build)
+test-metadata run only 'make test-metadata' (not supported for cross-compile build)
test-shell run only 'make test-shell' (not supported for cross-compile build)
test-shell-loader run only 'make test-shell-loader' (not supported for cross-compile build)
install run only 'make install'
@@ -207,7 +208,7 @@ while getopts "c:hio:p:r:t:" opt; do
esac;;
p) prefix="$OPTARG";;
r) case "$OPTARG" in
- autotools|configure|build|test|test-c|test-shell|test-shell-loader|install) run="$OPTARG";;
+ autotools|configure|build|test|test-c|test-metadata|test-shell|test-shell-loader|install) run="$OPTARG";;
*) echo "Wrong run type '$OPTARG'" >&2; usage; exit 1;;
esac;;
t) case "$OPTARG" in
@@ -233,7 +234,7 @@ if [ -z "$run" -o "$run" = "build" ]; then
eval build_${tree}_tree
fi
-if [ -z "$run" -o "$run" = "test" -o "$run" = "test-c" -o "$run" = "test-shell" -o "$run" = "test-shell-loader" ]; then
+if [ -z "$run" -o "$run" = "test" -o "$run" = "test-c" -o "$run" = "test-metadata" -o "$run" = "test-shell" -o "$run" = "test-shell-loader" ]; then
if [ "$build" = "cross" ]; then
echo "cross-compile build, skipping running tests" >&2
else
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH 2/3] ci: Test metadata in docker build testing
2026-07-09 13:01 [LTP] [PATCH 0/3] CI: Run metadata tests Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 1/3] build.sh: Add support for test-metadata Petr Vorel
@ 2026-07-09 13:01 ` Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 3/3] metadata: test.sh: Print the test name and result Petr Vorel
2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2026-07-09 13:01 UTC (permalink / raw)
To: ltp
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
.github/workflows/ci-docker-build.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/.github/workflows/ci-docker-build.yml b/.github/workflows/ci-docker-build.yml
index 405a7f0690..52b8dc4090 100644
--- a/.github/workflows/ci-docker-build.yml
+++ b/.github/workflows/ci-docker-build.yml
@@ -178,6 +178,11 @@ jobs:
case "$VARIANT" in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
./build.sh -r test-c -o ${TREE:-in} -t $BUILD
+ - name: Test metadata
+ run: |
+ case "$VARIANT" in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
+ ./build.sh -r test-metadata -o ${TREE:-in} -t $BUILD
+
- name: Test shell API
run: |
case "$VARIANT" in cross-compile*) BUILD="cross";; i386) BUILD="32";; *) BUILD="native";; esac
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [LTP] [PATCH 3/3] metadata: test.sh: Print the test name and result
2026-07-09 13:01 [LTP] [PATCH 0/3] CI: Run metadata tests Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 1/3] build.sh: Add support for test-metadata Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 2/3] ci: Test metadata in docker build testing Petr Vorel
@ 2026-07-09 13:01 ` Petr Vorel
2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2026-07-09 13:01 UTC (permalink / raw)
To: ltp
Always print the test name with the result. This helps a readability
in the CI.
* multiline_macro.c [OK]
* regression.c [FAIL]
regression.c output differs!
--- tmp.json 2026-07-09 14:27:15.590074023 +0200
+++ regression.c.json 2026-07-09 14:27:06.083967188 +0200
@@ -6,7 +6,7 @@
]
],
"doc": [
- "Test for regression group derived from the linux-git tag."
+ "Test for regression group derived from the foo tag."
],
"groups": [
"regression"
* tags.c [OK]
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
metadata/tests/test.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/metadata/tests/test.sh b/metadata/tests/test.sh
index 475d721df0..a9ebc768f9 100755
--- a/metadata/tests/test.sh
+++ b/metadata/tests/test.sh
@@ -3,13 +3,15 @@
fail=0
for i in *.c; do
+ printf "* $i "
../metaparse $i > tmp.json
if ! diff tmp.json $i.json >/dev/null 2>&1; then
- echo "***"
+ echo '[FAIL]'
echo "$i output differs!"
diff -u tmp.json $i.json
- echo "***"
fail=1
+ else
+ echo '[OK]'
fi
done
--
2.54.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [LTP] build.sh: Add support for test-metadata
2026-07-09 13:01 ` [LTP] [PATCH 1/3] build.sh: Add support for test-metadata Petr Vorel
@ 2026-07-09 13:53 ` linuxtestproject.agent
2026-07-09 15:07 ` Petr Vorel
0 siblings, 1 reply; 6+ messages in thread
From: linuxtestproject.agent @ 2026-07-09 13:53 UTC (permalink / raw)
To: Petr Vorel; +Cc: ltp
Hi Petr,
On Thu, Jul 09, 2026 at 15:01:33 +0200, Petr Vorel wrote:
> build.sh: Add support for test-metadata
--- [PATCH 1/3] ---
The commit body is empty. Is there anything worth saying about why
test-metadata deserves its own run-type, or why it is being added now?
Even one sentence would help readers understand the motivation without
having to read the whole series.
--- [PATCH 3/3] ---
> printf "* $i "
$i is expanded directly into printf's format string. If a .c file
is ever added whose name contains a percent sign, printf will interpret
it as a format specifier and produce garbled output.
The portable form is:
printf '* %s ' "$i"
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] build.sh: Add support for test-metadata
2026-07-09 13:53 ` [LTP] " linuxtestproject.agent
@ 2026-07-09 15:07 ` Petr Vorel
0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2026-07-09 15:07 UTC (permalink / raw)
To: linuxtestproject.agent; +Cc: ltp
> Hi Petr,
> On Thu, Jul 09, 2026 at 15:01:33 +0200, Petr Vorel wrote:
> > build.sh: Add support for test-metadata
> --- [PATCH 1/3] ---
> The commit body is empty. Is there anything worth saying about why
> test-metadata deserves its own run-type, or why it is being added now?
> Even one sentence would help readers understand the motivation without
> having to read the whole series.
> --- [PATCH 3/3] ---
> > printf "* $i "
> $i is expanded directly into printf's format string. If a .c file
> is ever added whose name contains a percent sign, printf will interpret
> it as a format specifier and produce garbled output.
> The portable form is:
> printf '* %s ' "$i"
I would say printf "* $i " is portable enough.
> Verdict - Needs revision
Yes, but not due the above problems but due out-of-tree build problems.
Unfortunately $(abs_builddir) is working only when called on the top level
Makefile, which is visible in lib/newlib_tests/runtest.sh which just tries to
detect this problem:
case $res in
0) tpass="$tpass $i";;
1) tfail="$tfail $i";;
2) tbrok="$tbrok $i";;
4) twarn="$twarn $i";;
32) tconf="$tconf $i";;
127) runtest_brk TBROK "Error: file not found (wrong PATH? out-of-tree build without -b?), exit code: $res";;
*) runtest_brk TBROK "Error: unknown failure, exit code: $res";;
esac
I'll do handling like this as well into metadata/tests/test.sh.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-07-09 15:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-09 13:01 [LTP] [PATCH 0/3] CI: Run metadata tests Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 1/3] build.sh: Add support for test-metadata Petr Vorel
2026-07-09 13:53 ` [LTP] " linuxtestproject.agent
2026-07-09 15:07 ` Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 2/3] ci: Test metadata in docker build testing Petr Vorel
2026-07-09 13:01 ` [LTP] [PATCH 3/3] metadata: test.sh: Print the test name and result Petr Vorel
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.