blob: 3bf6d8d93829a65138f8c6f2e3825a1b4156bd51 [file] [log] [blame]
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -07001// 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
15syntax = "proto2";
16
17package android.vts;
18
Keun Soo Yim8f3ca752016-07-18 14:37:04 -070019import "test/vts/proto/InterfaceSpecificationMessage.proto";
20
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070021
22// Type of a command.
23enum CommandType {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070024 UNKNOWN_COMMAND_TYPE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070025 // To get a list of available HAL modules.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070026 LIST_HALS = 1;
Keun Soo Yim82b2d782016-06-20 11:29:38 -070027 // To set the host information (e.g., callback server port).
28 SET_HOST_INFO = 2;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070029
30 // To check whether fuzzer's binder service is available.
Keun Soo Yim14f22722016-06-29 09:49:38 -070031 CHECK_DRIVER_SERVICE = 101;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070032 // To start a fuzzer binary service and select a HAL module.
Keun Soo Yim14f22722016-06-29 09:49:38 -070033 LAUNCH_DRIVER_SERVICE = 102;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070034
35 // To get a list of available functions.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070036 LIST_APIS = 201;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070037 // To call a function.
Keun Soo Yim8e07a092016-05-04 16:30:35 -070038 CALL_API = 202;
Keun Soo Yim63d67512016-07-01 17:13:47 -070039
40 // To execute a shell command;
41 VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND = 301;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070042}
43
44
45// Type of a response.
46enum ResponseCode {
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070047 UNKNOWN_RESPONSE_CODE = 0;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -070048 // successful
49 SUCCESS = 1;
50 // failed
51 FAIL = 2;
52}
53
54
Keun Soo Yima066dd52016-07-01 15:18:28 -070055// VTS driver type.
56enum 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 Yime0c0cdd2016-05-09 19:43:43 -070072// To specify a command.
73message AndroidSystemControlCommandMessage {
74 // Command type.
75 optional CommandType command_type = 1;
76
Keun Soo Yim8e07a092016-05-04 16:30:35 -070077 // for LIST_HALS
78 repeated bytes paths = 1001;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070079
Keun Soo Yim82b2d782016-06-20 11:29:38 -070080 // for SET_HOST_INFO
81 optional int32 callback_port = 1101;
82
Keun Soo Yim14f22722016-06-29 09:49:38 -070083 // for CHECK_DRIVER_SERVICE
Keun Soo Yim8e07a092016-05-04 16:30:35 -070084 // the binder service name
85 optional bytes service_name = 2001;
86
Keun Soo Yim14f22722016-06-29 09:49:38 -070087 // for LAUNCH_DRIVER_SERVICE
Keun Soo Yima066dd52016-07-01 15:18:28 -070088 optional VtsDriverType driver_type = 3001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -070089
Keun Soo Yima066dd52016-07-01 15:18:28 -070090 // 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 Yim8e07a092016-05-04 16:30:35 -070094 optional int32 bits = 3003;
95
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070096 // target class
Keun Soo Yim8e07a092016-05-04 16:30:35 -070097 optional int32 target_class = 3004;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -070098 // target type
Keun Soo Yim8e07a092016-05-04 16:30:35 -070099 optional int32 target_type = 3005;
Keun Soo Yimfeceb4d2016-05-11 20:01:00 -0700100 // target version (should be divided by 100) - float has a compatibility issue
101 // between C/C++ and python protoc.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700102 optional int32 target_version = 3006;
103
Keun Soo Yim34067de2016-05-17 09:46:37 -0700104 // the name of a HAL module to open.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700105 optional bytes module_name = 3007;
106
107 // for LIST_APIS
108 // none
109
Yuexi Maddb4e9e2016-07-11 12:45:41 -0700110 // for CALL_API and VTS_AGENT_COMMAND_INVOKE_SYSCALL
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700111 optional bytes arg = 4001;
Keun Soo Yim63d67512016-07-01 17:13:47 -0700112
113 // for VTS_AGENT_COMMAND_EXECUTE_SHELL_COMMAND
114 repeated bytes shell_command = 5001;
Keun Soo Yime0c0cdd2016-05-09 19:43:43 -0700115}
116
117
118// To specify a response.
119message AndroidSystemControlResponseMessage {
120 // Response type.
121 optional ResponseCode response_code = 1;
122
123 // The reason.
124 optional bytes reason = 1001;
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700125
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700126 // for the found component files.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700127 repeated bytes file_names = 1002;
128
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700129 // for the found API specification.
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700130 optional bytes spec = 1003;
131
Keun Soo Yim82b2d782016-06-20 11:29:38 -0700132 // for the API call result including result value, profiling data, and
Keun Soo Yim8e07a092016-05-04 16:30:35 -0700133 // coverage measurement data.
134 optional bytes result = 1004;
Keun Soo Yim63d67512016-07-01 17:13:47 -0700135
136 repeated bytes stdout = 2001;
137 repeated bytes stderr = 2002;
Yuexi Ma90ec35f2016-07-25 10:18:52 -0700138 repeated int32 exit_code = 2003;
Sahil Jain41d3be92016-06-20 18:25:11 -0700139}
140
141
142// To specify a callback request message for the TCP server.
143message AndroidSystemCallbackRequestMessage {
144 // callback id for the message sent to the TCP Server.
145 optional bytes id = 1;
Keun Soo Yim8f3ca752016-07-18 14:37:04 -0700146
147 // args
148 repeated VariableSpecificationMessage arg = 11;
Sahil Jain41d3be92016-06-20 18:25:11 -0700149}
150
151
152// To specify a callback response message from the TCP server.
153message AndroidSystemCallbackResponseMessage {
154 // Response code in a Callback response from TCP server.
155 optional ResponseCode response_code = 1;
156}