gfs2-utils: RHEL7 - gfs2-utils tests: Fix unit tests for RHEL7

Andrew Price andyp at fedoraproject.org
Mon Sep 8 17:35:01 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=9142cd526adfb9739b92419fc1faa0b4730e936d
Commit:        9142cd526adfb9739b92419fc1faa0b4730e936d
Parent:        e0e4c93b80f36fc40a5d631a14615162f27f3371
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Mon Sep 8 10:18:11 2014 +0100
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Mon Sep 8 11:34:01 2014 +0100

gfs2-utils tests: Fix unit tests for RHEL7

Older versions of check-devel do not have ck_assert_ptr_ne nor
ck_assert_uint_eq so provide macros to map them to fail_unless calls.

Resolves: rhbz#1112342

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 tests/check_rgrp.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/check_rgrp.c b/tests/check_rgrp.c
index e5fca8d..36dffe4 100644
--- a/tests/check_rgrp.c
+++ b/tests/check_rgrp.c
@@ -5,6 +5,10 @@
 // TODO: Remove this when the extern is removed from libgfs2
 void print_it(const char *label, const char *fmt, const char *fmt2, ...) {}
 
+/* Older check-devel doesn't have these functions */
+#define ck_assert_ptr_ne(ptr, val) fail_unless(ptr != val)
+#define ck_assert_uint_eq(u1, u2) fail_unless(u1 == u2)
+
 static lgfs2_rgrps_t mockup_rgrp(void)
 {
 	struct gfs2_sbd *sdp;


More information about the cluster-commits mailing list