mappedfile test: permit ENODEV on /dev/null

mmap() on /dev/null returns ENODEV on old Linux versions and also on
Hurd, so accept that in the testcase.

https://bugzilla.gnome.org/show_bug.cgi?id=722360
This commit is contained in:
Ryan Lortie 2014-02-23 00:47:29 -05:00
parent 4825e819b2
commit 4af9b8e9cb

View File

@ -54,6 +54,7 @@ test_device (void)
file = g_mapped_file_new ("/dev/null", FALSE, &error);
g_assert (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) ||
g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NODEV) ||
g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM));
g_assert (file == NULL);
g_error_free (error);