Lines Matching refs:kApexMountForTest
271 static constexpr const char* kApexMountForTest = "/mnt/scratch/apex"; in SetUpApexTestEnvironment() local
274 if (access(kApexMountForTest, F_OK) == 0) { in SetUpApexTestEnvironment()
275 if (umount2(kApexMountForTest, MNT_FORCE | UMOUNT_NOFOLLOW) != 0) { in SetUpApexTestEnvironment()
276 PLOG(WARNING) << "Failed to unmount " << kApexMountForTest; in SetUpApexTestEnvironment()
278 if (rmdir(kApexMountForTest) != 0) { in SetUpApexTestEnvironment()
279 return ErrnoError() << "Failed to rmdir " << kApexMountForTest; in SetUpApexTestEnvironment()
284 if (mkdir(kApexMountForTest, 0755) != 0) { in SetUpApexTestEnvironment()
285 return ErrnoError() << "Failed to mkdir " << kApexMountForTest; in SetUpApexTestEnvironment()
288 if (mount("tmpfs", kApexMountForTest, "tmpfs", 0, nullptr) == -1) { in SetUpApexTestEnvironment()
289 return ErrnoError() << "Failed to mount " << kApexMountForTest; in SetUpApexTestEnvironment()
293 if (mount(kApexMountForTest, "/apex", nullptr, MS_BIND, nullptr) == -1) { in SetUpApexTestEnvironment()
294 return ErrnoError() << "Failed to bind mount " << kApexMountForTest in SetUpApexTestEnvironment()