[glib] mappedfile test: permit ENODEV on /dev/null



commit 4af9b8e9cb43cbcb1f889b74b85111325aab57ba
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Feb 23 00:47:29 2014 -0500

    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

 glib/tests/mappedfile.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
index 99c26c9..ccaea34 100644
--- a/glib/tests/mappedfile.c
+++ b/glib/tests/mappedfile.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]