diff options
author | Chong Cai <chongc@google.com> | 2021-07-23 14:33:27 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-07-23 14:35:42 -0700 |
commit | d2479383639ab15301c4535a91cbbbeb22635a7e (patch) | |
tree | fecfead59cfc796d71d2c78ead824d381908342b /test/syscalls/linux/verity_mmap.cc | |
parent | 3d0a9300050ad9a72d452ec862827e35e3f38dcc (diff) |
Add verity open benchmark test
PiperOrigin-RevId: 386533065
Diffstat (limited to 'test/syscalls/linux/verity_mmap.cc')
-rw-r--r-- | test/syscalls/linux/verity_mmap.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/syscalls/linux/verity_mmap.cc b/test/syscalls/linux/verity_mmap.cc index 09ced6eb3..2bfd43b16 100644 --- a/test/syscalls/linux/verity_mmap.cc +++ b/test/syscalls/linux/verity_mmap.cc @@ -58,7 +58,7 @@ class MmapTest : public ::testing::Test { TEST_F(MmapTest, MmapRead) { std::string verity_dir = ASSERT_NO_ERRNO_AND_VALUE( - MountVerity(tmpfs_dir_.path(), filename_, /*targets=*/{})); + MountVerity(tmpfs_dir_.path(), {EnableTarget(filename_, O_RDONLY)})); // Make sure the file can be open and mmapped in the mounted verity fs. auto const verity_fd = ASSERT_NO_ERRNO_AND_VALUE( @@ -72,7 +72,7 @@ TEST_F(MmapTest, MmapRead) { TEST_F(MmapTest, ModifiedBeforeMmap) { std::string verity_dir = ASSERT_NO_ERRNO_AND_VALUE( - MountVerity(tmpfs_dir_.path(), filename_, /*targets=*/{})); + MountVerity(tmpfs_dir_.path(), {EnableTarget(filename_, O_RDONLY)})); // Modify the file and check verification failure upon mmapping. auto const fd = ASSERT_NO_ERRNO_AND_VALUE( @@ -91,7 +91,7 @@ TEST_F(MmapTest, ModifiedBeforeMmap) { TEST_F(MmapTest, ModifiedAfterMmap) { std::string verity_dir = ASSERT_NO_ERRNO_AND_VALUE( - MountVerity(tmpfs_dir_.path(), filename_, /*targets=*/{})); + MountVerity(tmpfs_dir_.path(), {EnableTarget(filename_, O_RDONLY)})); auto const verity_fd = ASSERT_NO_ERRNO_AND_VALUE( Open(JoinPath(verity_dir, filename_), O_RDONLY, 0777)); @@ -127,7 +127,7 @@ INSTANTIATE_TEST_SUITE_P( TEST_P(MmapParamTest, Mmap) { std::string verity_dir = ASSERT_NO_ERRNO_AND_VALUE( - MountVerity(tmpfs_dir_.path(), filename_, /*targets=*/{})); + MountVerity(tmpfs_dir_.path(), {EnableTarget(filename_, O_RDONLY)})); // Make sure the file can be open and mmapped in the mounted verity fs. auto const verity_fd = ASSERT_NO_ERRNO_AND_VALUE( |