summaryrefslogtreecommitdiff
path: root/tests/test-libglnx-fdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-libglnx-fdio.c')
-rw-r--r--tests/test-libglnx-fdio.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test-libglnx-fdio.c b/tests/test-libglnx-fdio.c
index bf973b9..350294c 100644
--- a/tests/test-libglnx-fdio.c
+++ b/tests/test-libglnx-fdio.c
@@ -161,6 +161,16 @@ test_fstatat (void)
return;
g_assert_cmpint (errno, ==, ENOENT);
g_assert_no_error (local_error);
+
+ /* test NULL parameter for stat */
+ if (!glnx_fstatat_allow_noent (AT_FDCWD, ".", NULL, 0, error))
+ return;
+ g_assert_cmpint (errno, ==, 0);
+ g_assert_no_error (local_error);
+ if (!glnx_fstatat_allow_noent (AT_FDCWD, "nosuchfile", NULL, 0, error))
+ return;
+ g_assert_cmpint (errno, ==, ENOENT);
+ g_assert_no_error (local_error);
}
static void