commit | 4b6a29dbe930ef00d4a062b86e0213d37a0d21a2 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Thu Mar 11 19:19:17 2021 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Mar 11 19:19:17 2021 +0000 |
tree | 18f9fdb7b4e41460115f043dd187f7eb363bb4a6 | |
parent | 03e961e392b5d0761eb604ef2d8e9e8387ff40c9 [diff] | |
parent | db6223f46ef8a5bf0493aef31a2226384a1cfae7 [diff] |
Merge "Improve fchmod() coverage."
diff --git a/tests/sys_stat_test.cpp b/tests/sys_stat_test.cpp index 8f1437b..f36007e 100644 --- a/tests/sys_stat_test.cpp +++ b/tests/sys_stat_test.cpp
@@ -120,6 +120,11 @@ #endif } +TEST(sys_stat, fchmod_EBADF) { + ASSERT_EQ(-1, fchmod(-1, 0751)); + ASSERT_EQ(EBADF, errno); +} + TEST(sys_stat, fchmodat_EFAULT_file) { ASSERT_EQ(-1, fchmodat(AT_FDCWD, (char *) 0x1, 0751, 0)); ASSERT_EQ(EFAULT, errno);