From 3a62b75fc23d7498fef332b23b6aef7638168932 Mon Sep 17 00:00:00 2001 From: Vignesh Raman Date: Wed, 13 Aug 2025 16:35:50 +0530 Subject: [PATCH] automated: linux: ltp: add option to pass kirk arguments This adds a new EXTRA_KIRK_ARGS parameter to allow passing options to the kirk runner. Signed-off-by: Vignesh Raman --- automated/linux/ltp/ltp.sh | 9 +++++++-- automated/linux/ltp/ltp.yaml | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/automated/linux/ltp/ltp.sh b/automated/linux/ltp/ltp.sh index f31117389..058e30224 100755 --- a/automated/linux/ltp/ltp.sh +++ b/automated/linux/ltp/ltp.sh @@ -32,6 +32,7 @@ SHARD_INDEX=1 RUNNER="" KIRK_WORKERS=1 +EXTRA_KIRK_ARGS="" LTP_TMPDIR=/ltp-tmp @@ -55,11 +56,12 @@ usage() { [-t build from tarfile ] [-c sharding bucket to run ] [-n number of shard buckets to create ] + [-k extra kirk arguments ] " 1>&2 exit 0 } -while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:" arg; do +while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:k:" arg; do case "$arg" in T) TST_CMDFILES="${OPTARG}" @@ -139,6 +141,9 @@ while getopts "M:T:S:b:d:g:e:i:s:v:R:r:u:p:t:c:n:w:" arg; do w) KIRK_WORKERS="$OPTARG" ;; + k) + EXTRA_KIRK_ARGS="$OPTARG" + ;; *) usage error_msg "No flag ${OPTARG}" @@ -197,7 +202,7 @@ run_ltp() { if [ "${KIRK_WORKERS}" = "max" ]; then KIRK_WORKERS=$(grep ^processor /proc/cpuinfo | wc -l) fi - pipe0_status "${RUNNER} --framework ltp --run-suite shardfile \ + pipe0_status "${RUNNER} ${EXTRA_KIRK_ARGS} --framework ltp --run-suite shardfile \ -d ${LTP_TMPDIR} --env LTP_COLORIZE_OUTPUT=0 \ ${SKIPFILE_PATH:+--skip-file} ${SKIPFILE_PATH} \ ${KIRK_WORKERS:+--workers} ${KIRK_WORKERS} \ diff --git a/automated/linux/ltp/ltp.yaml b/automated/linux/ltp/ltp.yaml index 2d49e9b87..e38044d65 100644 --- a/automated/linux/ltp/ltp.yaml +++ b/automated/linux/ltp/ltp.yaml @@ -48,6 +48,9 @@ params: # # Tests can now run concurrently by specifying '--workers X'. KIRK_WORKERS: 1 + # Extra arguments to pass directly to the kirk runner + EXTRA_KIRK_ARGS: "" + # If the following parameter is set, then the LTP suite is # cloned and used unconditionally. In particular, the version # of the suite is set to the commit pointed to by the @@ -80,5 +83,5 @@ params: run: steps: - cd ./automated/linux/ltp/ - - ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -r "${RUNNER}" -b "${BOARD}" -d "${LTP_TMPDIR}" -g "${BRANCH}" -e "${ENVIRONMENT}" -i "${LTP_INSTALL_PATH}" -S "${SKIPFILE}" -p "${TEST_DIR}" -u "${TEST_GIT_URL}" -t "${BUILD_FROM_TAR}" -n "${SHARD_NUMBER}" -c "${SHARD_INDEX}" -w "${KIRK_WORKERS}" + - ./ltp.sh -T "${TST_CMDFILES}" -s "${SKIP_INSTALL}" -v "${LTP_VERSION}" -M "${TIMEOUT_MULTIPLIER}" -R "${ROOT_PASSWD}" -r "${RUNNER}" -k "${EXTRA_KIRK_ARGS}" -b "${BOARD}" -d "${LTP_TMPDIR}" -g "${BRANCH}" -e "${ENVIRONMENT}" -i "${LTP_INSTALL_PATH}" -S "${SKIPFILE}" -p "${TEST_DIR}" -u "${TEST_GIT_URL}" -t "${BUILD_FROM_TAR}" -n "${SHARD_NUMBER}" -c "${SHARD_INDEX}" -w "${KIRK_WORKERS}" - ../../utils/send-to-lava.sh ./output/result.txt