Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19968 closed defect (fixed)

Test fails on Debian experimental reproducible builds

Reported by: cypherpunks Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor: 0.2.9.1-alpha
Severity: Normal Keywords: easy
Cc: Actual Points:
Parent ID: Points:
Reviewer: arma Sponsor:

Description

A recent build on the reproducible build machines with Debian experimental fails on one test.

util/num_cpus: 
  FAIL ../src/test/test_util.c:3689: assert(num OP_LE 16): 18 vs 16
  [num_cpus FAILED]

This test was added in commit 603cb712ef756dd700a52e837bcd643a96311ad6 which expects the maximum number of CPUs to be 16. The compute_num_cpus function only logs a message for machines with more than 16 CPUs but doesn't clamp the return value to 16. So there is a discrepancy between the implementation and the test. (Why is there a limit anyway?)

Furthermore, the preprocessor macro that defines the maximum number of CPUs isn't public and can't be used in tests leading to undefined magic numbers.

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by nickm

Keywords: easy added
Milestone: Tor: 0.2.8.x-final

comment:2 Changed 3 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final
Status: newneeds_review

Taking this fix in 0.2.9, not backporting to 0.2.8. Please see branch bug19968_029 in my public repository.

comment:3 Changed 3 years ago by arma

Status: needs_reviewmerge_ready

Looks good!

comment:4 Changed 3 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged!

comment:5 Changed 3 years ago by arma

Reviewer: arma
Note: See TracTickets for help on using tickets.