diff options
author | Elliott Hughes <enh@google.com> | 2021-03-08 14:10:46 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-03-08 14:10:46 -0800 |
commit | db6223f46ef8a5bf0493aef31a2226384a1cfae7 (patch) | |
tree | 0a06a3d466d21ed2f7bf77c695a8ecb1e8a3100f /tests/sys_stat_test.cpp | |
parent | 1ef8d418be8e4630125c599b0af5c1ec96a512d3 (diff) |
Improve fchmod() coverage.
Test: treehugger
Change-Id: I8ebccce7ab3c0a77cd84d0830f75e9d68c64bd52
Diffstat (limited to 'tests/sys_stat_test.cpp')
-rw-r--r-- | tests/sys_stat_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/sys_stat_test.cpp b/tests/sys_stat_test.cpp index 8f1437b1b..f36007e1c 100644 --- a/tests/sys_stat_test.cpp +++ b/tests/sys_stat_test.cpp @@ -120,6 +120,11 @@ TEST(sys_stat, statx) { #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); |