Lines Matching full:cmdline
29 char cmdline[] = "surfaceflinger"; in TEST() local
30 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
34 char cmdline[] = "surfaceflinger\0--flag"; in TEST() local
35 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
39 char cmdline[] = "/system/bin/surfaceflinger\0--flag\0--flag2"; in TEST() local
40 EXPECT_STREQ("surfaceflinger", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
45 char cmdline[] = "android.hardware.graphics.composer@2.2-service"; in TEST() local
46 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
49 char cmdline[] = "com.google.android.googlequicksearchbox:search"; in TEST() local
50 EXPECT_EQ(cmdline, FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
53 // chrome rewrites cmdline with spaces instead of nul bytes, parsing will in TEST()
55 char cmdline[] = in TEST() local
58 FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
64 char cmdline[] = ""; in TEST() local
65 EXPECT_STREQ("", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
68 char cmdline[] = "\0foo"; in TEST() local
69 EXPECT_STREQ("", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
72 char cmdline[] = "/foo/"; in TEST() local
73 EXPECT_STREQ("", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
76 char cmdline[] = "/"; in TEST() local
77 EXPECT_STREQ("", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
80 char cmdline[] = "foo/\0"; in TEST() local
81 EXPECT_STREQ("", FindBinaryName(cmdline, sizeof(cmdline) - 1)); in TEST()
86 char cmdline[] = "/system/bin/surfaceflinger\0--flag\0--flag2"; in TEST() local
87 const char* binname = FindBinaryName(cmdline, sizeof(cmdline) - 1); in TEST()
90 EXPECT_TRUE(MatchGlobPattern("/system/bin/surfaceflinger", cmdline, binname)); in TEST()
91 EXPECT_TRUE(MatchGlobPattern("/*/surfaceflinger", cmdline, binname)); in TEST()
92 EXPECT_TRUE(MatchGlobPattern("surfaceflinger", cmdline, binname)); in TEST()
93 EXPECT_TRUE(MatchGlobPattern("???faceflinger", cmdline, binname)); in TEST()
94 EXPECT_TRUE(MatchGlobPattern("*", cmdline, binname)); in TEST()
96 EXPECT_FALSE(MatchGlobPattern("/system", cmdline, binname)); in TEST()
97 EXPECT_FALSE(MatchGlobPattern("bin/surfaceflinger", cmdline, binname)); in TEST()
99 MatchGlobPattern("?system/bin/surfaceflinger", cmdline, binname)); in TEST()
100 EXPECT_FALSE(MatchGlobPattern("*/surfaceflinger", cmdline, binname)); in TEST()
104 char cmdline[] = "./top"; in TEST() local
105 const char* binname = FindBinaryName(cmdline, sizeof(cmdline) - 1); in TEST()
108 EXPECT_TRUE(MatchGlobPattern("top", cmdline, binname)); in TEST()
109 EXPECT_TRUE(MatchGlobPattern("*", cmdline, binname)); in TEST()
111 EXPECT_FALSE(MatchGlobPattern("./top", cmdline, binname)); in TEST()