Home
last modified time | relevance | path

Searched refs:std (Results 1 – 25 of 154) sorted by relevance

1234567

/test/vts/utils/native/trace_processor/
DVtsTraceProcessor.h43 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 …]
DVtsCoverageProcessor.h35 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/
DProfilerCodeGenBase.h59 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 …]
DHalHidlProfilerCodeGen.h33 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 …]
DHalHidlProfilerCodeGen.cpp27 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/
Dutils.cpp54 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 …]
Dfile_based_encryption_tests.cpp138 std::vector<uint8_t> plaintext;
139 std::vector<uint8_t> actual_ciphertext;
144 static bool GetInodeNumber(const std::string &path, uint64_t *inode_number) { in GetInodeNumber()
170 static bool IsFscryptV2Supported(const std::string &mountpoint) { in IsFscryptV2Supported()
225 static bool ReadRawDataOfFile(int fd, const std::string &blk_device, in ReadRawDataOfFile()
227 std::vector<uint8_t> *raw_data) { in ReadRawDataOfFile()
243 std::unique_ptr<struct fiemap> map( in ReadRawDataOfFile()
257 std::unique_ptr<void, void (*)(void *)> buf_mem( in ReadRawDataOfFile()
281 << std::hex << extent.fe_flags << std::dec; in ReadRawDataOfFile()
284 ADD_FAILURE() << "Unsupported extent flags: 0x" << std::hex in ReadRawDataOfFile()
[all …]
Dvts_kernel_encryption.h30 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 …]
Dmetadata_encryption_tests.cpp99 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/vts-testcase/security/avb/
DVtsSecurityAvbTest.cpp54 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/vts-testcase/kernel/bow/
DBowTest.cpp68 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/
Dthermal_hidl_stress_test.cpp49 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/
DVtsTrebleVintfTestBase.cpp74 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 …]
Dutils.h56 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 …]
DSingleManifestTest.cpp49 void FailureHalMissing(const FQName &fq_name, const std::string &instance) { in FailureHalMissing()
82 static string RangeInstancesToString(const std::pair<It, It> &range) { in RangeInstancesToString()
83 std::stringstream ss; in RangeInstancesToString()
93 std::stringstream ss; in InstancesToString()
180 instances.emplace(transport, std::move(fqInstance)); in TEST_P()
188 << static_cast<std::underlying_type_t<Transport>>(it->first) << ")" in TEST_P()
195 std::transform( in TEST_P()
197 std::inserter(passthrough_declared, passthrough_declared.begin()), in TEST_P()
226 std::transform( in TEST_P()
227 chain.begin(), chain.end(), std::back_inserter(fq_instances), in TEST_P()
[all …]
/test/mlts/benchmark/jni/
Drun_tflite.h39 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/kernel/loop/
Dvts_kernel_loopconfig_test.cpp34 : 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/
DProtoFuzzerMutator.cpp20 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 …]
DProtoFuzzerStats.cpp24 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/
DProtoFuzzerStats.h32 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_;
DProtoFuzzerMutator.h32 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 …]
DProtoFuzzerRunner.h34 std::shared_ptr<DriverBase> hal_;
37 using IfaceDescTbl = std::unordered_map<std::string, IfaceDesc>;
43 explicit ProtoFuzzerRunner(const std::vector<CompSpec> &comp_specs,
44 const std::string version_iface);
47 void Init(const std::string &, bool);
64 const CompSpec *FindCompSpec(std::string);
74 std::unordered_map<std::string, CompSpec> comp_specs_;
/test/vts/runners/target/gtest/
Dgtest_main.cpp104 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/
DSocketTagUserSpace.cpp67 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/
DVtsCoverageConfigureMain.cpp21 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 …]

1234567