Re: build.sh: Add support for test-metadata

Petr Vorel <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <20260709150719.GA999562@pevik>
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.