Hello, With 0.17.4 (with or without the latest patch in GIT to fix the testsuite on bigendian) make check fails on armel: https://buildd.debian.org/status/fetch.php?pkg=p11-kit&arch=armel&ver=0.17.4-2&stamp=1364342856 ------------------------- make[4]: Entering directory `/build/buildd-p11-kit_0.17.4-2-armel-CHXLi6/p11-kit-0.17.4/tools/tests' ..........FF.F There were 3 failures: 1) test_directory_files: test-save.c:353: Unexpected file in directory: file.txt 2) test_directory_dups: test-save.c:429: Unexpected file in directory: with-num.0 3) test_directory_overwrite: test-save.c:522: Couldn't find file in directory: blah.cer !!!FAILURES!!! Runs: 14 Passes: 11 Fails: 3 FAIL: test-save ............... OK (15 tests) PASS: test-extract ...F. There was 1 failure: 1) test_directory: test-x509.c:223: Unexpected file in directory: Cacert3_Here.1.cer !!!FAILURES!!! Runs: 5 Passes: 4 Fails: 1 FAIL: test-x509 ...F. There was 1 failure: 1) test_directory: test-pem.c:213: Unexpected file in directory: Cacert3_Here.1.pem !!!FAILURES!!! Runs: 5 Passes: 4 Fails: 1 FAIL: test-pem ...........F. There was 1 failure: 1) test_directory: test-openssl.c:612: Unexpected file in directory: Custom_Label.1.pem !!!FAILURES!!! Runs: 13 Passes: 12 Fails: 1 FAIL: test-openssl ============================================================================ make[4]: *** [check-TESTS] Error 1 make[3]: *** [check-am] Error 2 make[2]: *** [check-recursive] Error 14 of 5 tests failed ------------------------- This is reproducible. cu andreas
It looks like varargs are working in an unexpected manner. Since I do not have access to the ARM system in question, I need help debugging this. In the test test_check_directory_files() function is called by the test_check_directory() macro at the line in question: 1) test_directory_files: test-save.c:353: Unexpected file in directory: file.txt Could you put a breakpoint in test_check_directory(). The loop should find all of the following variable arguments: "blah.cer", "file.txt" and "link.ext" If it's not iterating through those values as varargs, then we need to figure out why. I can't see anything non-standard being done in this code.
Created attachment 77110 [details] [review] Don't try to simulate variadic macro arguments
Shot in the dark. Does the attached patch fix the issue?
(In reply to comment #3) > Shot in the dark. Does the attached patch fix the issue? No change, sorry.
(In reply to comment #1) > It looks like varargs are working in an unexpected manner. Since I do not > have access to the ARM system in question, I need help debugging this. > > In the test test_check_directory_files() function is called by the > test_check_directory() macro at the line in question: > > 1) test_directory_files: test-save.c:353: Unexpected file in directory: > file.txt > > Could you put a breakpoint in test_check_directory(). The loop should find > all of the following variable arguments: "blah.cer", "file.txt" and > "link.ext" > > If it's not iterating through those values as varargs, then we need to > figure out why. I can't see anything non-standard being done in this code. Hello, I have used poor man's gdb, printf: ---------------------------------- --- p11-kit-0.17.4.orig/tools/tests/test.c +++ p11-kit-0.17.4/tools/tests/test.c @@ -160,6 +160,7 @@ test_check_directory_files (const char * va_start (va, file); while (file != NULL) { + printf("DEBUG [%s]\n", file); if (!p11_dict_set (files, (void *)file, (void *)file)) return_val_if_reached (NULL); file = va_arg (va, const char *); ---------------------------------- Output looks the same as on i386 (except for the failure report at the end): --------------------------------------------------------- (sid)ametzler@agricola:~/P11/p11-kit-0.17.4/tools/tests$ ./test-save DEBUG [blah.cer] DEBUG [file.txt] DEBUG [link.ext] DEBUG [file.txt] DEBUG [file.1.txt] DEBUG [file.2.txt] DEBUG [no-ext] DEBUG [no-ext.1] DEBUG [with-num.0] DEBUG [with-num.1] DEBUG [link.0] DEBUG [link.1] DEBUG [blah.cer] DEBUG [file.txt] DEBUG [file.1.txt] ..........FF.F There were 3 failures: 1) test_directory_files: test-save.c:353: Unexpected file in directory: file.txt 2) test_directory_dups: test-save.c:429: Unexpected file in directory: file.txt 3) test_directory_overwrite: test-save.c:522: Couldn't find file in directory: blah.cer !!!FAILURES!!! Runs: 14 Passes: 11 Fails: 3 --------------------------------------------------------- cu andreas
(In reply to comment #5) > I have used poor man's gdb, printf: > ---------------------------------- > --- p11-kit-0.17.4.orig/tools/tests/test.c > +++ p11-kit-0.17.4/tools/tests/test.c > @@ -160,6 +160,7 @@ test_check_directory_files (const char * > va_start (va, file); Could you add another debug statement here? --> > while (file != NULL) { > + printf("DEBUG [%s]\n", file); > if (!p11_dict_set (files, (void *)file, (void *)file)) > return_val_if_reached (NULL); > file = va_arg (va, const char *); > ---------------------------------- Thanks.
(In reply to comment #6) [...] > Could you add another debug statement here? --> [...] ---------------------------------- --- tools/tests/test.c.orig 2013-03-19 18:14:16.000000000 +0000 +++ tools/tests/test.c 2013-03-27 18:33:16.000000000 +0000 @@ -159,7 +159,9 @@ test_check_directory_files (const char * va_start (va, file); + printf("DEBUG_A [%s]\n", file); while (file != NULL) { + printf("DEBUG_B [%s]\n", file); if (!p11_dict_set (files, (void *)file, (void *)file)) return_val_if_reached (NULL); file = va_arg (va, const char *); ---------------------------------- --------------- (sid)ametzler@agricola:~/P11/p11-kit-0.17.4/tools/tests$ ./test-save DEBUG_A [(null)] DEBUG_A [blah.cer] DEBUG_B [blah.cer] DEBUG_B [file.txt] DEBUG_B [link.ext] DEBUG_A [file.txt] DEBUG_B [file.txt] DEBUG_B [file.1.txt] DEBUG_B [file.2.txt] DEBUG_B [no-ext] DEBUG_B [no-ext.1] DEBUG_B [with-num.0] DEBUG_B [with-num.1] DEBUG_B [link.0] DEBUG_B [link.1] DEBUG_A [blah.cer] DEBUG_B [blah.cer] DEBUG_B [file.txt] DEBUG_B [file.1.txt] ..........FF.F There were 3 failures: 1) test_directory_files: test-save.c:353: Unexpected file in directory: file.txt 2) test_directory_dups: test-save.c:429: Unexpected file in directory: file.txt 3) test_directory_overwrite: test-save.c:522: Couldn't find file in directory: blah.cer !!!FAILURES!!! Runs: 14 Passes: 11 Fails: 3 ---------------
Cannot reproduce on debian running on qemu-system-armel. Could you either produce a patch which fixes this, or send me a VM image (qemu or other) which exhibits this problem? user@debian-armel:~/p11-kit$ uname -a Linux debian-armel 2.6.32-5-versatile #1 Wed Jan 12 23:05:11 UTC 2011 armv5tejl GNU/Linux user@debian-armel:~/p11-kit$ tools/tests/test-save .............. OK (14 tests) user@debian-armel:~/p11-kit$ git log | head -n 6 commit 3f74a3b32ce42cc7e38bdbf8349f976000c3af4c Author: Stef Walter <stefw@gnome.org> Date: Wed Mar 20 16:27:20 2013 +0100 Release 0.17.4
Hello, FWIW I have run git bisect for this, the commit which triggers the issue is this one: ----------------- From f45942a4fc3e1c5219e9b5201b82203337ee7280 Mon Sep 17 00:00:00 2001 From: Stef Walter <stefw@gnome.org> Date: Wed, 20 Mar 2013 09:33:04 +0100 Subject: [PATCH] hash: Add the murmur2 hash and start using it Add implementation of the murmur2 hash function, and start using it for our dictionaries. Our implementation is incremental like our other hash functions. Also remove p11_oid_hash() which wasn't being used. In addition fix several tests whose success was based on the way that the dictionary hashed. This was a hidden testing bug. ----------------- cu andreas
*** Bug 62820 has been marked as a duplicate of this bug. ***
Created attachment 77321 [details] [review] Update to MurmurHash3
Does the attached patch fix the issue? It removes non-aligned reads.
Attachment 77321 [details] pushed as 032fbd8 - Update to MurmurHash3
(In reply to comment #12) > Does the attached patch fix the issue? It removes non-aligned reads. Yes, attachment 77321 [details] [review] (Update to MurmurHash3) fixed both the testsuite error on armel and the bus error on sparc. Thank you.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.