• Home
  • Raw
  • Download

Lines Matching refs:permissions

224     Permissions permissions("/dev/null", 0666, 0, 0);  in TEST()  local
225 EXPECT_TRUE(permissions.Match("/dev/null")); in TEST()
226 EXPECT_FALSE(permissions.Match("/dev/nullsuffix")); in TEST()
227 EXPECT_FALSE(permissions.Match("/dev/nul")); in TEST()
228 EXPECT_EQ(0666U, permissions.perm()); in TEST()
229 EXPECT_EQ(0U, permissions.uid()); in TEST()
230 EXPECT_EQ(0U, permissions.gid()); in TEST()
236 Permissions permissions("/dev/dri/*", 0666, 0, 1000); in TEST() local
237 EXPECT_TRUE(permissions.Match("/dev/dri/some_dri_device")); in TEST()
238 EXPECT_TRUE(permissions.Match("/dev/dri/some_other_dri_device")); in TEST()
239 EXPECT_TRUE(permissions.Match("/dev/dri/")); in TEST()
240 EXPECT_FALSE(permissions.Match("/dev/dr/non_match")); in TEST()
241 EXPECT_EQ(0666U, permissions.perm()); in TEST()
242 EXPECT_EQ(0U, permissions.uid()); in TEST()
243 EXPECT_EQ(1000U, permissions.gid()); in TEST()
249 Permissions permissions("/dev/device*name", 0666, 0, 1000); in TEST() local
250 EXPECT_TRUE(permissions.Match("/dev/devicename")); in TEST()
251 EXPECT_TRUE(permissions.Match("/dev/device123name")); in TEST()
252 EXPECT_TRUE(permissions.Match("/dev/deviceabcname")); in TEST()
253 EXPECT_FALSE(permissions.Match("/dev/device123name/subdevice")); in TEST()
254 EXPECT_FALSE(permissions.Match("/dev/deviceame")); in TEST()
255 EXPECT_EQ(0666U, permissions.perm()); in TEST()
256 EXPECT_EQ(0U, permissions.uid()); in TEST()
257 EXPECT_EQ(1000U, permissions.gid()); in TEST()
263 Permissions permissions("/dev/device*name*", 0666, 0, 1000); in TEST() local
264 EXPECT_TRUE(permissions.Match("/dev/devicename")); in TEST()
265 EXPECT_TRUE(permissions.Match("/dev/device123name")); in TEST()
266 EXPECT_TRUE(permissions.Match("/dev/deviceabcname")); in TEST()
267 EXPECT_TRUE(permissions.Match("/dev/device123namesomething")); in TEST()
269 EXPECT_FALSE(permissions.Match("/dev/device123name/something")); in TEST()
270 EXPECT_FALSE(permissions.Match("/dev/deviceame")); in TEST()
271 EXPECT_EQ(0666U, permissions.perm()); in TEST()
272 EXPECT_EQ(0U, permissions.uid()); in TEST()
273 EXPECT_EQ(1000U, permissions.gid()); in TEST()
278 SysfsPermissions permissions("/sys/devices/virtual/input/input*", "enable", 0660, 0, 1001); in TEST() local
279 EXPECT_TRUE(permissions.MatchWithSubsystem("/sys/devices/virtual/input/input0", "input")); in TEST()
280 EXPECT_FALSE(permissions.MatchWithSubsystem("/sys/devices/virtual/input/not_input0", "input")); in TEST()
281 EXPECT_EQ(0660U, permissions.perm()); in TEST()
282 EXPECT_EQ(0U, permissions.uid()); in TEST()
283 EXPECT_EQ(1001U, permissions.gid()); in TEST()
288 SysfsPermissions permissions("/sys/class/input/event*", "enable", 0660, 0, 1001); in TEST() local
289 EXPECT_TRUE(permissions.MatchWithSubsystem( in TEST()
291 EXPECT_FALSE(permissions.MatchWithSubsystem( in TEST()
293 EXPECT_FALSE(permissions.MatchWithSubsystem( in TEST()
295 EXPECT_EQ(0660U, permissions.perm()); in TEST()
296 EXPECT_EQ(0U, permissions.uid()); in TEST()
297 EXPECT_EQ(1001U, permissions.gid()); in TEST()
302 SysfsPermissions permissions("/sys/bus/i2c/devices/i2c-*", "enable", 0660, 0, 1001); in TEST() local
303 EXPECT_TRUE(permissions.MatchWithSubsystem("/sys/devices/soc.0/f9967000.i2c/i2c-5", "i2c")); in TEST()
304 EXPECT_FALSE(permissions.MatchWithSubsystem("/sys/devices/soc.0/f9967000.i2c/not-i2c", "i2c")); in TEST()
306 permissions.MatchWithSubsystem("/sys/devices/soc.0/f9967000.i2c/i2c-5", "not_i2c")); in TEST()
307 EXPECT_EQ(0660U, permissions.perm()); in TEST()
308 EXPECT_EQ(0U, permissions.uid()); in TEST()
309 EXPECT_EQ(1001U, permissions.gid()); in TEST()