On Fri, Jun 03, 2016 at 06:09:26PM -0400, Lance Richardson wrote: > Commit f9b11f2a09b4 introduced a loop to wait for process exit > in OVS_APP_EXIT_AND_WAIT after the "exit" command has been sent. > Unfortunately, this does not work for cases where a unixctl socket > has to be used to send the "exit" command because the process > ID cannot be determined from the socket path. > > OVS_APP_EXIT_AND_WAIT_BY_TARGET has since been introduced to enable > graceful termination of daemons via unixctl sockets. > > This set of changes addresses the problem described above by > making OVS_APP_EXIT_AND_WAIT_BY_TARGET take the unixctl socket > path and corresponding process ID as separate parameters. In order > to better detect issues in this logic in the future, checks have > been added to verify that the pidfile exists before using its > contents. > > Tested on a Linux system. > > Fixes: f9b11f2a09b4 ("tests: Make OVS_APP_EXIT_AND_WAIT() wait for process > termination") > Signed-off-by: Lance Richardson <lrich...@redhat.com>
I get tons of failures similar to the following with this applied: # -*- compilation -*- 1893. ovs-vsctl.at:189: testing add-br a ... ../../tests/ovs-vsctl.at:191: ovsdb-tool create db $abs_top_srcdir/vswitchd/vswitch.ovsschema stderr: stdout: ../../tests/ovs-vsctl.at:191: ovsdb-tool transact db \ '["Open_vSwitch", {"op": "insert", "table": "Open_vSwitch", "row": {}}]' stderr: stdout: [{"uuid":["uuid","621b5c08-edff-4744-a544-997cfc7ff199"]}] ../../tests/ovs-vsctl.at:191: ovsdb-server --detach --no-chdir --pidfile="`pwd`"/pid --remote=punix:socket --unixctl="`pwd`"/unixctl db >/dev/null 2>&1 stderr: stdout: ../../tests/ovs-vsctl.at:192: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket add-br a ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket list-br ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket --oneline -- list-br ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket br-exists a ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket br-exists nonexistent ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket br-to-parent a ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket br-to-vlan a ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket --oneline -- br-to-vlan a ../../tests/ovs-vsctl.at:193: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket --oneline -- br-to-parent a -- br-to-vlan a ../../tests/ovs-vsctl.at:194: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket list-ports a ../../tests/ovs-vsctl.at:194: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket --oneline -- list-ports a ../../tests/ovs-vsctl.at:194: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket port-to-br a ../../tests/ovs-vsctl.at:195: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket list-ifaces a ../../tests/ovs-vsctl.at:195: ovs-vsctl --no-wait -vreconnect:emer --db=unix:socket iface-to-br a ../../tests/ovs-vsctl.at:196: test -e $OVS_RUNDIR/"`pwd`"/unixctl.pid ../../tests/ovs-vsctl.at:196: exit code was 1, expected 0 1893. ovs-vsctl.at:189: 1893. add-br a (ovs-vsctl.at:189): FAILED (ovs-vsctl.at:196) In all, tests 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1931 1932 1933 fail. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev