ANDROID: Shorten the length of line in kunit/android/README.

Test: none
Bug: 345309292
Signed-off-by: Betty Zhou <bettyzhou@google.com>
Change-Id: I4343627fb770e9ca0b2a2cb3c292fde3f8ca5980
This commit is contained in:
Betty Zhou
2024-09-09 13:43:44 -07:00
parent e8ac88bbf7
commit 2dd00822d4
+20 -8
View File
@@ -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 <your_device_serial_number>
....
=======================================================
=============== 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 <module_name>.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 <module_name>.ko` on your local
host machine or on the Android device with `adb shell modinfo <module_name.ko>`.
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`.
If kunit.ko or kunit_<*test>.ko fails to install, check for whether they are
already installed with `adb shell lsmod`.