/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 …]
|
/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/kernel/encryption/ |
D | utils.cpp | 54 std::string Errno() { return std::string(": ") + strerror(errno); } in Errno() 57 void DeleteRecursively(const std::string &path) { in DeleteRecursively() 61 std::unique_ptr<DIR, int (*)(DIR *)> dirp(opendir(path.c_str()), closedir); in DeleteRecursively() 68 std::string filename(entry->d_name); in DeleteRecursively() 78 void RandomBytesForTesting(std::vector<uint8_t> &bytes) { in RandomBytesForTesting() 85 std::vector<uint8_t> GenerateTestKey(size_t size) { in GenerateTestKey() 86 std::vector<uint8_t> key(size); in GenerateTestKey() 91 std::string BytesToHex(const std::vector<uint8_t> &bytes) { in BytesToHex() 92 std::ostringstream o; in BytesToHex() 94 o << std::hex << std::setw(2) << std::setfill('0') << (int)b; in BytesToHex() [all …]
|
D | vts_kernel_encryption.h | 30 bool Encrypt(const std::vector<uint8_t> &key, const uint8_t *iv, in Encrypt() 76 std::string Errno(); 78 void DeleteRecursively(const std::string &path); 80 void RandomBytesForTesting(std::vector<uint8_t> &bytes); 82 std::vector<uint8_t> GenerateTestKey(size_t size); 84 std::string BytesToHex(const std::vector<uint8_t> &bytes); 87 static inline std::string BytesToHex(const uint8_t (&array)[N]) { in BytesToHex() 88 return BytesToHex(std::vector<uint8_t>(&array[0], &array[N])); in BytesToHex() 100 std::string fs_blk_device; 101 std::string type; [all …]
|
D | file_based_encryption_tests.cpp | 130 std::vector<uint8_t> plaintext; 131 std::vector<uint8_t> actual_ciphertext; 136 static bool GetInodeNumber(const std::string &path, uint64_t *inode_number) { in GetInodeNumber() 162 static bool IsFscryptV2Supported(const std::string &mountpoint) { in IsFscryptV2Supported() 217 static bool ReadRawDataOfFile(int fd, const std::string &blk_device, in ReadRawDataOfFile() 219 std::vector<uint8_t> *raw_data) { in ReadRawDataOfFile() 235 std::unique_ptr<struct fiemap> map( in ReadRawDataOfFile() 249 std::unique_ptr<void, void (*)(void *)> buf_mem( in ReadRawDataOfFile() 273 << std::hex << extent.fe_flags << std::dec; in ReadRawDataOfFile() 276 ADD_FAILURE() << "Unsupported extent flags: 0x" << std::hex in ReadRawDataOfFile() [all …]
|
D | metadata_encryption_tests.cpp | 99 static bool ReadBlockDevice(const std::string &blk_device, size_t count, in ReadBlockDevice() 100 std::vector<uint8_t> *data) { in ReadBlockDevice() 102 std::unique_ptr<void, void (*)(void *)> buf_mem( in ReadBlockDevice() 121 *data = std::vector<uint8_t>(buffer, buffer + count); in ReadBlockDevice() 148 bool CreateTestDevice(const std::string &cipher, 149 const std::vector<uint8_t> &key, bool is_wrapped_key); 150 void VerifyDecryption(const std::vector<uint8_t> &key, const Cipher &cipher); 151 void DoTest(const std::string &cipher_string, const Cipher &cipher); 154 std::string raw_blk_device_; 155 std::string dm_device_path_; [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; 60 std::vector<float> compileWithoutCacheTimeSec; 62 std::optional<std::vector<float>> saveToCacheTimeSec; 63 std::optional<std::vector<float>> prepareFromCacheTimeSec; 91 bool resizeInputTensors(std::vector<int> shape); [all …]
|
D | random_graph_test_jni.cpp | 55 FuzzerLogRAII(const std::string& nnapiLogPath) { in FuzzerLogRAII() 65 std::ofstream os; in FuzzerLogRAII() 91 std::vector<test_helper::TestOperationType> getOperationsInModel( in getOperationsInModel() 93 std::vector<test_helper::TestOperationType> result; in getOperationsInModel() 107 std::string deviceNameStr(deviceName); in findDeviceByName() 144 const std::string& deviceName, in RandomGraphGenerator() 145 const std::string& testName, uint32_t numOperations, in RandomGraphGenerator() 146 uint32_t dimensionRange, std::string nnapiLogPath, in RandomGraphGenerator() 147 std::string failedModelDumpPath) in RandomGraphGenerator() 183 std::optional<test_helper::TestModel> testModel = in runRandomModel() [all …]
|
/test/vts-testcase/security/avb/ |
D | VtsSecurityAvbTest.cpp | 54 static bool HexToBytes(const std::string &hex, std::vector<uint8_t> *bytes) { in HexToBytes() 128 static std::unique_ptr<ShaHasher> CreateShaHasher( in CreateShaHasher() 129 const std::string &algorithm) { in CreateShaHasher() 131 return std::make_unique<ShaHasherImpl<SHA_CTX>>( in CreateShaHasher() 135 return std::make_unique<ShaHasherImpl<SHA256_CTX>>( in CreateShaHasher() 139 return std::make_unique<ShaHasherImpl<SHA512_CTX>>( in CreateShaHasher() 149 const std::vector<uint8_t> buffer(size, 0); in CalculateZeroDigest() 191 std::vector<uint8_t> calculating_hash_block; 214 static std::string VerifyHashtree(int image_fd, uint64_t image_size, in VerifyHashtree() 215 const std::vector<uint8_t> &salt, in VerifyHashtree() [all …]
|
/test/mlts/benchmark/native/ |
D | multi_process_test.cpp | 68 std::string modelFileName(path); in canReadInputFile() 69 std::ifstream fstream(modelFileName); in canReadInputFile() 70 std::stringstream readBuffer; in canReadInputFile() 75 bool readInputData(const char* inputDataFileName, std::vector<int> input_shape, in readInputData() 77 std::vector<InferenceInOutSequence>* result) { in readInputData() 79 std::for_each( in readInputData() 84 std::ifstream dataFile; in readInputData() 90 std::function<bool(uint8_t*, size_t)> failToGenerateData = in readInputData() 93 std::unique_ptr<uint8_t[]> dataBuffer = in readInputData() 94 std::make_unique<uint8_t[]>(inputDataSizeBytes); in readInputData() [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/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; 97 const std::string instance_name = manifest_instance.instance(); in ForEachHidlHalInstance() 100 std::async([&]() { fn(fq_name, instance_name, transport); }); in ForEachHidlHalInstance() 101 auto timeout = std::chrono::seconds(1); in ForEachHidlHalInstance() 102 std::future_status status = future_result.wait_for(timeout); in ForEachHidlHalInstance() [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 HidlVerifyFn = std::function<void( 68 std::function<void(const std::string& package, const std::string& name, 69 const std::string& instance)>; [all …]
|
D | SingleManifestTest.cpp | 49 void FailureHalMissing(const FQName &fq_name, const std::string &instance) { in FailureHalMissing() 87 static string RangeInstancesToString(const std::pair<It, It> &range) { in RangeInstancesToString() 88 std::stringstream ss; in RangeInstancesToString() 98 std::stringstream ss; in InstancesToString() 185 instances.emplace(transport, std::move(fqInstance)); in TEST_P() 193 << static_cast<std::underlying_type_t<Transport>>(it->first) << ")" in TEST_P() 200 std::transform( in TEST_P() 202 std::inserter(passthrough_declared, passthrough_declared.begin()), in TEST_P() 231 std::transform( in TEST_P() 232 chain.begin(), chain.end(), std::back_inserter(fq_instances), in TEST_P() [all …]
|
/test/vts-testcase/kernel/loop/ |
D | vts_kernel_loopconfig_test.cpp | 34 : 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()
|
/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 …]
|
/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 …]
|