• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 The Android Open Source Project
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 #ifndef CPP_COMPUTEPIPE_TESTS_FUZZ_COMMON_H_
18 #define CPP_COMPUTEPIPE_TESTS_FUZZ_COMMON_H_
19 
20 namespace android {
21 namespace automotive {
22 namespace computepipe {
23 namespace runner {
24 namespace test {
25 
26 const int kMaxFuzzerConsumedBytes = 12;
27 
28 #define RUNNER_COMP_BASE_ENUM                                                   \
29     HANDLE_CONFIG_PHASE,                  /* verify handleConfigPhase */        \
30             HANDLE_EXECUTION_PHASE,       /* verify handleExecutionPhase */     \
31             HANDLE_STOP_IMMEDIATE_PHASE,  /* verify handleStopImmediatePhase */ \
32             HANDLE_STOP_WITH_FLUSH_PHASE, /* verify handleStopWithFlushPhase */ \
33             HANDLE_RESET_PHASE,           /* verify handleResetPhase */         \
34             API_SUM
35 
36 #define GRAPH_RUNNER_BASE_ENUM                                                 \
37     GET_GRAPH_TYPE,                      /* verify GetGraphType */             \
38             GET_GRAPH_STATE,             /* verify GetGraphState */            \
39             GET_STATUS,                  /* verify GetStatus */                \
40             GET_ERROR_MESSAGE,           /* verify GetErrorMessage */          \
41             GET_SUPPORTED_GRAPH_CONFIGS, /* verify GetSupportedGraphConfigs */ \
42             SET_INPUT_STREAM_DATA,       /* verify SetInputStreamData */       \
43             SET_INPUT_STREAM_PIXEL_DATA, /* verify SetInputStreamPixelData */  \
44             START_GRAPH_PROFILING,       /* verify StartGraphProfiling */      \
45             STOP_GRAPH_PROFILING         /* verify StopGraphProfiling */
46 
47 const char kAddress[16] = "[::]:10000";
48 
49 }  // namespace test
50 }  // namespace runner
51 }  // namespace computepipe
52 }  // namespace automotive
53 }  // namespace android
54 
55 #endif  // CPP_COMPUTEPIPE_TESTS_FUZZ_COMMON_H_
56