Merge "Improve fchmod() coverage." am: 4b6a29dbe9

Original change: https://android-review.googlesource.com/c/platform/bionic/+/1623242

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I854427717897936020b97c42d40fbb76b0b50689
This commit is contained in:
Treehugger Robot 2021-03-11 19:49:37 +00:00 committed by Automerger Merge Worker
commit a49b30f03c

View file

@ -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);