Project

General

Profile

Bug #478

test_chuck failures on powerpc

Added by Jonathan Davies over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Category:
testing
Target version:
Start date:
02.01.2014
Due date:
Estimated time:
Affected version:
dr|rc|master
Resolution:
Fixed

Description

The chuck test suite for 5.1.2~dr2 fails with following on Ubuntu trusty:

  Running suite 'chunk':
    Running case 'equals': +
    Running case 'chunk_compare': +++++++++++
    Running case 'clear': +
    Running case 'chunk_length': +
    Running case 'chunk_create_cat': +
    Running case 'chunk_split': +
    Running case 'chunk_skip': ++
    Running case 'chunk_increment': ++++++++
    Running case 'chunk_printable': +++++++++++++++
    Running case 'baseXX': +++
    Running case 'chunk_mac': -
      Failure in 'test_chunk_mac': memeq(&out, sip_vectors[i], 8): test vector failed for 0 bytes (suites/test_chunk.c:696, i = 0)
    Running case 'chunk_hash': +
    Running case 'chunk_hash_static': -
      Failure in 'test_chunk_hash_static': memeq(&out, sip_vectors[i], 4): test vector failed for 0 bytes (suites/test_chunk.c:743, i = 0)
    Running case 'printf_hook': ++++++++++++
  Passed 12/14 'chunk' test cases

Full log can be found here: https://launchpadlibrarian.net/161458607/buildlog_ubuntu-trusty-powerpc.strongswan_5.1.2~dr2-0ubuntu1_FAILEDTOBUILD.txt.gz

Associated revisions

Revision d62a6ec3 (diff)
Added by Tobias Brunner over 6 years ago

chunk: Fix chunk_mac/hash tests on big-endian systems

Our SipHash-2-4 implementation returns the result in host order, while
the test vectors are little-endian. Use a custom comparison function to
account for this.

Fixes #478.

History

#1 Updated by Tobias Brunner over 6 years ago

  • Category set to testing
  • Status changed from New to Resolved
  • Assignee set to Tobias Brunner
  • Resolution set to Fixed

The test vectors for chunk_mac() are in little-endian, while the function returns the result in host-order. Since the byte order of the result doesn't matter for practical purposes, and avoiding the byte swap is even a performance improvement, I simply fixed the test cases to account for this.

Fixed with the associated commit.

#2 Updated by Tobias Brunner over 6 years ago

  • Tracker changed from Issue to Bug
  • Target version set to 5.1.2

#3 Updated by Tobias Brunner over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF