From 94c99aed7d8b4de5698a28115c1e0f2d37d08279 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Wed, 23 Sep 2026 12:32:29 +0200 Subject: [PATCH 1/4] automated: linux: ltp: pass plain skipfiles to kirk A plain text skipfile never reaches kirk, so the tests in it still run. The -S option stores the path in SKIPFILE, but the kirk command line only uses SKIPFILE_PATH, and that one is set for yaml skipfiles only. So --skip-file is dropped and SKIPFILE is never read again. When kirk was added runltp was still the default, and runltp did read SKIPFILE. Only kirk users saw this. Dropping runltp made kirk the only runner, and now it hits everyone. Set SKIPFILE_PATH for the plain skipfile too and drop SKIPFILE. Signed-off-by: Anders Roxell --- automated/lib/sh-test-lib | 2 +- automated/linux/ltp/ltp.sh | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib index c38bf4d25..c7f3d0140 100755 --- a/automated/lib/sh-test-lib +++ b/automated/lib/sh-test-lib @@ -477,7 +477,7 @@ create_out_dir() { } generate_skipfile() { - # Generate a skipfile and set the SKIPFILE variable based on SKIPFILE_YAML, + # Generate a skipfile and write it to SKIPFILE_PATH, based on SKIPFILE_YAML, # BOARD, BRANCH, and ENVIRONMENT. # # In: diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh index 9dfe11ab2..f3756874e 100755 --- a/automated/linux/ltp/ltp.sh +++ b/automated/linux/ltp/ltp.sh @@ -14,7 +14,7 @@ echo "Script path is: ${SCRIPTPATH}" # List of test cases TST_CMDFILES="" # List of test cases to be skipped -SKIPFILE="" +SKIPFILE_PATH="" # List of test cases to be skipped in yaml/skipgen format SKIPFILE_YAML="" BOARD="" @@ -77,7 +77,7 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do else # Skipfile is normal skipfile SKIPFILE_TMP="http-skipfile" - SKIPFILE="-S ${SCRIPTPATH}/${SKIPFILE_TMP}" + SKIPFILE_PATH="${SCRIPTPATH}/${SKIPFILE_TMP}" fi # Download LTP skipfile from specified URL if ! wget "${OPTARG}" -O "${SKIPFILE_TMP}"; then @@ -89,9 +89,9 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do else # Regular LTP skipfile. Absolute or relative path? if [ "${OPTARG:0:1}" == "/" ]; then - SKIPFILE="-S ${OPTARG}" + SKIPFILE_PATH="${OPTARG}" else - SKIPFILE="-S ${SCRIPTPATH}/${OPTARG}" + SKIPFILE_PATH="${SCRIPTPATH}/${OPTARG}" fi fi ;; @@ -161,9 +161,8 @@ if [ -n "${SKIPFILE_YAML}" ]; then export SKIPFILE_PATH="${SCRIPTPATH}/generated_skipfile" generate_skipfile if [ ! -f "${SKIPFILE_PATH}" ]; then - error_msg "Skipfile ${SKIPFILE} does not exist"; + error_msg "Skipfile ${SKIPFILE_PATH} does not exist"; fi - SKIPFILE="-S ${SKIPFILE_PATH}" fi parse_ltp_json_results() { From 7e5413f5e915c458686579de4ae360dac5a24e93 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Wed, 23 Sep 2026 11:19:08 +0200 Subject: [PATCH 2/4] automated: linux: ltp: check that the skipfile exists The check only runs for yaml skipfiles. A plain skipfile with a bad path goes straight to kirk, and kirk dies on it with a python traceback. Move the check out of the yaml branch so it covers both kinds. Signed-off-by: Anders Roxell --- automated/linux/ltp/ltp.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh index f3756874e..c96766959 100755 --- a/automated/linux/ltp/ltp.sh +++ b/automated/linux/ltp/ltp.sh @@ -160,9 +160,10 @@ TEST_TARFILE=https://github.com/linux-test-project/ltp/releases/download/"${LTP_ if [ -n "${SKIPFILE_YAML}" ]; then export SKIPFILE_PATH="${SCRIPTPATH}/generated_skipfile" generate_skipfile - if [ ! -f "${SKIPFILE_PATH}" ]; then - error_msg "Skipfile ${SKIPFILE_PATH} does not exist"; - fi +fi + +if [ -n "${SKIPFILE_PATH}" ] && [ ! -f "${SKIPFILE_PATH}" ]; then + error_msg "Skipfile ${SKIPFILE_PATH} does not exist" fi parse_ltp_json_results() { From 3ef78d60a146b236671b5e5936f94bf99d42da06 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Wed, 23 Sep 2026 12:52:47 +0200 Subject: [PATCH 3/4] automated: linux: ltp: use an absolute yaml skipfile path as given An absolute path to a yaml skipfile gets SCRIPTPATH glued in front of it, so it ends up as ${SCRIPTPATH}//abs/path. That file can not exist. The plain skipfile branch already checks for a leading slash. Do the same for the yaml branch. Signed-off-by: Anders Roxell --- automated/linux/ltp/ltp.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh index c96766959..36c44060e 100755 --- a/automated/linux/ltp/ltp.sh +++ b/automated/linux/ltp/ltp.sh @@ -84,8 +84,12 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do error_msg "Failed to fetch ${OPTARG}" fi elif [ "${OPTARG##*.}" = "yaml" ]; then - # yaml skipfile; use skipgen to generate a skipfile - SKIPFILE_YAML="${SCRIPTPATH}/${OPTARG}" + # yaml skipfile. Absolute or relative path? + if [ "${OPTARG:0:1}" == "/" ]; then + SKIPFILE_YAML="${OPTARG}" + else + SKIPFILE_YAML="${SCRIPTPATH}/${OPTARG}" + fi else # Regular LTP skipfile. Absolute or relative path? if [ "${OPTARG:0:1}" == "/" ]; then From 8145e580940c85827be336c4523d119d6a874eb2 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Wed, 23 Sep 2026 12:53:20 +0200 Subject: [PATCH 4/4] automated: linux: ltp: simplify the skipfile option parsing The -S option is parsed with nested ifs and string strip tests, three levels deep. Two of the comments only repeat the branch above them. So let's use a case instead. A case arm takes alternatives, so the http and the yaml test fit in one flat pattern, and the patterns say what the comments said. SKIPFILE_TMP can go too, wget writes straight to the skipfile variable. Do the relative path rule once after the option loop instead of in each branch. No functional change. Signed-off-by: Anders Roxell --- automated/linux/ltp/ltp.sh | 55 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh index 36c44060e..bca6f20ed 100755 --- a/automated/linux/ltp/ltp.sh +++ b/automated/linux/ltp/ltp.sh @@ -69,35 +69,26 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do LOG_FILE=$(echo "${OPTARG}"| sed 's,\/,_,') ;; S) - if [ -z "${OPTARG##*http*}" ]; then - if [ -z "${OPTARG##*yaml*}" ]; then - # Skipfile is of type yaml - SKIPFILE_TMP="http-skipfile.yaml" - SKIPFILE_YAML="${SCRIPTPATH}/${SKIPFILE_TMP}" - else - # Skipfile is normal skipfile - SKIPFILE_TMP="http-skipfile" - SKIPFILE_PATH="${SCRIPTPATH}/${SKIPFILE_TMP}" - fi - # Download LTP skipfile from specified URL - if ! wget "${OPTARG}" -O "${SKIPFILE_TMP}"; then - error_msg "Failed to fetch ${OPTARG}" - fi - elif [ "${OPTARG##*.}" = "yaml" ]; then - # yaml skipfile. Absolute or relative path? - if [ "${OPTARG:0:1}" == "/" ]; then + case "${OPTARG}" in + *http*yaml*|*yaml*http*) + SKIPFILE_YAML="http-skipfile.yaml" + if ! wget "${OPTARG}" -O "${SKIPFILE_YAML}"; then + error_msg "Failed to fetch ${OPTARG}" + fi + ;; + *http*) + SKIPFILE_PATH="http-skipfile" + if ! wget "${OPTARG}" -O "${SKIPFILE_PATH}"; then + error_msg "Failed to fetch ${OPTARG}" + fi + ;; + *.yaml) SKIPFILE_YAML="${OPTARG}" - else - SKIPFILE_YAML="${SCRIPTPATH}/${OPTARG}" - fi - else - # Regular LTP skipfile. Absolute or relative path? - if [ "${OPTARG:0:1}" == "/" ]; then + ;; + *) SKIPFILE_PATH="${OPTARG}" - else - SKIPFILE_PATH="${SCRIPTPATH}/${OPTARG}" - fi - fi + ;; + esac ;; b) export BOARD="${OPTARG}" @@ -159,6 +150,16 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do esac done +# A relative skipfile path is resolved against this script +case "${SKIPFILE_PATH}" in + ""|/*) ;; + *) SKIPFILE_PATH="${SCRIPTPATH}/${SKIPFILE_PATH}" ;; +esac +case "${SKIPFILE_YAML}" in + ""|/*) ;; + *) SKIPFILE_YAML="${SCRIPTPATH}/${SKIPFILE_YAML}" ;; +esac + TEST_TARFILE=https://github.com/linux-test-project/ltp/releases/download/"${LTP_VERSION}"/ltp-full-"${LTP_VERSION}".tar.xz if [ -n "${SKIPFILE_YAML}" ]; then