Opened 7 years ago

Closed 7 years ago

#2479 closed defect (fixed)

perfdhcp tests fail when using a build directory (and hence make distcheck fails)

Reported by: jelte Owned by: marcin
Priority: medium Milestone: Sprint-DHCP-20121213
Component: dhcp Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

This isn't caught by the buildbots since these tests are skipped on a lot of systems, but when running from a separate build directory I get the following error:

[ RUN      ] TestControlTest.Packet4Exchange
Running: perfdhcp -l lo -r 100 -n 10 -R 20 -L 10547 127.0.0.1
Running: perfdhcp -l lo -r 100 -R 20 -n 20 -D 10% -L 10547 -T ../templates/discover-example.hex -T ../templates/request4-example.hex 127.0.0.1
unknown file: Failure
C++ exception with description "unable to open template file ../templates/discover-example.hex" thrown in the test body.
[  FAILED  ] TestControlTest.Packet4Exchange (1 ms)
[ RUN      ] TestControlTest.Packet6Exchange
Running: perfdhcp -l lo -6 -r 100 -n 10 -R 20 -L 10547 ::1
Running: perfdhcp -l lo -6 -r 100 -n 10 -R 20 -D 3 -L 10547 -T ../templates/solicit-example.hex -T ../templates/request6-example.hex ::1
unknown file: Failure
C++ exception with description "unable to open template file ../templates/solicit-example.hex" thrown in the test body.
[  FAILED  ] TestControlTest.Packet6Exchange (2 ms)

Those files aren't at '../', they are in the source tree, so those paths should be based on some build-time values (probably derived from ${srcdir} or ${top_srcdir}).
(there's 4 of them).

This makes distcheck of the current master fail. So unless this is fixed before the release I propose we completely disable these tests.

Oh and Jeremy notes that these files are actually installed which shouldn't be necessary.

Subtickets

Change History (8)

comment:1 Changed 7 years ago by stephen

  • Milestone changed from New Tasks to DHCP 2012

comment:2 Changed 7 years ago by jelte

I've temporarily disabled these (commit d561219a0e93d046cdb63166fa775dc20c563d9e), please re-enable them when this gets fixed :)

comment:3 Changed 7 years ago by stephen

  • Milestone changed from DHCP Outstanding Tasks to Sprint-DHCP-20121213

comment:4 Changed 7 years ago by marcin

  • Owner set to marcin
  • Status changed from new to accepted

comment:5 Changed 7 years ago by marcin

  • Owner changed from marcin to UnAssigned
  • Status changed from accepted to reviewing

The ticket is now ready for review. The template files have been moved to perfdhcp/tests/testdata - this is consistent with other modules where extra files required by unit tests are kept in testdata folder. The unit tests are now use absolute path to files located in testdata folder.

The second issue mentioned in the ticket (template files being installed) had been already resolved by Jeremy and the fix is on master.

comment:6 Changed 7 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:7 Changed 7 years ago by stephen

  • Owner changed from stephen to marcin

Looks OK, please merge.

comment:8 Changed 7 years ago by marcin

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged with commit 4e8325e1b309f1d388a3055ec1e1df98c377f383.

Note: See TracTickets for help on using tickets.