diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-04-07 13:01:10 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-04-07 13:01:10 +0200 |
commit | 19186dc045d0fe9abe751e46cbf8e6e9b567f4e3 (patch) | |
tree | 6fd04e467a315de0efbfab285b0fac557e715a58 | |
parent | 4aa5ae07f8ff5cdaa1067a4a6d61345574dad420 (diff) | |
download | mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar.gz mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar.bz2 mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar.lz mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar.xz mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.tar.zst mbuto-19186dc045d0fe9abe751e46cbf8e6e9b567f4e3.zip |
mbuto: Discard stdout and stderr from selftests install
...we don't want any of that in the output.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rwxr-xr-x | mbuto | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -205,7 +205,7 @@ profile_kselftests() { KERNEL="$(cat include/config/kernel.release)" - ${MAKE} -C tools/testing/selftests/ install + ${MAKE} -C tools/testing/selftests/ install >/dev/null 2>&1 MODDIR="$(${REALPATH} .mbuto_mods)" ${RM} -rf "${MODDIR}" @@ -692,30 +692,30 @@ kmod_node() { kmod_add() { info "Adding kernel module ${1}" - IFS=' -' - for __f in $("${MODPROBE}" -S "${KERNEL}" -d "${MODDIR}" -q \ - --show-depends "${1}"); do - unset IFS + if [ -z "${MODDIR}" ]; then + __d_opt="" + __find_path="/lib/modules/${KERNEL}" + else + __d_opt="-d ${MODDIR}" + __find_path="${MODDIR}/lib/modules" + fi - # If a module is built-in, skip copy, but check if we need to - # add a device node for on-demand loading. - if [ -n "${__f%builtin *}" ]; then - __src="${__f##insmod }" - # Some modprobe implementations add one trailing space - __src="${__src%% *}" - __dst="${wd}${__src##${MODDIR}}" + for __t in $("${MODPROBE}" -S "${KERNEL}" -d "${__d_opt}" -q \ + --show-depends "$(${BASENAME} ${1})"); do + __t="$(${BASENAME} "${__t%*.ko}")" + if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ + --show-depends "$(${BASENAME} "${__t}")"; then + __src="$(${FIND} ${__find_path} -name "${__t}.ko")" + __dst="${wd}/${__src##${MODDIR}}" if ! "${DIFF}" "${__src}" "${__dst}" 2>/dev/null; then "${MKDIR}" -p "$("${DIRNAME}" "${__dst}")" "${CP}" -a "${__src}" "${__dst}" fi + kmod_node "${1}" + elif [ -z "${__f%builtin *}" ]; then + kmod_node "${1}" fi - - kmod_node "${1}" - IFS=' -' done - unset IFS } # kmod_post() - Copy files for modprobe on target, run depmod |