/test/vts/utils/native/trace_processor/ |
D | VtsTraceProcessor.h | 43 void CleanupTraces(const std::string& path); 45 void ProcessTraceForLatencyProfiling(const std::string& trace_file); 48 void DedupTraces(const std::string& trace_dir); 58 const std::string& coverage_file_dir, const std::string& trace_file_dir, 61 void ParseTrace(const std::string& trace_file); 64 void ConvertTrace(const std::string& trace_file); 69 void GetTestListForHal(const std::string& test_trace_dir, 70 const std::string& output_file, 76 bool ParseBinaryTrace(const std::string& trace_file, bool ignore_timestamp, 82 bool ParseTextTrace(const std::string& trace_file, [all …]
|
D | VtsCoverageProcessor.h | 35 void MergeCoverage(const std::string& coverage_file_dir, 36 const std::string& merged_coverage_file); 40 void CompareCoverage(const std::string& ref_msg_file, 41 const std::string& new_msg_file); 44 void ParseCoverageData(const std::string& coverage_file, 54 void GetSubsetCoverage(const std::string& ref_msg_file, 55 const std::string& full_msg_file, 56 const std::string& result_msg_file); 59 void GetCoverageSummary(const std::string& coverage_msg_file);
|
/test/vts/compilation_tools/vtsc/code_gen/profiler/ |
D | ProfilerCodeGenBase.h | 59 const VariableSpecificationMessage& val, const std::string& arg_name, 60 const std::string& arg_value) = 0; 64 const VariableSpecificationMessage& val, const std::string& arg_name, 65 const std::string& arg_value) = 0; 69 const VariableSpecificationMessage& val, const std::string& arg_name, 70 const std::string& arg_value) = 0; 74 const VariableSpecificationMessage& val, const std::string& arg_name, 75 const std::string& arg_value) = 0; 79 const VariableSpecificationMessage& val, const std::string& arg_name, 80 const std::string& arg_value) = 0; [all …]
|
D | HalHidlProfilerCodeGen.h | 33 const VariableSpecificationMessage& val, const std::string& arg_name, 34 const std::string& arg_value) override; 37 const VariableSpecificationMessage& val, const std::string& arg_name, 38 const std::string& arg_value) override; 41 const VariableSpecificationMessage& val, const std::string& arg_name, 42 const std::string& arg_value) override; 45 const VariableSpecificationMessage& val, const std::string& arg_name, 46 const std::string& arg_value) override; 49 const VariableSpecificationMessage& val, const std::string& arg_name, 50 const std::string& arg_value) override; [all …]
|
D | HalHidlProfilerCodeGen.cpp | 27 const std::string& arg_name, const std::string& arg_value) { in GenerateProfilerForScalarVariable() 35 const std::string& arg_name, const std::string& arg_value) { in GenerateProfilerForStringVariable() 45 const std::string& arg_name, const std::string& arg_value) { in GenerateProfilerForEnumVariable() 50 std::string predefined_type = val.predefined_type(); in GenerateProfilerForEnumVariable() 55 const std::string scalar_type = val.enum_value().scalar_type(); in GenerateProfilerForEnumVariable() 64 const std::string& arg_name, const std::string& arg_value) { in GenerateProfilerForVectorVariable() 67 std::string index_name = GetVarString(arg_name) + "_index"; in GenerateProfilerForVectorVariable() 71 std::string vector_element_name = in GenerateProfilerForVectorVariable() 85 const std::string& arg_name, const std::string& arg_value) { in GenerateProfilerForArrayVariable() 88 std::string index_name = GetVarString(arg_name) + "_index"; in GenerateProfilerForArrayVariable() [all …]
|
/test/vts-testcase/security/avb/ |
D | VtsSecurityAvbTest.cpp | 53 static bool HexToBytes(const std::string &hex, std::vector<uint8_t> *bytes) { in HexToBytes() 127 static std::unique_ptr<ShaHasher> CreateShaHasher( in CreateShaHasher() 128 const std::string &algorithm) { in CreateShaHasher() 130 return std::make_unique<ShaHasherImpl<SHA_CTX>>( in CreateShaHasher() 134 return std::make_unique<ShaHasherImpl<SHA256_CTX>>( in CreateShaHasher() 138 return std::make_unique<ShaHasherImpl<SHA512_CTX>>( in CreateShaHasher() 148 const std::vector<uint8_t> buffer(size, 0); in CalculateZeroDigest() 190 std::vector<uint8_t> calculating_hash_block; 213 static std::string VerifyHashtree(int image_fd, uint64_t image_size, in VerifyHashtree() 214 const std::vector<uint8_t> &salt, in VerifyHashtree() [all …]
|
/test/vts-testcase/kernel/bow/ |
D | BowTest.cpp | 68 template <void (*Prepare)(std::string)> 79 loop_device_ = std::string("/dev/block/loop") + std::to_string(i); in SetUp() 96 const static std::string loop_file_; 101 std::string loop_device_; 104 template <void (*Prepare)(std::string)> 105 const std::string LoopbackTestFixture<Prepare>::loop_file_ = 108 void PrepareBowDefault(std::string) {} in PrepareBowDefault() 110 template <void (*PrepareLoop)(std::string), 111 void (*PrepareBow)(std::string) = PrepareBowDefault> 113 std::string GetTableStatus() { in GetTableStatus() [all …]
|
/test/vts-testcase/hal/thermal/V1_0/target_stress/ |
D | thermal_hidl_stress_test.cpp | 49 inline std::cv_status wait() { in wait() 50 std::unique_lock<std::mutex> lock(mtx_); in wait() 52 std::cv_status status = std::cv_status::no_timeout; in wait() 53 auto now = std::chrono::system_clock::now(); in wait() 55 status = cv_.wait_until(lock, now + std::chrono::seconds(TIMEOUT_PERIOD)); in wait() 56 if (status == std::cv_status::timeout) return status; in wait() 64 std::mutex mtx_; 65 std::condition_variable cv_; 76 std::unique_lock<std::mutex> lock(mtx_); in TEST_F() 80 EXPECT_EQ(std::cv_status::no_timeout, wait()); in TEST_F() [all …]
|
/test/vts-testcase/kernel/loop/ |
D | vts_kernel_loopconfig_test.cpp | 33 : first_api_level_(std::stoi( in KernelLoopConfigTest() 47 std::array<char, 256> line; in TEST_F() 49 std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(kCmd, "r"), pclose); in TEST_F() 55 auto minCountStr = std::string(read); in TEST_F() 58 ASSERT_NE(pos, std::string::npos); in TEST_F() 61 int minCountValue = std::stoi(minCountStr.substr(pos + 1)); in TEST_F() 68 std::ifstream max_loop("/sys/module/loop/parameters/max_loop"); in TEST_F() 69 std::ifstream max_part("/sys/module/loop/parameters/max_part"); in TEST_F() 71 std::string max_loop_str; in TEST_F() 72 std::string max_part_str; in TEST_F() [all …]
|
/test/vts-testcase/fuzz/iface_fuzzer/ |
D | ProtoFuzzerMutator.cpp | 20 using std::cerr; 21 using std::cout; 22 using std::endl; 23 using std::make_unique; 24 using std::unordered_map; 25 using namespace std::placeholders; 47 std::bind(&ProtoFuzzerMutator::ArrayRandomGen, this, _1); in ProtoFuzzerMutator() 49 std::bind(&ProtoFuzzerMutator::ArrayMutate, this, _1); in ProtoFuzzerMutator() 52 std::bind(&ProtoFuzzerMutator::EnumRandomGen, this, _1); in ProtoFuzzerMutator() 53 mutate_fns_[TYPE_ENUM] = std::bind(&ProtoFuzzerMutator::EnumMutate, this, _1); in ProtoFuzzerMutator() [all …]
|
D | ProtoFuzzerStats.cpp | 24 using std::endl; 25 using std::map; 26 using std::string; 27 using std::unordered_map; 38 touched_ifaces_.insert(std::move(iface_name)); in RegisterTouch() 42 std::map<string, uint64_t> ordered_result{touch_count_.cbegin(), in StatsString() 45 std::stringstream ss{}; in StatsString() 48 ss << std::left << std::setfill(' ') << std::setw(40) << entry.first in StatsString() 49 << std::setw(40) << entry.second << endl; in StatsString()
|
D | ProtoFuzzerUtils.cpp | 26 using std::cerr; 27 using std::cout; 28 using std::string; 29 using std::unordered_map; 30 using std::vector; 84 std::istringstream iss(arg); in ExtractCompSpecs() 86 while (std::getline(iss, dir_path, ':')) { in ExtractCompSpecs() 91 std::abort(); in ExtractCompSpecs() 100 result.emplace_back(std::move(comp_spec)); in ExtractCompSpecs() 129 std::abort(); in ExtractProtoFuzzerParams() [all …]
|
D | ProtoFuzzerRunner.cpp | 30 using std::cerr; 31 using std::cout; 32 using std::string; 33 using std::unordered_map; 34 using std::vector; 55 std::stoul(hal_version.substr(0, hal_version.find("."))); in GetServiceName() 57 std::stoul(hal_version.substr(hal_version.find(".") + 1)); in GetServiceName() 64 std::abort(); in GetServiceName() 85 std::abort(); in Dlopen() 98 std::abort(); in Dlsym() [all …]
|
/test/mlts/benchmark/jni/ |
D | run_tflite.h | 39 std::vector<InferenceOutput> outputs; 40 std::function<bool(uint8_t*, size_t)> createInput; 44 using InferenceInOutSequence = std::vector<InferenceInOut>; 50 std::vector<float> meanSquareErrors; 52 std::vector<float> maxSingleErrors; 54 std::vector<std::vector<uint8_t>> inferenceOutputs; 72 bool resizeInputTensors(std::vector<int> shape); 78 bool benchmark(const std::vector<InferenceInOutSequence>& inOutData, 80 std::vector<InferenceResult>* result); 83 const std::vector<InferenceInOutSequence>& inOutData); [all …]
|
/test/vts-testcase/hal/treble/vintf/ |
D | VtsTrebleVintfTestBase.cpp | 74 using std::cout; 75 using std::endl; 76 using std::map; 77 using std::set; 78 using std::string; 79 using std::vector; 94 const std::string instance_name = manifest_instance.instance(); in ForEachHalInstance() 97 std::async([&]() { fn(fq_name, instance_name, transport); }); in ForEachHalInstance() 98 auto timeout = std::chrono::seconds(1); in ForEachHalInstance() 99 std::future_status status = future_result.wait_for(timeout); in ForEachHalInstance() [all …]
|
D | utils.h | 56 using std::cout; 57 using std::endl; 58 using std::map; 59 using std::multimap; 60 using std::set; 61 using std::string; 63 using std::vector; 65 using HalVerifyFn = std::function<void(const FQName& fq_name, 68 using HalManifestPtr = std::shared_ptr<const HalManifest>; 69 using MatrixPtr = std::shared_ptr<const CompatibilityMatrix>; [all …]
|
D | SingleManifestTest.cpp | 71 static string RangeInstancesToString(const std::pair<It, It> &range) { in RangeInstancesToString() 72 std::stringstream ss; in RangeInstancesToString() 82 std::stringstream ss; in InstancesToString() 169 instances.emplace(transport, std::move(fqInstance)); in TEST_P() 177 << static_cast<std::underlying_type_t<Transport>>(it->first) << ")" in TEST_P() 184 std::transform( in TEST_P() 186 std::inserter(passthrough_declared, passthrough_declared.begin()), in TEST_P() 215 std::transform( in TEST_P() 216 chain.begin(), chain.end(), std::back_inserter(fq_instances), in TEST_P() 235 std::set_difference( in TEST_P() [all …]
|
/test/vts-testcase/fuzz/iface_fuzzer/include/ |
D | ProtoFuzzerStats.h | 32 void RegisterTouch(std::string iface_name, std::string func_name); 34 std::string StatsString() const; 36 const std::unordered_set<std::string> &TouchedIfaces() const { in TouchedIfaces() 43 std::unordered_map<std::string, uint64_t> touch_count_; 45 std::unordered_set<std::string> touched_ifaces_;
|
D | ProtoFuzzerMutator.h | 32 using BiasedRandomScalarGen = std::function<uint64_t(Random &rand)>; 33 using Odds = std::pair<uint64_t, uint64_t>; 34 using VarMutateFn = std::function<VarInstance(const VarInstance &)>; 35 using VarRandomGenFn = std::function<VarInstance(const VarSpec &)>; 36 using VarTransformFn = std::function<VariableSpecificationMessage( 56 ProtoFuzzerMutator(Random &, std::unordered_map<std::string, TypeSpec>, 92 ScalarData RandomGen(const ScalarData &, const std::string &); 108 const TypeSpec &FindPredefinedType(std::string); 113 std::unordered_map<std::string, TypeSpec> predefined_types_; 117 std::unordered_map<VariableType, VarMutateFn> mutate_fns_; [all …]
|
D | ProtoFuzzerRunner.h | 34 std::shared_ptr<DriverBase> hal_; 37 using IfaceDescTbl = std::unordered_map<std::string, IfaceDesc>; 43 explicit ProtoFuzzerRunner(const std::vector<CompSpec> &comp_specs); 46 void Init(const std::string &, bool); 63 const CompSpec *FindCompSpec(std::string); 73 std::unordered_map<std::string, CompSpec> comp_specs_;
|
D | ProtoFuzzerUtils.h | 64 std::mt19937_64 rand_; 73 std::vector<CompSpec> comp_specs_; 75 std::string target_iface_; 89 const CompSpec &FindCompSpec(const std::vector<CompSpec> &, 90 const std::string &); 94 std::unordered_map<std::string, TypeSpec> ExtractPredefinedTypes( 95 const std::vector<CompSpec> &);
|
/test/vts/runners/target/gtest/ |
D | gtest_main.cpp | 104 static int GetDeadlineInfo(const std::string& /*test_name*/) { in GetDeadlineInfo() 109 static int GetWarnlineInfo(const std::string& /*test_name*/) { in GetWarnlineInfo() 149 const std::string& GetName() const { return name_; } in GetName() 161 void AppendTestOutput(const std::string& s) { output_ += s; } in AppendTestOutput() 163 const std::string& GetTestOutput() const { return output_; } in GetTestOutput() 166 const std::string name_; 169 std::string output_; 177 const std::string& GetName() const { return name_; } in GetName() 185 std::string GetTestName(size_t test_id) const { in GetTestName() 230 const std::string name_; [all …]
|
/test/vts-testcase/kernel/api/qtaguid/ |
D | SocketTagUserSpace.cpp | 67 std::cerr << "bind failed" << std::endl; in server_download() 110 std::cout << "Get system information failed: %s\n" in checkKernelSupport() 111 << strerror(errno) << std::endl; in checkKernelSupport() 135 std::cout << "socket creation failed: %s" << strerror(errno) << std::endl; in setup() 139 std::cout << "socket setup: failed to tag" << std::endl; in setup() 145 std::cout << "socket setup: Unexpected results" << std::endl; in setup() 155 std::ifstream fctrl("/proc/net/xt_qtaguid/ctrl", std::fstream::in); in checkTag() 157 std::cout << "qtaguid ctrl open failed!" << std::endl; in checkTag() 161 std::string buff = in checkTag() 164 std::string ctrl_data; in checkTag() [all …]
|
/test/vts/utils/native/libcoverage/ |
D | VtsCoverageConfigureMain.cpp | 21 using namespace std; 33 << std::endl; in usage() 41 if (n == std::string::npos || fqInstanceName.size() == n + 1) return false; in parseFqInstaceName() 44 string instanceName = fqInstanceName.substr(n + 1, std::string::npos); in parseFqInstaceName() 47 if (n == std::string::npos || fqInstanceName.size() == n + 1) return false; in parseFqInstaceName() 49 std::forward<Lambda>(func)(fqInterfaceName, instanceName, halName); in parseFqInstaceName() 64 cerr << "failed to get IServiceManager to poke HAL services." << std::endl; in FlushHALCoverage() 85 << interfaceRet.description() << std::endl; in FlushHALCoverage() 93 << std::endl; in FlushHALCoverage() 96 << std::endl; in FlushHALCoverage() [all …]
|
/test/vts-testcase/kernel/toolchain/ |
D | vts_kernel_toolchain.cpp | 33 std::string version_; 34 const std::string arch_; 38 first_api_level_(std::stoi( in KernelVersionTest() 40 std::ifstream proc_version("/proc/version"); in KernelVersionTest() 41 std::getline(proc_version, version_); in KernelVersionTest() 50 const std::string needle = "gcc version"; in TEST_F() 56 const std::string needle = "clang version"; in TEST_F()
|