Commit Graph

20 Commits

Author SHA1 Message Date
Isaac J. Manjarres ba520a32ce ANDROID: Add memfd self tests
Memfd is important to Android, so add support for building and running
the memfd self test in presubmit.

Bug: 382547417
Signed-off-by: Isaac J. Manjarres <isaacmanjarres@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:f369010a2a779c5df3c4063ba88e4cc04e92496a)
Merged-In: I5df07ae00f6ee861c41f55e5ef46517b960c9d8f
Change-Id: I5df07ae00f6ee861c41f55e5ef46517b960c9d8f
2024-12-11 16:49:59 -08:00
Cheng-Cheng Lo 07be6b4d90 ANDROID: use INDIVIDUAL_LEAVES for kselftests parser resolution
Bug: 371481715
Test: presubmit
Change-Id: I7b4c7d4ea7683f12c140c2ac7fc3ad67f02cd4cb
Signed-off-by: Cheng-Cheng Lo <locc@google.com>
(cherry picked from commit ff4969e8ce)
2024-11-06 17:42:44 +00:00
Edward Liaw ef3a3d71a8 ANDROID: Specify arch for kselftest test suites
Tradefed will run tests against all abis by default.  The kselftest
suite is built per architecture so it needs to only run when the abi
matches the build.

Bug: 310227391
Bug: 318413396
Change-Id: I55a7f5cea2b3970dea06cb0a2f68d6c9ed865887
Signed-off-by: Edward Liaw <edliaw@google.com>
2024-01-03 18:31:47 +00:00
Edward Liaw ec2e16e516 ANDROID: update binary names for timer tests
Fix the names for binaries that are called by name in vts test config.

Bug: 291147200
Change-Id: I2e0f1accdd7320c39a8db206d2cff8f1246b1e34
Signed-off-by: Edward Liaw <edliaw@google.com>
2024-01-02 17:05:13 +00:00
Edward Liaw 4e9b6d4f3e ANDROID: timers: Don't run destructive timer tests
Some timer tests can modify system time and cause the device to suspend.
These should not run as part of the test suite.

Bug: 291147200
Change-Id: Ie8b378b782dc6fa11f864a9445f07e80796335d3
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-19 21:13:21 +00:00
Weijia He bb9d33b2a7 ANDROID: Add x86 specific self tests
Build and enable x86 kselftests

Bug: 310227391
Change-Id: Ica58f1e8e0994bbd7768a0e99ffe41c9e4741c81
Signed-off-by: Weijia He <hwj@google.com>
2023-12-19 21:13:21 +00:00
Weijia He 07e3cca929 ANDROID: Add capabilities and seccomp self tests
Build and enable capabilities and seccomp kselftests

Change-Id: Ia7dfdc6557551d2349c53093d32b3e27c8a76edd
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-12-19 21:13:21 +00:00
Weijia He 98ed5d2867 ANDROID: Add net self tests
Build and enable net kselftests

Change-Id: Icb86869296dd82ebdb2929e302269f3b44409544
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-12-19 21:13:21 +00:00
Edward Liaw a0b51f579f ANDROID: Run tests from selftest directory
Some tests need to be run with the working directory set to the selftest
directory so that they have the appropriate file permissions.

Bug: 291147200
Change-Id: Ia49ceee3904e4bcd6865cd1a6a0724e659ee8cad
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-11 21:18:57 +00:00
Edward Liaw 4ff8382d3b ANDROID: Run futex tests individually
Instead of using the shell script to run each test, run each futex test
on its own.  The shell script does not handle skipped subtests and does
not add any additional testing logic.

Bug: 291147200
Change-Id: Id8687e722bbdc0df527eb0bbe87bb442fb2f0c60
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-11 21:18:57 +00:00
Edward Liaw efcc94783e ANDROID: Disable breakpoints step_after_suspend
Android device will not suspend while usb is connected.

Bug: 67016038
Change-Id: I2a4330dac7fe2ce69c27d61b4ba67e25bd73df30
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-11 20:50:20 +00:00
Weijia He 2597aed6bc ANDROID: Update license for selftest build and configs
Bug: 291147200
Change-Id: I41c7c067c62b8fb038a96bf516710010b617d363
Signed-off-by: Weijia He <hwj@google.com>
2023-12-11 04:28:41 +00:00
Weijia He 0e4e05eaf8 ANDROID: Add mm self tests
This change adds mm self tests

Change-Id: Ib193d852701db59189f586257146d89582987836
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-12-07 22:16:05 +00:00
Weijia He e49cb50c6a ANDROID: Add timer self tests
This change adds timer self tests

Change-Id: I478103a90e7497ec44575fcfbc9852453dafd2e1
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-12-07 22:13:15 +00:00
Weijia He 80979fab46 ANDROID: Add futex self tests
This change adds futex self tests

Change-Id: I20fcc0ecc139db017e235ee679f22ca1aa0ea71c
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-06 22:33:13 +00:00
Edward Liaw 93dd59141d ANDROID: kselftests: Use KernelTargetTest and handle skip exit code
kselftests use exit code 4 when skipping tests.  Use KernelTargetTest to
handle this correctly.

Bug: 291147200
Change-Id: I6a8dfb67b29b04f6e54b2ca9a42c138a2d6b65f6
Signed-off-by: Edward Liaw <edliaw@google.com>
2023-12-04 20:35:52 +00:00
Weijia He db07b9d659 ANDROID: Fix selftest x86_64 config and add --skip-cvd-kill option to kselftest.sh
Change-Id: I9c661f8958eecd3d3a3870295a9e2acd6b199590
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-11-30 03:09:22 +00:00
Weijia He d86db500cf ANDROID: Add more cc binary rules to selftests
This change adds more cc_binary for selftests

Change-Id: Iecac2bc5727775238f8483d0c316b885b477695c
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-11-21 18:39:26 +00:00
Weijia He 6e498d5efd ANDROID: Fix device lost issue for self test
The ExecutableTargetTest expects "value" to be a list of executables,
not a command line string. Moving chmod statement to post-push to
resolve unexpected behaviors in previous config.

Change-Id: I5e21a777d9f73138264a295098f3b5c65e163dbb
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-11-01 17:13:41 +00:00
Weijia He 8453aa945e ANDROID: Add build rules for selftests
tests.zip file contents:
  Length      Date    Time    Name
---------  ---------- -----   ----
    43552  2008-01-01 00:00   bazel-out/k8-fastbuild-ST-c33f95032a75/bin/common/testcases/selftests/x86_64/kselftest_binderfs_test
    14080  2008-01-01 00:00   bazel-out/k8-fastbuild-ST-c33f95032a75/bin/common/testcases/selftests/x86_64/kselftest_breakpoints_tests_breakpoint_test
    14216  2008-01-01 00:00   bazel-out/k8-fastbuild-ST-c33f95032a75/bin/common/testcases/selftests/x86_64/kselftest_breakpoints_tests_step_after_suspend_test
     2955  2008-01-01 00:00   bazel-out/k8-fastbuild-ST-c33f95032a75/bin/common/testcases/selftests/selftests.config
---------                     -------
    74803                     4 files

Change-Id: I34a0ca205d9b505bc38689b03bdb6463288fe56b
Signed-off-by: Weijia He <hwj@google.com>
Bug: 291147200
2023-10-25 21:41:45 +00:00