|
|
d5ce1b |
From 9f9a3ded23cc2bb917468939b745cc498cec523a Mon Sep 17 00:00:00 2001
|
|
|
d5ce1b |
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
|
|
|
d5ce1b |
Date: Wed, 1 Aug 2018 17:48:10 +0200
|
|
|
d5ce1b |
Subject: [PATCH] validators_ut_check: Fix fail with new glibc
|
|
|
d5ce1b |
|
|
|
d5ce1b |
Error message was slightly change from previous version
|
|
|
d5ce1b |
of glibc which caused fails in validators unit tests.
|
|
|
d5ce1b |
|
|
|
d5ce1b |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
d5ce1b |
---
|
|
|
d5ce1b |
ini/ini_validators_ut_check.c | 13 +++++++++++--
|
|
|
d5ce1b |
1 file changed, 11 insertions(+), 2 deletions(-)
|
|
|
d5ce1b |
|
|
|
d5ce1b |
diff --git a/ini/ini_validators_ut_check.c b/ini/ini_validators_ut_check.c
|
|
|
d5ce1b |
index 9ecde75..3af8551 100644
|
|
|
d5ce1b |
--- a/ini/ini_validators_ut_check.c
|
|
|
d5ce1b |
+++ b/ini/ini_validators_ut_check.c
|
|
|
d5ce1b |
@@ -602,6 +602,8 @@ START_TEST(test_ini_allowed_options_wrong_regex)
|
|
|
d5ce1b |
fail_unless(ret == 0, "Got msg: [%s]", errmsg);
|
|
|
d5ce1b |
ini_errobj_next(errobj);
|
|
|
d5ce1b |
|
|
|
d5ce1b |
+ /* Different versions of libc produce slightly different error strings
|
|
|
d5ce1b |
+ * in this case. For simplicity compare against all of them. */
|
|
|
d5ce1b |
errmsg = ini_errobj_get_msg(errobj);
|
|
|
d5ce1b |
ret = strcmp(errmsg,
|
|
|
d5ce1b |
"[rule/options_for_foo]: Cannot compile regular expression "
|
|
|
d5ce1b |
@@ -609,10 +611,17 @@ START_TEST(test_ini_allowed_options_wrong_regex)
|
|
|
d5ce1b |
"Error: 'Unmatched [ or [^'");
|
|
|
d5ce1b |
if (ret != 0) {
|
|
|
d5ce1b |
ret = strcmp(errmsg,
|
|
|
d5ce1b |
- "[rule/options_for_foo]: Cannot compile regular expression "
|
|
|
d5ce1b |
- "from option 'section_re'. "
|
|
|
d5ce1b |
+ "[rule/options_for_foo]: Cannot compile regular "
|
|
|
d5ce1b |
+ "expression from option 'section_re'. "
|
|
|
d5ce1b |
"Error: 'brackets ([ ]) not balanced'");
|
|
|
d5ce1b |
}
|
|
|
d5ce1b |
+
|
|
|
d5ce1b |
+ if (ret != 0) {
|
|
|
d5ce1b |
+ ret = strcmp(errmsg,
|
|
|
d5ce1b |
+ "[rule/options_for_foo]: Cannot compile regular "
|
|
|
d5ce1b |
+ "expression from option 'section_re'. "
|
|
|
d5ce1b |
+ "Error: 'Unmatched [, [^, [:, [., or [='");
|
|
|
d5ce1b |
+ }
|
|
|
d5ce1b |
fail_unless(ret == 0, "Got msg: [%s]", errmsg);
|
|
|
d5ce1b |
ini_errobj_next(errobj);
|
|
|
d5ce1b |
|
|
|
d5ce1b |
--
|
|
|
d5ce1b |
2.9.5
|
|
|
d5ce1b |
|