summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/dev.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/dev.cc')
-rw-r--r--test/syscalls/linux/dev.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/syscalls/linux/dev.cc b/test/syscalls/linux/dev.cc
index 7b1dd14ef..7f0a2ec45 100644
--- a/test/syscalls/linux/dev.cc
+++ b/test/syscalls/linux/dev.cc
@@ -148,6 +148,10 @@ TEST(DevTest, WriteDevFull) {
TEST(DevTest, TTYExists) {
struct stat statbuf = {};
ASSERT_THAT(stat("/dev/tty", &statbuf), SyscallSucceeds());
+ // Check that it's a character device with rw-rw-rw- permissions.
+ EXPECT_EQ(statbuf.st_mode, S_IFCHR | 0666);
+ // Check that it's owned by root.
+ EXPECT_EQ(statbuf.st_uid, 0);
}
} // namespace