Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 2 | <!-- Copyright (C) 2022 The Android Open Source Project |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | |
| 17 | <configuration description="Config for authfs tests"> |
| 18 | <!-- Need root to start virtualizationservice --> |
| 19 | <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/> |
| 20 | |
Victor Hsieh | 5534e52 | 2021-07-15 08:46:56 -0700 | [diff] [blame] | 21 | <!-- Still need to define SELinux policy for authfs and fd_server properly. --> |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 22 | <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/> |
| 23 | |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 24 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 25 | <option name="throw-if-cmd-fail" value="true" /> |
Victor Hsieh | 4563623 | 2021-10-15 17:52:51 -0700 | [diff] [blame] | 26 | <!-- Prepare test directories. --> |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 27 | <option name="run-command" value="mkdir -p /data/local/tmp/authfs/mnt" /> |
| 28 | <option name="teardown-command" value="rm -rf /data/local/tmp/authfs" /> |
| 29 | </target_preparer> |
| 30 | |
| 31 | <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> |
| 32 | <option name="cleanup" value="true" /> |
| 33 | <option name="abort-on-push-failure" value="true" /> |
Victor Hsieh | ae67d3b | 2021-10-19 12:59:42 -0700 | [diff] [blame] | 34 | |
| 35 | <!-- Test executable --> |
Victor Hsieh | 4563623 | 2021-10-15 17:52:51 -0700 | [diff] [blame] | 36 | <option name="push-file" key="open_then_run" value="/data/local/tmp/open_then_run" /> |
Victor Hsieh | 6e8fab8 | 2022-01-31 16:31:11 +0000 | [diff] [blame] | 37 | <option name="push-file" key="fsverity" value="/data/local/tmp/fsverity" /> |
Victor Hsieh | ae67d3b | 2021-10-19 12:59:42 -0700 | [diff] [blame] | 38 | |
| 39 | <!-- Test data files --> |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 40 | <option name="push-file" key="cert.der" value="/data/local/tmp/authfs/cert.der" /> |
| 41 | <option name="push-file" key="input.4m" value="/data/local/tmp/authfs/input.4m" /> |
Inseob Kim | c0886c2 | 2021-12-13 17:41:24 +0900 | [diff] [blame] | 42 | <option name="push-file" key="input.4m.fsv_meta" |
| 43 | value="/data/local/tmp/authfs/input.4m.fsv_meta" /> |
Victor Hsieh | 6e8fab8 | 2022-01-31 16:31:11 +0000 | [diff] [blame] | 44 | |
| 45 | <!-- Just pick a file with signature that can be trused on the device. --> |
| 46 | <option name="push-file" key="CtsApkVerityTestAppPrebuilt.apk" |
| 47 | value="/data/local/tmp/authfs/input.apk" /> |
| 48 | <option name="push-file" key="CtsApkVerityTestAppPrebuilt.apk.fsv_sig" |
| 49 | value="/data/local/tmp/authfs/input.apk.fsv_sig" /> |
| 50 | </target_preparer> |
| 51 | |
Jaewan Kim | 15819f5 | 2023-03-29 16:19:56 +0900 | [diff] [blame] | 52 | <target_preparer class="com.android.microdroid.test.preparer.DisableMicrodroidDebugPolicyPreparer" /> |
| 53 | |
Victor Hsieh | 6e8fab8 | 2022-01-31 16:31:11 +0000 | [diff] [blame] | 54 | <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| 55 | <option name="throw-if-cmd-fail" value="true" /> |
| 56 | <!-- Now that the files are pushed to the device, enable fs-verity for the targeting file. |
| 57 | It works because the signature is trusted on all CTS compatible devices. --> |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 58 | <option name="run-command" |
| 59 | value="cd /data/local/tmp/authfs; |
| 60 | ../fsverity enable input.apk --signature=input.apk.fsv_sig" /> |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 61 | </target_preparer> |
| 62 | |
| 63 | <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" > |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 64 | <option name="jar" value="AuthFsBenchmarks.jar" /> |
Jiyong Park | f29fe39 | 2021-07-15 06:03:31 +0000 | [diff] [blame] | 65 | </test> |
| 66 | </configuration> |