diff options
author | Ting-Yu Wang <anivia@google.com> | 2020-02-21 15:41:56 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-21 15:42:56 -0800 |
commit | b8f56c79be40d9c75f4e2f279c9d821d1c1c3569 (patch) | |
tree | 219c962fd22141b5aced942272662c51faa86109 /test/syscalls/linux/dev.cc | |
parent | 10aa4d3b343255db45f5ca4ff7b51f21a309e10b (diff) |
Implement tap/tun device in vfs.
PiperOrigin-RevId: 296526279
Diffstat (limited to 'test/syscalls/linux/dev.cc')
-rw-r--r-- | test/syscalls/linux/dev.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/syscalls/linux/dev.cc b/test/syscalls/linux/dev.cc index 4dd302eed..4e473268c 100644 --- a/test/syscalls/linux/dev.cc +++ b/test/syscalls/linux/dev.cc @@ -153,6 +153,13 @@ TEST(DevTest, TTYExists) { EXPECT_EQ(statbuf.st_mode, S_IFCHR | 0666); } +TEST(DevTest, NetTunExists) { + struct stat statbuf = {}; + ASSERT_THAT(stat("/dev/net/tun", &statbuf), SyscallSucceeds()); + // Check that it's a character device with rw-rw-rw- permissions. + EXPECT_EQ(statbuf.st_mode, S_IFCHR | 0666); +} + } // namespace } // namespace testing |