From 50c9c41a389534c2f95be9e0f36de463e9ffe5e4 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Tue, 9 Jul 2024 19:33:38 +0200 Subject: [PATCH] automated: linux: modules: use modules.order instead of find Using the modules.order file in '/lib/modules/$(uname -r)/' will ensure the order of the modules are the same. Signed-off-by: Anders Roxell --- automated/linux/modules/modules.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/automated/linux/modules/modules.sh b/automated/linux/modules/modules.sh index 66fc192fe..2c8dbb026 100755 --- a/automated/linux/modules/modules.sh +++ b/automated/linux/modules/modules.sh @@ -37,10 +37,8 @@ done get_modules_list() { if [ -z "${MODULES_LIST}" ]; then - rm -f /tmp/find_modules.txt - for subdir in ${MODULES_SUBDIRS}; do - find /lib/modules/"$(uname -r)"/kernel/"${subdir}" -type f -name '*.ko*' | tee -a /tmp/find_modules.txt - done + subdir=$(echo "${MODULES_SUBDIRS}" | tr ' ' '|') + grep -E "kernel/(${subdir})" /lib/modules/"$(uname -r)"/modules.order | tee /tmp/find_modules.txt split --verbose --numeric-suffixes=1 -n l/"${SHARD_INDEX}"/"${SHARD_NUMBER}" /tmp/find_modules.txt > /tmp/shardfile echo "============== Tests to run ===============" cat /tmp/shardfile