ldb: LANG=tr_TR.UTF-8 make test - fails

Alexander Bokovoy ab at samba.org
Tue Dec 17 16:04:40 UTC 2019


On ti, 17 joulu 2019, Isaac Boukris via samba-technical wrote:
> Hi,
> 
> I'm looking into this bug, which I can reproduce on master:
> https://bugzilla.redhat.com/show_bug.cgi?id=1743531
> 
> In short it looks like running the ldb tests with tr_TR.UTF-8 locale causes
> this failure:
> 
> Running Python test with /usr/bin/python3: tests/python/index.py
> ...F...FF...F......F...FF...F....
> ======================================================================
> FAIL: test_delete_index_multi_valued_truncated_keys
> (__main__.MaxIndexKeyLengthTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "tests/python/index.py", line 999, in
> test_delete_index_multi_valued_truncated_keys
>     b"0123456789abcde1" + b"0123456789abcde1")
>   File "tests/python/index.py", line 98, in checkGuids
>     self.assertEqual(len(res), 1)
> AssertionError: 0 != 1
> 
> Does anyone have a clue how to look further or how the locale impacts
> here ?

Most likely it is GUID versus Guid in Turkish locale:

$ for i in tr_TR en_US ru_RU ; do LC_CTYPE=$i.UTF-8 ~/tmp/strncasecmp Guid GUID ; done
tr_TR.UTF-8: Guid ? GUID = 32
en_US.UTF-8: Guid ? GUID = 0
ru_RU.UTF-8: Guid ? GUID = 0

-- 
/ Alexander Bokovoy
-------------- next part --------------
#include <stdio.h>
#include <strings.h>
#include <string.h>
#include <locale.h>

int main(int argc, const char** argv) {
	char * locale = setlocale(LC_CTYPE, "");
	
	printf("%s: %s ? %s = %d\n", locale, argv[1], argv[2], strncasecmp(argv[1], argv[2], strlen(argv[1])));
	return 0;
}


More information about the samba-technical mailing list