commit | f1c614a88c2a81713f32da9a434a0c77feb1cde1 | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Tue Mar 13 14:07:36 2018 +1030 |
committer | Andrew Geissler <geissonator@yahoo.com> | Tue Mar 20 07:03:00 2018 +0000 |
tree | ca1588f3ed5989ab400ba2d2d2d64f29ccbfbcb8 | |
parent | a153ee321df77235495a850c3dc1f7fc493a345f [diff] |
build-unit-test-docker.sh: Install iproute2 for `ip` utility `ip` is required by phosphor-networkd, which `execl`s out to delete vlan interfaces. Without iproute2 installed we get spurious test failures: [----------] 3 tests from TestVlanInterface [ RUN ] TestVlanInterface.createVLAN [ OK ] TestVlanInterface.createVLAN (4 ms) [ RUN ] TestVlanInterface.deleteVLAN [ OK ] TestVlanInterface.deleteVLAN (4 ms) [ RUN ] TestVlanInterface.createMultipleVLAN [ OK ] TestVlanInterface.createMultipleVLAN (8 ms) [----------] 3 tests from TestVlanInterface (16 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30075 ms total) [ PASSED ] 26 tests. unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.6j14Sy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (9 ms) [----------] 3 tests from TestVlanInterface (17 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30076 ms total) [ PASSED ] 25 tests. [ FAILED ] 1 test, listed below: [ FAILED ] TestVlanInterface.createMultipleVLAN 1 FAILED TEST unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.6j14Sy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (10 ms) [----------] 3 tests from TestVlanInterface (18 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30078 ms total) [ PASSED ] 25 tests. [ FAILED ] 1 test, listed below: [ FAILED ] TestVlanInterface.createMultipleVLAN 1 FAILED TEST unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.6j14Sy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (11 ms) [----------] 3 tests from TestVlanInterface (19 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30078 ms total) [ PASSED ] 25 tests. [ FAILED ] 1 test, listed below: [ FAILED ] TestVlanInterface.createMultipleVLAN 1 FAILED TEST unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.I5nIok]" thrown in TearDown(). [ FAILED ] TestVlanInterface.deleteVLAN (16 ms) [ RUN ] TestVlanInterface.createMultipleVLAN [ OK ] TestVlanInterface.createMultipleVLAN (6 ms) [----------] 3 tests from TestVlanInterface (26 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30085 ms total) [ PASSED ] 25 tests. [ FAILED ] 1 test, listed below: [ FAILED ] TestVlanInterface.deleteVLAN 1 FAILED TEST unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.fhR6Uy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (7 ms) [----------] 3 tests from TestVlanInterface (27 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30086 ms total) [ PASSED ] 24 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] TestVlanInterface.deleteVLAN [ FAILED ] TestVlanInterface.createMultipleVLAN 2 FAILED TESTS unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.fhR6Uy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (8 ms) [----------] 3 tests from TestVlanInterface (28 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30087 ms total) [ PASSED ] 24 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] TestVlanInterface.deleteVLAN [ FAILED ] TestVlanInterface.createMultipleVLAN 2 FAILED TESTS unknown file: Failure C++ exception with description "filesystem error: cannot remove all: No such file or directory [/tmp/VlanInterface.fhR6Uy]" thrown in TearDown(). [ FAILED ] TestVlanInterface.createMultipleVLAN (8 ms) [----------] 3 tests from TestVlanInterface (28 ms total) [----------] Global test environment tear-down [==========] 26 tests from 6 test cases ran. (30087 ms total) [ PASSED ] 24 tests. [ FAILED ] 2 tests, listed below: [ FAILED ] TestVlanInterface.deleteVLAN [ FAILED ] TestVlanInterface.createMultipleVLAN 2 FAILED TESTS FAIL test (exit status: 1) Note that the one test run is displaying multiple instances of the global test environment tear-down. There should only ever be one per gtest_main binary. The `execl` invocation fails after we've forked[1], and we throw an InternalFailure exception as a consequence. As the process image is still identical to the parent, we unwind and clean up the test directory via the TestVlanInterface destructor, then exit. The exit triggers the parent to break out of its wait-loop for the child, which throws its own InternalFailure exception. Again we hit the TestVlanInterface destructor, but as confDir has been cloned across both of the processes we try to remove a directory that no-longer exists. The test then exits with the filesystem_error exception. The successful `fork`s combined with failed `execl`s leads to a cascade of cleanup failures and the consequent failure of the test suite. Install `iproute2` so `execl` will succeed. [1] https://github.com/openbmc/phosphor-networkd/blob/master/util.cpp#L369 Tested: Observed phosphor-networkd pass its test suite using test-distro.sh with ubuntu:artful as the base image Change-Id: Ibbe01926c744a931da14542afc372a69d02bc99b Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Build script for CI jobs in Jenkins.