Couchdb-couch_set_view-19-compaction-retry test failure for s390x


#1

I am trying to build Couchbase server on s390x architecture (RHEL7/SLES12). After successful build, when I ran the test cases, “couchdb-couch_set_view-19-compaction-retry” test case failed for s390x.

I made following change in the code to make it pass:

bash-4.2# diff ./couchstore/src/views/bin/couch_view_file_merger.c_ORIG ./couchstore/src/views/bin/couch_view_file_merger.c
38,39c38,39
< } merge_file_type_t;
<
.—
.> };
.> typedef unsigned char merge_file_type_t;

The “if (fscanf(stdin, “%c\n”, (char *)&view_file_type) != 1)” statement gets wrong input character if we don’t do this change. The C and C++ standards allows the character type char to be signed or unsigned, depending on the platform and compiler. For s390x, the type of char is unsigned. This variation causes getting junk characters for s390x. The code change will make the type consistent across all platforms.


#2

Thanks - I have been in touch with Cindy. We can communicate through JIRA here as well on some of these issues. If you can pass me your email, I can send you an invite for our JIRA tracking system.
thanks
-cihan


#3

Thanks for the invitation Cihan. My email id is shahidhs.ibm@gmail.com


#4

great - you should have an invite to make signup easy to our tracking system.
thanks