From 2dd00822d42905f5d4a7db95fbac52c47daf9bf6 Mon Sep 17 00:00:00 2001 From: Betty Zhou Date: Mon, 9 Sep 2024 13:43:44 -0700 Subject: [PATCH] ANDROID: Shorten the length of line in kunit/android/README. Test: none Bug: 345309292 Signed-off-by: Betty Zhou Change-Id: I4343627fb770e9ca0b2a2cb3c292fde3f8ca5980 --- tools/testing/kunit/android/README | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/tools/testing/kunit/android/README b/tools/testing/kunit/android/README index e2490d25b966..c8916b0ceec6 100644 --- a/tools/testing/kunit/android/README +++ b/tools/testing/kunit/android/README @@ -9,8 +9,8 @@ Run test with a single shell script command: $ common/tools/testing/android/bin/kunit.sh By default, the script will build the kernel and launch an Android virtual - device and then run the tests. Additional options may be passed to change - the default behavior. The following are some examples on how to use it: + device and then run the tests. Additional options may be passed to change the + default behavior. The following are some examples on how to use it: * Build kernel, launch a virtual device, run KUnit tests: $ common/tools/testing/android/bin/kunit.sh @@ -22,7 +22,9 @@ Run test with a single shell script command: $ common/tools/testing/android/bin/kunit.sh -h Load and run a test module on Android device manually - * Push the KUnit test framework module kunit.ko over to the device. For example: + * Push the KUnit test framework module kunit.ko over to the device. For + example: + $ adb push kunit.ko /data * Load test module on device: @@ -72,7 +74,8 @@ Run KUnit tests on Android Device via test automation infrastructure tradefed * With device connected and accessible via adb run the tests: $ prebuilts/tradefed/filegroups/tradefed/tradefed.sh run commandAndExit \ template/local_min --template:map test=suite/test_mapping_suite \ - --include-filter kunit --tests-dir=/tmp/kunit_tests --primary-abi-only + --include-filter kunit --tests-dir=/tmp/kunit_tests \ + --primary-abi-only -s .... ======================================================= =============== Summary =============== @@ -94,11 +97,19 @@ Check dmesg for load errors. If undefined symbol errors are shown, you're likely running with a trimmed kernel where the symbols are not available. Run with a "no trim" kernel. -Check the test module dependency with `modinfo .ko` on your local host machine or on the Android device with `adb shell modinfo /data/kunit-example-test.ko`. All dependent modules need to be installed before the test module can be installed successfully. +Check the test module dependency with `modinfo .ko` on your local +host machine or on the Android device with `adb shell modinfo `. +All dependent modules need to be installed before the test module can be +installed successfully. -Check if the module is already installed with `adb shell lsmod`. `adb shell rmmod` can be used to remove the already installed test module, and installing the test module again will trigger the test rerun. +Check if the module is already installed with `adb shell lsmod`. The `adb shell +rmmod` can be used to remove the already installed test module, and installing +the test module again will trigger the test rerun. -`adb shell lsmod` will also show the module dependency for your test module in the `Used by` column. You can not remove a module with `adb shell rmmod` if it is being used by another module. Other modules that are using it need to be removed first. +`adb shell lsmod` will also show the module dependency for your test module in +the `Used by` column. You can not remove a module with `adb shell rmmod` if it +is being used by another module. Other modules that are using it need to be +removed first. 2. Test module loaded but no test results @@ -107,4 +118,5 @@ Check dmesg for KUnit errors. If "kunit: disabled" is shown then kunit.ko is not installed with `enable=1`. -If kunit.ko or kunit_<*test>.ko fails to install, check for whether they are already installed with `adb shell lsmod`. \ No newline at end of file +If kunit.ko or kunit_<*test>.ko fails to install, check for whether they are +already installed with `adb shell lsmod`.