From 5c20fd3bbd30b0a9ecb32995b98cf194dc9600d7 Mon Sep 17 00:00:00 2001 From: Chong Cai Date: Wed, 14 Jul 2021 17:43:50 -0700 Subject: Add verity symlink tests PiperOrigin-RevId: 384823097 --- test/util/verity_util.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/util/verity_util.h') diff --git a/test/util/verity_util.h b/test/util/verity_util.h index 18743ecd6..44863f322 100644 --- a/test/util/verity_util.h +++ b/test/util/verity_util.h @@ -17,6 +17,8 @@ #include +#include + #include "test/util/posix_error.h" namespace gvisor { @@ -44,6 +46,13 @@ struct fsverity_digest { unsigned char digest[]; }; +struct EnableTarget { + std::string path; + int flags; + + EnableTarget(std::string path, int flags) : path(path), flags(flags) {} +}; + constexpr int kMaxDigestSize = 64; constexpr int kDefaultDigestSize = 32; constexpr char kContents[] = "foobarbaz"; @@ -67,7 +76,8 @@ PosixError FlipRandomBit(int fd, int size); // Mount a verity on the tmpfs and enable both the file and the direcotry. Then // mount a new verity with measured root hash. PosixErrorOr MountVerity(std::string tmpfs_dir, - std::string filename); + std::string filename, + std::vector targets); } // namespace testing } // namespace gvisor -- cgit v1.2.3