Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto2"; |
| 16 | |
| 17 | package android.vts; |
| 18 | |
Keun Soo Yim | 8f3ca75 | 2016-07-18 14:37:04 -0700 | [diff] [blame] | 19 | import "test/vts/proto/InterfaceSpecificationMessage.proto"; |
| 20 | |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 21 | |
| 22 | // Type of a command. |
| 23 | enum CommandType { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 24 | UNKNOWN_COMMAND_TYPE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 25 | // To get a list of available HAL modules. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 26 | LIST_HALS = 1; |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 27 | // To set the host information (e.g., callback server port). |
| 28 | SET_HOST_INFO = 2; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 29 | |
| 30 | // To check whether fuzzer's binder service is available. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 31 | CHECK_DRIVER_SERVICE = 101; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 32 | // To start a fuzzer binary service and select a HAL module. |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 33 | LAUNCH_DRIVER_SERVICE = 102; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 34 | |
| 35 | // To get a list of available functions. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 36 | LIST_APIS = 201; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 37 | // To call a function. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 38 | CALL_API = 202; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 39 | |
| 40 | // To execute a shell command; |
| 41 | VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND = 301; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | |
| 45 | // Type of a response. |
| 46 | enum ResponseCode { |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 47 | UNKNOWN_RESPONSE_CODE = 0; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 48 | // successful |
| 49 | SUCCESS = 1; |
| 50 | // failed |
| 51 | FAIL = 2; |
| 52 | } |
| 53 | |
| 54 | |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 55 | // VTS driver type. |
| 56 | enum VtsDriverType { |
| 57 | UKNOWN_VTS_DRIVER_TYPE = 0; |
| 58 | // for various HALs. |
| 59 | VTS_DRIVER_TYPE_HAL_CONVENTIONAL = 1; |
| 60 | VTS_DRIVER_TYPE_HAL_LEGACY = 2; |
| 61 | VTS_DRIVER_TYPE_HAL_HIDL = 3; |
| 62 | VTS_DRIVER_TYPE_HAL_HIDL_WRAPPED_CONVENTIONAL = 4; |
| 63 | |
| 64 | // for shared libraries. |
| 65 | VTS_DRIVER_TYPE_LIB_SHARED = 11; |
| 66 | |
| 67 | // for shell. |
| 68 | VTS_DRIVER_TYPE_SHELL = 21; |
| 69 | } |
| 70 | |
| 71 | |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 72 | // To specify a command. |
| 73 | message AndroidSystemControlCommandMessage { |
| 74 | // Command type. |
| 75 | optional CommandType command_type = 1; |
| 76 | |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 77 | // for LIST_HALS |
| 78 | repeated bytes paths = 1001; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 79 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 80 | // for SET_HOST_INFO |
| 81 | optional int32 callback_port = 1101; |
| 82 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 83 | // for CHECK_DRIVER_SERVICE |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 84 | // the binder service name |
| 85 | optional bytes service_name = 2001; |
| 86 | |
Keun Soo Yim | 14f2272 | 2016-06-29 09:49:38 -0700 | [diff] [blame] | 87 | // for LAUNCH_DRIVER_SERVICE |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 88 | optional VtsDriverType driver_type = 3001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 89 | |
Keun Soo Yim | a066dd5 | 2016-07-01 15:18:28 -0700 | [diff] [blame] | 90 | // The name of a target. |
| 91 | optional bytes file_path = 3002; |
| 92 | |
| 93 | // Whether a target driver binary is 64-bits or 32-bits. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 94 | optional int32 bits = 3003; |
| 95 | |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 96 | // target class |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 97 | optional int32 target_class = 3004; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 98 | // target type |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 99 | optional int32 target_type = 3005; |
Keun Soo Yim | feceb4d | 2016-05-11 20:01:00 -0700 | [diff] [blame] | 100 | // target version (should be divided by 100) - float has a compatibility issue |
| 101 | // between C/C++ and python protoc. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 102 | optional int32 target_version = 3006; |
| 103 | |
Keun Soo Yim | 34067de | 2016-05-17 09:46:37 -0700 | [diff] [blame] | 104 | // the name of a HAL module to open. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 105 | optional bytes module_name = 3007; |
| 106 | |
| 107 | // for LIST_APIS |
| 108 | // none |
| 109 | |
Yuexi Ma | ddb4e9e | 2016-07-11 12:45:41 -0700 | [diff] [blame] | 110 | // for CALL_API and VTS_AGENT_COMMAND_INVOKE_SYSCALL |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 111 | optional bytes arg = 4001; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 112 | |
| 113 | // for VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND |
| 114 | repeated bytes shell_command = 5001; |
Keun Soo Yim | e0c0cdd | 2016-05-09 19:43:43 -0700 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | |
| 118 | // To specify a response. |
| 119 | message AndroidSystemControlResponseMessage { |
| 120 | // Response type. |
| 121 | optional ResponseCode response_code = 1; |
| 122 | |
| 123 | // The reason. |
| 124 | optional bytes reason = 1001; |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 125 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 126 | // for the found component files. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 127 | repeated bytes file_names = 1002; |
| 128 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 129 | // for the found API specification. |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 130 | optional bytes spec = 1003; |
| 131 | |
Keun Soo Yim | 82b2d78 | 2016-06-20 11:29:38 -0700 | [diff] [blame] | 132 | // for the API call result including result value, profiling data, and |
Keun Soo Yim | 8e07a09 | 2016-05-04 16:30:35 -0700 | [diff] [blame] | 133 | // coverage measurement data. |
| 134 | optional bytes result = 1004; |
Keun Soo Yim | 63d6751 | 2016-07-01 17:13:47 -0700 | [diff] [blame] | 135 | |
| 136 | repeated bytes stdout = 2001; |
| 137 | repeated bytes stderr = 2002; |
Yuexi Ma | 90ec35f | 2016-07-25 10:18:52 -0700 | [diff] [blame] | 138 | repeated int32 exit_code = 2003; |
Sahil Jain | 41d3be9 | 2016-06-20 18:25:11 -0700 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | |
| 142 | // To specify a callback request message for the TCP server. |
| 143 | message AndroidSystemCallbackRequestMessage { |
| 144 | // callback id for the message sent to the TCP Server. |
| 145 | optional bytes id = 1; |
Keun Soo Yim | 8f3ca75 | 2016-07-18 14:37:04 -0700 | [diff] [blame] | 146 | |
| 147 | // args |
| 148 | repeated VariableSpecificationMessage arg = 11; |
Sahil Jain | 41d3be9 | 2016-06-20 18:25:11 -0700 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | |
| 152 | // To specify a callback response message from the TCP server. |
| 153 | message AndroidSystemCallbackResponseMessage { |
| 154 | // Response code in a Callback response from TCP server. |
| 155 | optional ResponseCode response_code = 1; |
| 156 | } |