[LTP] [PATCH v2 1/2] openposix: Install the .args files

Petr Vorel pvorel@suse.cz
Mon Nov 9 14:00:49 CET 2026


Hi Anders,

> run-tests.sh reads the arguments for a test from a .args file next to
> it, but make install does not copy the .args files. So on an installed
> system the two mqueues_multi_send_rev tests run without the number of
> threads and fail with a usage message.

> Install the .args files together with the tests.

> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>  testcases/open_posix_testsuite/scripts/generate-makefiles.sh | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
> index 1c12a456cc41..19c781ba8054 100755
> --- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
> +++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh
> @@ -182,6 +182,7 @@ install: \$(INSTALL_DIR) run.sh
>  				\$(INSTALL_DIR)/\$\$file;	\\
>  		fi;						\\
>  	done
> +	\$(if \$(wildcard \$(srcdir)/*.args),install -m 00644 \$(wildcard \$(srcdir)/*.args) \$(INSTALL_DIR)/)

We talk about these 2 files:

$ git ls-files |grep args$
testcases/open_posix_testsuite/stress/mqueues/mqueues_multi_send_rev_1.args
testcases/open_posix_testsuite/stress/mqueues/mqueues_multi_send_rev_2.args

Looking at the use:

sh -c "$SCRIPT_DIR/t0 $TIMEOUT_VAL ./$1 $(cat ./$(echo "$1" | sed 's,\.[^\.]*,,').args 2>/dev/null)" > $complog 2>&1

Uh, that ugly run-tests.sh should be rewritten.

Ideally, we would get rid of these 2 files, i.e. the in multi_send_rev_[12].c I
would #define some constant for the default value and replace

	if ((2 != argc) || ((num = atoi(argv[1])) <= 0)) {
		fprintf(stderr, "Usage: %s number_of_threads\n", argv[0]);
		return PTS_FAIL;
	}

with using it if argc < 2.
(+ remove <getopt.h>)

And update run-tests.sh to remove that section.

Would you mind to send v2 doing it?

Kind regards,
Petr


More information about the ltp mailing list