From efa36b601afd52ac3c18309f9b41a4945384cae8 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 8 May 2023 11:28:24 +0200 Subject: [PATCH] tests: adjust internal patch to apply cleanly Signed-off-by: Denys Vlasenko --- tests/modalias.prov.runtest | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/modalias.prov.runtest b/tests/modalias.prov.runtest index 2fbc655..2fd03ad 100755 --- a/tests/modalias.prov.runtest +++ b/tests/modalias.prov.runtest @@ -16,8 +16,8 @@ cp ../../modalias.prov modalias.prov patch -p1 <<"EOF" --- a/modalias.prov +++ b/modalias.prov -@@ -86,6 +86,17 @@ combine_modaliases() { - print_modaliases "$class" "$variants" "$pos" +@@ -105,6 +105,17 @@ combine_modaliases() { + print_modaliases "$prev" "$variants" "$pos" } +if [ "$#" = 2 ] && [ "$1" = "-t" ]; then @@ -32,8 +32,8 @@ patch -p1 <<"EOF" +fi + for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do - # | head -n1 because some modules have *two* version tags. *cough*b44*cough* - modver=$(/sbin/modinfo -F version "$module"| head -n1) + modver=$(/sbin/modinfo -F version "$module") + # delete possible extra lines because some modules have *two* version tags. *cough*b44*cough* EOF find | grep '\.ko.*\.modalias$' | xargs -n1 ./modalias.prov -t