hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

CryptoAuth_unit_test fails on MIPS32 (big endian) #46

Open dangowrt opened 9 years ago

dangowrt commented 9 years ago
Running test CryptoAuth_unit_test1431715848 DEBUG CryptoAuth.c:437 0x77d98d64 CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431715848 DEBUG CryptoAuth.c:437 0x77d98d64 CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431715848 DEBUG CryptoAuth.c:642 0x77d98d64 CryptoAuth_unit_test.c [unknown]: Received a hello packet, using auth: 0

1391ac5d03ba9f7099bffbb6e6c69d67ae5bd79391a5b94399b293dc
1391ac5d03ba9f7099bffbb6e6c69d67ae5bd79391a5b94399b293dc
1431715848 DEBUG CryptoAuth.c:437 0x77d98d64 CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431715848 DEBUG CryptoAuth.c:437 0x77d98d64 CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending repeat hello packet

Test failed.
Expected 0000000101641c99f7719f5780000000a693a9fd3f0e27e81ab1100b57b372594c2adca8671f1fdd050383c91e7d56ec2336c09739fa8e91d8dc5bec63e8fad074bee22a90642a6ba8555be84c5e35970c5270e8f31f2a5978e0fbdee454288297568f25a3fc2801aa707d954c78eccb970bcc8cb26867e9dbf0c9d6ef1b3f2724e7e550
     Got 0000000101641c99f7719f5780000000a693a9fd3f0e27e81ab1100b57b372590bd0acf201041cc2050383c91e7d56ec2336c09739fa8e91d8dc5bec63e8fad074bee22a90642a6b8ce204a91fee8f6c2cf462b53bf74e4aa1c2b2b44a36b59a667e2a7cc4e2555b5e35e2291b81202708d475f5885d93a2ace902b988c776b5b760b612
Aborted
dangowrt commented 9 years ago

Seems to be endian-related, as on MIPS32 (little endian):

root@OpenWrt:/# test_testcjdroute_c all
...
1431726338 DEBUG CryptoAuth.c:437 0x7752c8c4 CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431726338 DEBUG CryptoAuth.c:437 0x7752c91c CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431726338 DEBUG CryptoAuth.c:642 0x7752c8c4 CryptoAuth_unit_test.c [unknown]: Received a hello packet, using auth: 0

1391ac5d03ba9f7099bffbb6e6c69d67ae5bd79391a5b94399b293dc
1391ac5d03ba9f7099bffbb6e6c69d67ae5bd79391a5b94399b293dc
1431726338 DEBUG CryptoAuth.c:437 0x7752c91c CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending hello packet
1431726338 DEBUG CryptoAuth.c:437 0x7752c91c CryptoAuth_unit_test.c [d95c:ef9a:dbeb:906a:27e6:1757:c3f0:cd34]: Sending repeat hello packet
...
Total test time 2624.857 ms
ghost commented 9 years ago

Nice catch, possibly related: #19

dangowrt commented 9 years ago

It's the repeatHello() test failing here.

viric commented 9 years ago

What is your alignment setting? http://www.linux-mips.org/wiki/Alignment#Transparent_fixing_by_the_kernel

viric commented 9 years ago

Ah I just read the details on big/little endian. Forget my last comment.