You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by Namrata Bhave <nb...@us.ibm.com> on 2017/03/31 09:32:58 UTC
Debugging test_GPHD_HA_load_nodes
Hi,
While further debugging the GPHD_HA_load_nodes tests mentioned below , I
observed that the error is appearing due to "size" not getting correctly
set in file "
https://github.com/apache/incubator-hawq/blob/master/src/backend/access/external/test/ha_config_mock.c
" in hdfsGetHANamenodes function.
Below is the code snippet where I had printed the size and found it to be
0 for above tests instead of 1 for test_GPHD_HA_load_nodes_OneNN and 2 for
other tests..
Namenode * hdfsGetHANamenodes(const char *nameservice, int *size)
{
optional_assignment(size);
// printed the value of *size here and it always shows zero!
return (Namenode *)mock();
}
The 'optional_assignment' is added from cmockery.h/.c files.
Anyone has faced such issue before? Any pointers would be helpful.
I could see code related to memory assignment in cmockery files.However,
couldn't find anywhere whether cmockery is platform specific or doesn't
support big endian/s390x.
Regards,
Namrata Bhave
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi,
I am working on building and testing HAWQ on s390x platform.
I am facing below error while executing make unittest-check in
src/backend/access/external:
[ RUN ] test_GPHD_HA_load_nodes_UnknownNameservice
[ OK ] test_GPHD_HA_load_nodes_UnknownNameservice
[ RUN ] test_GPHD_HA_load_nodes_OneNN
No entries for symbol hdfsFreeNamenodeInformation.
ERROR: ha_config_mock.c:38 - Could not get value to mock function
hdfsFreeNamenodeInformation Previously returned mock value was declared at
ha_config_test.c:93 [ FAILED ] test_GPHD_HA_load_nodes_OneNN
[ RUN ] test_GPHD_HA_load_nodes_RpcDelimMissing
No entries for symbol hdfsFreeNamenodeInformation.
ERROR: ha_config_mock.c:38 - Could not get value to mock function
hdfsFreeNamenodeInformation Previously returned mock value was declared at
ha_config_test.c:127 [ FAILED ] test_GPHD_HA_load_nodes_RpcDelimMissing
[ RUN ] test_GPHD_HA_load_nodes_PxfServicePortIsAssigned
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:163
ha_config_test.c:168
port_to_str() has remaining non-assigned out-values.
Remaining item(s) declared at...
port:0
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:164
ha_config_test.c:169
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:165
ha_config_test.c:170
[ FAILED ] test_GPHD_HA_load_nodes_PxfServicePortIsAssigned
[ RUN ] test_GPHD_HA_load_nodes_HostMissing
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:197
ha_config_test.c:202
port_to_str() has remaining non-assigned out-values.
Remaining item(s) declared at...
port:0
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:198
ha_config_test.c:203
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:199
ha_config_test.c:204
[ FAILED ] test_GPHD_HA_load_nodes_HostMissing
[ RUN ] test_GPHD_HA_load_nodes_PortMissing
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:238
ha_config_test.c:242
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:239
ha_config_test.c:243
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:240
ha_config_test.c:244
[ FAILED ] test_GPHD_HA_load_nodes_PortMissing
[ RUN ] test_GPHD_HA_load_nodes_PortIsInvalidNumber
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:277
ha_config_test.c:282
port_to_str() has remaining non-assigned out-values.
Remaining item(s) declared at...
port:0
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:278
ha_config_test.c:283
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:279
ha_config_test.c:284
[ FAILED ] test_GPHD_HA_load_nodes_PortIsInvalidNumber
[ RUN ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeOne
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:318
ha_config_test.c:323
port_to_str() has remaining non-assigned out-values.
Remaining item(s) declared at...
port:0
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:319
ha_config_test.c:324
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:320
ha_config_test.c:325
[ FAILED ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeOne
[ RUN ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeTwo
port_to_str() has remaining non-returned values.
Remaining item(s) declared at...
ha_config_test.c:358
ha_config_test.c:363
port_to_str() has remaining non-assigned out-values.
Remaining item(s) declared at...
port:0
port_to_str. port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:359
ha_config_test.c:364
new_port parameter still has values that haven't been checked.
Remaining item(s) declared at...
ha_config_test.c:360
ha_config_test.c:365
[ FAILED ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeTwo
[=============] 9 tests ran
[ PASSED ] 1 tests
[ FAILED ] 8 tests, listed below
[ FAILED ] test_GPHD_HA_load_nodes_OneNN [ FAILED ]
test_GPHD_HA_load_nodes_RpcDelimMissing
[ FAILED ] test_GPHD_HA_load_nodes_PxfServicePortIsAssigned
[ FAILED ] test_GPHD_HA_load_nodes_HostMissing
[ FAILED ] test_GPHD_HA_load_nodes_PortMissing
[ FAILED ] test_GPHD_HA_load_nodes_PortIsInvalidNumber
[ FAILED ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeOne
[ FAILED ] test_GPHD_HA_load_nodes_PortIsNotNumber_TakeTwo
make[1]: *** [ha_config-check] Error 8
While debugging test_GPHD_HA_load_nodes_OneNN, it was observed that, in
ha_config_mock.c:hdfsGetHANamenodes, the *size / len variable is 0 on
s390x instead of 1.
Could someone please provide some pointers in resolving the same? Is the
code dependent on machine endianness(s390x is big endian while Intel x86
is big endian.) ?
Regards,
Namrata Bhave