Opened 8 years ago

Closed 8 years ago

#1281 closed defect (fixed)

dhcp6 tests made distcheck (with gtest) fail (+ interfaces.txt removal)

Reported by: jinmei Owned by: tomek
Priority: medium Milestone: Sprint-DHCP-20120528
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 (last modified by tomek)

We recently enabled gtest (when possible) in 'make distcheck'.
It failed due to a leftover temporary file (interfaces.txt) created
in dhcp6/tests.

I've developed a quick hack fix (commit d119c31) to that and pushed it
in order to keep the buildbot silent, but we need a cleaner fix.

  • First, maybe we probably don't want to create it directly under the "tests" directory. Our usual convention is to use a separate directory, often named "testdata".
  • Second, though not directly related to this problem, dhcp6's Makefile.am seems to have a full of naive copy-paste. For example, I suspect we don't need this:
    AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_top_srcdir)/src/lib/testutils/testdata\"
    
    LIBRARY_PATH_PLACEHOLDER shouldn't be necessary either - it's only for python scripts.

I tentatively give this ticket to tomek so that it won't be buried.
Feel free to change it to be unassigned, etc.

Update: [tomek] as a general clean-up this ticket also contains interfaces.txt removal.

Subtickets

Change History (9)

comment:1 Changed 8 years ago by shane

  • Milestone changed from New Tasks to DHCP 2011

comment:2 Changed 8 years ago by stephen

  • Milestone changed from DHCP 2012 to Sprint-DHCP-20120305

comment:3 Changed 8 years ago by tomek

  • Status changed from new to accepted

comment:4 Changed 8 years ago by tomek

  • Description modified (diff)
  • Summary changed from dhcp6 tests made distcheck (with gtest) fail to dhcp6 tests made distcheck (with gtest) fail (+ interfaces.txt removal)

Location of interfaces.txt file is somewhat tricky. This mechanism was a stub that was used before interface detection was implemented (now working on Linux). I had a discussion with Stephen and we decided that there is no benefit in trying to make it work on systems that we really don't care about and it just makes our life more difficult (on Linux and other OSes). So we decided to remove support for interfaces.txt.

It is true that makefiles (especially the ones in src/bin/dhcp6) contain many copy-and-paste errors. These were my first contributions to BIND10 project, so I didn't understand what is really needed.

comment:5 Changed 8 years ago by tomek

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

Makefiles cleaned up. Interface detection stub removed. Code tested on Ubuntu 11.10, Mac OS 10.6.8 and NetBSD 5.1. Please review.

comment:6 Changed 8 years ago by stephen

  • Owner changed from UnAssigned to stephen

comment:7 Changed 8 years ago by stephen

  • Owner changed from stephen to tomek

Reviewed commit 4568f3ae526352f65e3785fa46e0589afa36ff85

All OK, please merge.

comment:8 Changed 8 years ago by tomek

Thanks for quick review. Will merge it as soon as I get stable connection. Be it on Monday in Odessa or when I get back home.

comment:9 Changed 8 years ago by tomek

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

Thank you for the review. Code merged, closing ticket.

Note: See TracTickets for help on using tickets.