Home
last modified time | relevance | path

Searched refs:pattern (Results 1 – 25 of 35) sorted by relevance

12

/system/core/base/include/android-base/
Dtest_utils.h56 #define ASSERT_MATCH(str, pattern) \ argument
58 if (!std::regex_search((str), std::regex((pattern)))) { \
59 FAIL() << "regex mismatch: expected " << (pattern) << " in:\n" << (str); \
63 #define ASSERT_NOT_MATCH(str, pattern) \ argument
65 if (std::regex_search((str), std::regex((pattern)))) { \
66 FAIL() << "regex mismatch: expected to not find " << (pattern) << " in:\n" << (str); \
70 #define EXPECT_MATCH(str, pattern) \ argument
72 if (!std::regex_search((str), std::regex((pattern)))) { \
73 ADD_FAILURE() << "regex mismatch: expected " << (pattern) << " in:\n" << (str); \
77 #define EXPECT_NOT_MATCH(str, pattern) \ argument
[all …]
/system/core/libcutils/
Dashmem-host.cpp38 char pattern[PATH_MAX]; in ashmem_create_region() local
39 snprintf(pattern, sizeof(pattern), "/tmp/android-ashmem-%d-XXXXXXXXX", getpid()); in ashmem_create_region()
40 int fd = mkstemp(pattern); in ashmem_create_region()
43 unlink(pattern); in ashmem_create_region()
Dfs_config.cpp275 std::string pattern(prefix, len); in fs_config_cmp() local
285 if (!EndsWith(pattern, "/*")) { in fs_config_cmp()
286 if (EndsWith(pattern, "/")) { in fs_config_cmp()
287 pattern.append("*"); in fs_config_cmp()
289 pattern.append("/*"); in fs_config_cmp()
297 if (fnmatch(pattern.c_str(), input.c_str(), fnm_flags) == 0) return true; in fs_config_cmp()
304 } else if (StartsWith(pattern, kSystem)) { in fs_config_cmp()
305 pattern.erase(0, strlen(kSystem)); in fs_config_cmp()
310 if (!is_partition(pattern)) return false; in fs_config_cmp()
312 return fnmatch(pattern.c_str(), input.c_str(), fnm_flags) == 0; in fs_config_cmp()
/system/core/toolbox/upstream-netbsd/usr.bin/grep/
Dfastgrep.c68 fg->pattern = (unsigned char *)grep_strdup(pat); in fgrepcomp()
74 fg->qsBc[fg->pattern[i]] = fg->len - i; in fgrepcomp()
124 fg->pattern = grep_malloc(fg->len + 1); in fastcomp()
125 memcpy(fg->pattern, pat, fg->len); in fastcomp()
126 fg->pattern[fg->len] = '\0'; in fastcomp()
131 if (fg->pattern[i] == '.') { in fastcomp()
145 free(fg->pattern); in fastcomp()
146 fg->pattern = NULL; in fastcomp()
162 grep_revstr(fg->pattern, fg->len); in fastcomp()
191 fg->qsBc[fg->pattern[i]] = fg->len - i; in fastcomp()
[all …]
Dgrep.c85 char **pattern; variable
237 pattern = grep_realloc(pattern, ++pattern_sz * in add_pattern()
238 sizeof(*pattern)); in add_pattern()
243 pattern[patterns] = grep_malloc(len + 1); in add_pattern()
244 memcpy(pattern[patterns], pat, len); in add_pattern()
245 pattern[patterns][len] = '\0'; in add_pattern()
677 fgrepcomp(&fg_pattern[i], pattern[i]); in main()
680 if (fastcomp(&fg_pattern[i], pattern[i])) { in main()
682 c = regcomp(&r_pattern[i], pattern[i], cflags); in main()
Dgrep.h104 unsigned char *pattern; member
130 extern char **pattern;
Dutil.c306 if (fg_pattern[i].pattern) { in procline()
/system/libvintf/include/vintf/
DRegex.h38 __attribute__((warn_unused_result)) bool compile(const std::string& pattern);
45 static const Regex* Get(const std::string& pattern);
/system/libvintf/
DRegex.cpp34 bool Regex::compile(const std::string& pattern) { in compile() argument
37 int status = regcomp(mImpl.get(), pattern.c_str(), REG_EXTENDED | REG_NEWLINE); in compile()
/system/apex/tests/src/com/android/tests/apex/
DApexTestUtils.java113 void assertMatchesRegex(String text, Pattern pattern) { in assertMatchesRegex() argument
114 Matcher matcher = pattern.matcher(text); in assertMatchesRegex()
116 String.format("Not true that '%s' matches regexp '%s'", text, pattern), in assertMatchesRegex()
/system/timezone/distro/core/src/main/com/android/timezone/distro/
DDistroVersion.java55 FORMAT_VERSION_PATTERN.pattern() + "\\|"
56 + RULES_VERSION_PATTERN.pattern() + "\\|"
57 + REVISION_PATTERN.pattern()
/system/ca-certificates/google/
Dextract_from_pem.py74 pattern = r'-----BEGIN CERTIFICATE-----[^-]*-----END CERTIFICATE-----'
75 pem_certs = re.findall(pattern, pem_file.read())
/system/core/deprecated-adf/libadf/
Dadf.cpp53 static ssize_t adf_find_nodes(const char *pattern, adf_id_t **ids_out) in adf_find_nodes() argument
65 int matched = sscanf(dirent->d_name, pattern, &id); in adf_find_nodes()
227 char pattern[64]; in adf_interfaces() local
229 snprintf(pattern, sizeof(pattern), "adf-interface%u.%%u", dev->id); in adf_interfaces()
230 return adf_find_nodes(pattern, interfaces); in adf_interfaces()
442 char pattern[64]; in adf_overlay_engines() local
444 snprintf(pattern, sizeof(pattern), "adf-overlay-engine%u.%%u", dev->id); in adf_overlay_engines()
445 return adf_find_nodes(pattern, overlay_engines); in adf_overlay_engines()
/system/extras/zram-perf/
Dzram-perf.cpp28 std::vector<typeof(val)> pattern(kPatternSize, 0); in fillPageCompressible() local
31 pattern[i] = val + i; in fillPageCompressible()
35 std::copy_n(pattern.data(), kPatternSize, (page_ptr + i)); in fillPageCompressible()
/system/extras/boottime_tools/bootanalyze/
Dbootanalyze.py96 search_events_pattern = {key: re.compile(pattern)
97 for key, pattern in cfg['events'].iteritems()}
98 timing_events_pattern = {key: re.compile(pattern)
99 for key, pattern in cfg['timings'].iteritems()}
100 shutdown_events_pattern = {key: re.compile(pattern)
101 for key, pattern in cfg['shutdown_events'].iteritems()}
699 pattern = re.compile(BOOT_PROP)
703 match = pattern.match(line)
732 def extract_a_time(line, pattern, date_transform_function): argument
733 found = re.findall(pattern, line)
[all …]
Dbugreport_anayze.py142 self.event_patterns = {key: re.compile(pattern)
143 for key, pattern in cfg['events'].iteritems()}
144 self.timing_patterns = {key: re.compile(pattern)
145 for key, pattern in cfg['timings'].iteritems()}
146 self.shutdown_event_patterns = {key: re.compile(pattern)
147 for key, pattern in cfg['shutdown_events'].iteritems()}
DREADME.md10 event1_name: <pattern that matches log message>
/system/tools/hidl/scripts/
Dgen-docs.sh15 local pattern="$2"
/system/update_engine/common/
Dtest_utils.h145 explicit ScopedTempFile(const std::string& pattern) { in ScopedTempFile() argument
146 EXPECT_TRUE(utils::MakeTempFile(pattern, &path_, nullptr)); in ScopedTempFile()
/system/sepolicy/tests/
Dpolicy.py22 pattern = re.compile('^' + pathregex[0:i] + "$")
25 if pattern.match(prefix):
235 pattern = re.compile('^' + pathregex + "$")
236 if pattern.match(prefix):
/system/core/libpixelflinger/codeflinger/
Ddisassem.c110 u_int pattern; member
316 if ((insn & i_ptr->mask) == i_ptr->pattern) { in disasm()
/system/update_engine/scripts/
Dbrillo_update_payload299 local pattern="${1:-tempfile.XXXXXX}"
300 mktemp --tmpdir="${FLAGS_work_dir}" "${pattern}"
/system/extras/simpleperf/scripts/
Dtest.py1314 if args.pattern:
1315 pattern = re.compile(fnmatch.translate(args.pattern[0]))
1318 if pattern.match(test):
/system/update_engine/payload_generator/
Ddelta_diff_utils_unittest.cc72 const string& pattern, in CreatePartition() argument
76 ASSERT_TRUE(utils::MakeTempFile(pattern.c_str(), &part->path, &fd)); in CreatePartition()
/system/core/trusty/storage/tests/
Dmain.cpp44 uint32_t pattern = (uint32_t)(off / sizeof(uint32_t)); in fill_pattern32() local
46 *buf++ = pattern++; in fill_pattern32()
53 uint32_t pattern = (uint32_t)(off / sizeof(uint32_t)); in check_pattern32() local
55 if (*buf != pattern) in check_pattern32()
58 pattern++; in check_pattern32()

12