[glib] tests/mappedfile: Also handle ENOMEM
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests/mappedfile: Also handle ENOMEM
- Date: Thu, 2 May 2013 18:04:52 +0000 (UTC)
commit f61daa6ed275f1794a6552d3343e313d1d243933
Author: Colin Walters <walters verbum org>
Date: Thu May 2 11:39:11 2013 -0400
tests/mappedfile: Also handle ENOMEM
The RHEL6.4 kernel gives me that instead of EINVAL.
https://bugzilla.gnome.org/show_bug.cgi?id=699485
glib/tests/mappedfile.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
index 8d5258d..ac25fc2 100644
--- a/glib/tests/mappedfile.c
+++ b/glib/tests/mappedfile.c
@@ -50,7 +50,8 @@ test_device (void)
GMappedFile *file;
file = g_mapped_file_new ("/dev/null", FALSE, &error);
- g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL);
+ g_assert (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) ||
+ 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]