Bugzilla – Bug 1232
dot11s regression test sets incorrect NS_TEST_SOURCEDIR via SetDataDir
Last modified: 2011-08-08 12:23:50 UTC
If the Buildbots are failing, it may be because the pcap trace files have changed.
Note that test.py can now be used to generate pcap trace files automatically as follows: ./test.py --update-data Doing that fixed this bug.
Bug closed. ns-3-dev changeset: c11cc91c3a16
I spoke too fast. The pcap files on generated on my machine (and checked in to the repository) don't work on darwin. Here is the test that is still failing on darwin: FAIL: TestSuite devices-mesh-dot11s-regression
The problem appears to be related to the fact that for dot11s, SetDataDir (NS_TEST_SOURCEDIR) is setting the path for "flame" rather than "dot11s". Resulting in picking up the pcap from the wrong location for dot11s tests (In reply to comment #3) > I spoke too fast. > > The pcap files on generated on my machine (and checked in to the repository) > don't work on darwin. > > Here is the test that is still failing on darwin: > > FAIL: TestSuite devices-mesh-dot11s-regression
(In reply to comment #4) > The problem appears to be related to the fact that for dot11s, > SetDataDir (NS_TEST_SOURCEDIR) is setting the path for "flame" rather than > "dot11s". I agree. The current means for setting NS_TEST_SOURCEDIR is a bit fragile and sets it to the directory of the last .cc file found. Here, we have a few sub-directories in src/mesh/test and it just picks the last one which happens to be 'flame'. A few options to try to solve this: 1) do not allow src/*/test subdirectories 2) hardcode SetDataDir() in these tests to point to the right subdirectory, rather than use NS_TEST_SOURCEDIR 3) try to make SetDataDir/NS_TEST_SOURCEDIR to handle multiple test subdirectories and search through them all
(In reply to comment #5) > (In reply to comment #4) > > The problem appears to be related to the fact that for dot11s, > > SetDataDir (NS_TEST_SOURCEDIR) is setting the path for "flame" rather than > > "dot11s". > > I agree. The current means for setting NS_TEST_SOURCEDIR is a bit fragile and > sets it to the directory of the last .cc file found. Here, we have a few > sub-directories in src/mesh/test and it just picks the last one which happens > to be 'flame'. > > A few options to try to solve this: > 1) do not allow src/*/test subdirectories > 2) hardcode SetDataDir() in these tests to point to the right subdirectory, > rather than use NS_TEST_SOURCEDIR > 3) try to make SetDataDir/NS_TEST_SOURCEDIR to handle multiple test > subdirectories and search through them all I just chose option 2 above, and added some documentation about this limitation to the use of NS_TEST_SOURCEDIR. Here is the changeset: http://code.nsnam.org/ns-3-dev/rev/ef4818bb81bc I will close, but if someone feels this solution is inadequate, please reopen and suggest the next steps.