summaryrefslogtreecommitdiff
path: root/tests/sys_stat_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys_stat_test.cpp')
-rw-r--r--tests/sys_stat_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/sys_stat_test.cpp b/tests/sys_stat_test.cpp
index 71591c0c2..f36007e1c 100644
--- a/tests/sys_stat_test.cpp
+++ b/tests/sys_stat_test.cpp
@@ -109,7 +109,6 @@ TEST(sys_stat, statx) {
int rc = statx(AT_FDCWD, "/proc/version", AT_STATX_SYNC_AS_STAT, STATX_ALL, &sx);
if (rc == -1 && errno == ENOSYS) {
GTEST_SKIP() << "statx returned ENOSYS";
- return;
}
ASSERT_EQ(0, rc);
struct stat64 sb;
@@ -121,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);