From 9dbb3bb6bd2df5ae24513eb157dcfd006412f8f1 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Mon, 7 Nov 2022 16:32:00 -0600 Subject: [PATCH] Fix broken test due to directory symlink /vendor/lib/modules is a symlink directory, when running `find /vendor/lib/modules` , find just return the symlink itself. If we add a trailing slash / (`find /vendor/lib/modules/`), find will actually search into the symlinked directory. Test: ./run-tests-on-android.sh modinfo Bug: 258019034 Signed-off-by: Kelvin Zhang -- tests/modinfo.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- tests/modinfo.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/modinfo.test b/tests/modinfo.test index 261acfda..b860a3ea 100644 --- a/tests/modinfo.test +++ b/tests/modinfo.test @@ -17,9 +17,9 @@ fi testcmd "missing" "missing 2>&1" "modinfo: missing: not found\n" "" "" # Find some modules to work with. -MODULE_PATH1=$(find $MODULE_ROOT/lib/modules -name *.ko | head -1 2>/dev/null) +MODULE_PATH1=$(find $MODULE_ROOT/lib/modules/ -name *.ko | head -1 2>/dev/null) MODULE1=$(basename -s .ko $MODULE_PATH1) -MODULE_PATH2=$(find $MODULE_ROOT/lib/modules -name *.ko | head -2 | tail -1 2>/dev/null) +MODULE_PATH2=$(find $MODULE_ROOT/lib/modules/ -name *.ko | head -2 | tail -1 2>/dev/null) MODULE2=$(basename -s .ko $MODULE_PATH2) DASH_MODULE=$(basename -s .ko \ $(find $MODULE_ROOT/lib/modules -name *-*.ko | tail -1 2>/dev/null)) -- 2.39.2