[syslog-ng] Rpmbuild syslog-ng-3.2.4-1.el6: FAIL: test_nvtable (EPEL5)

Jose Pedro Oliveira jpo at di.uminho.pt
Mon Jun 20 19:07:59 CEST 2011


On 2011-06-20 14:55, Balazs Scheidler wrote:
> On Sun, 2011-06-19 at 02:27 -0400, JP Vossen wrote:
>> On 06/17/2011 11:19 PM, JP Vossen wrote:
>>> On 06/17/2011 10:45 PM, Jose Pedro Oliveira wrote:
>>>> On 2011-06-17 22:30, JP Vossen wrote:
> 
>> ...
>>>>> 	[...]
>>>>> 	Assertion strcmp(name, dyn_name) == 0 failed at line 69
>>>>> 	FAIL: test_nvtable
>>>>> 	[...]
>>> ...
>>>
>>>> I still haven't found the time to look into the test failure (low
>>>> priority item in my todo list) but maybe someone from Balabit could ;)
>>>
>>> So that's a known issue that is not a problem?  RHEL5 only, or 6 too?
>>> If 6, how does the rpm even build with that spec file?
>>
>> I got it to build on both archs, but I'm not sure I trust it because I 
>> had to comment out 3 parts of test_nvtable.c with the following patch:
>>
>> ----- cut here -----
>> diff -ruN syslog-ng-3.2.4/tests/unit/test_nvtable.c 
>> syslog-ng-3.2.4.jp/tests/unit/test_nvtable.c
>> --- syslog-ng-3.2.4/tests/unit/test_nvtable.c   2010-07-14 
>> 03:47:35.000000000 -0400
>> +++ syslog-ng-3.2.4.jp/tests/unit/test_nvtable.c        2011-06-19 
>> 01:46:08.000000000 -0400
>> @@ -66,7 +66,7 @@
>>             prev_handle = handle;
>>           }
>>         name = nv_registry_get_handle_name(reg, handle, &len);
>> -      TEST_ASSERT(strcmp(name, dyn_name) == 0);
>> +//      TEST_ASSERT(strcmp(name, dyn_name) == 0);
>>         TEST_ASSERT(strlen(name) == len);
>>
>>         g_snprintf(dyn_name, sizeof(dyn_name), "ALIAS%05d", i);
> 
> Can you please print the values "name" and "dyn_name" at the failed
> assertion? Those should really be the same.
> 

Changing the test to print the variable values:
----------
$ diff -u ./tests/unit/test_nvtable.c.orig
./tests/unit/test_nvtable.c--- ./tests/unit/test_nvtable.c.orig
2010-07-14 08:47:35.000000000 +0100
+++ ./tests/unit/test_nvtable.c	2011-06-20 17:56:28.000000000 +0100
@@ -66,6 +66,8 @@
           prev_handle = handle;
         }
       name = nv_registry_get_handle_name(reg, handle, &len);
+      fprintf(stderr, "name=<%s> dyn_name=<%s>\n", name, dyn_name);
+      fflush(stderr);
       TEST_ASSERT(strcmp(name, dyn_name) == 0);
       TEST_ASSERT(strlen(name) == len);

----------

produces:

----------
...
name=<DYN00004> dyn_name=<DYN00004>
name=<DYN00005> dyn_name=<DYN00005>
name=<DYN00006> dyn_name=<DYN00006>
name=<DYN00007> dyn_name=<DYN00007>
name=<DYN00008> dyn_name=<DYN00008>
name=<DYN00009> dyn_name=<DYN00009>
name=<DYN00010> dyn_name=<DYN00010>
name=<DYN00011> dyn_name=<DYN00011>
name=<DYN00012> dyn_name=<DYN00012>
name=<DYN00004> dyn_name=<DYN00013>
Assertion strcmp(name, dyn_name) == 0 failed at line 71
...
----------


> I can't reproduce it, it runs just fine.

Only fails in EPEL5 (RHEL 5.x / CentOS 5.x );
doesn't fail in EPEL6 or in Fedora 13 (or newer)

> 
> (perhaps, a step through the nv_register_get_handle_name function with
> the relevant variables should help).

/jpo
-- 
José Pedro Oliveira
* mailto:jpo at di.uminho.pt *


More information about the syslog-ng mailing list