Fix EINTR handling in XmlRpcDispatch::work#2278
Conversation
|
So what would the function do when EINTR is returned? It would continue to the next part and...? Isn't returning from |
If EINTR is returned, it would continue, ignore the "process events" block as there is no event, and re-do a poll if there the deadline is not passed. If we return (the current behavior), the caller would have to handle this case. Right now, |
peci1
left a comment
There was a problem hiding this comment.
Right, according to Linux poll() documentation, EINTR should only be returned when no events happened, so revents should be empty. In that case, the whole "process events" block will probably be a no-op. However, it was actually pretty difficult to figure this out.
I wonder if it weren't easier for code maintainability if there was an explicit continue in case of EINTR, with a comment that the poll() has to be tried again. The only possible issue I see is that in such case the timeout and clear checks on the end of the loop would be skipped. Another option would be to skip just the "process events" for loop in case poll was interrupted. Or just add a comment explaining what is going to happen.
I also checked the Windows part, but there doesn't seem to be anything similar on Windows. WSAPoll() can only be interrupted by a call to a deprecated API function. So it is probably correct that this PR leaves the Windows part as is.
| if(errno != EINTR) | ||
| { | ||
| XmlRpcUtil::error("Error in XmlRpcDispatch::work: error in poll (%d).", nEvents); | ||
| _inWork = false; |
There was a problem hiding this comment.
Also, timeout_ms has to be recomputed from _end_time and getTime(). There is probably a larger problem here with timeout_ms, as the current implementation calls all poll()s with timeout_ms regardless of how much time has elapsed from the beginning of the call. Maybe the recomputation of timeout_ms should be moved right before the poll() call.
|
I agree that a |
That should be sufficient. |
peci1
left a comment
There was a problem hiding this comment.
Thanks for the update!
LGTM.
* Fix EINTR handling in XmlRpcDispatch::work * Document the XmlRpcDispatch::work behavior we receiving EINTR
* Fix EINTR handling in XmlRpcDispatch::work * Document the XmlRpcDispatch::work behavior we receiving EINTR (cherry picked from commit 3337133)
* Fix memory leak in rosgraph for kernel < 4.16 and Python 3 (ros#2165) (cherry picked from commit c7c5bcb) * Fix ros#2123: Do not raise exception if socket is busy in TCPROSTransport (ros#2131) Make behavior consistent with the C++ implementation. Co-authored-by: 229143434@qq.com <zxcvbnm123-*@> (cherry picked from commit b3f8e3c) * [xmlrpcpp] Fix build when gtest is not available (ros#2177) When gtest is not available, the target test_socket is not created by catkin_add_gtest (it provides a warning that gtest was not found and does not add the test). Trying to set the target properties then leads to a configuration error. Making this block conditional on the existence of the target fixes the configuration error. (cherry picked from commit 98545f8) * Do not set self.transport unless persistent in ServiceProxy (ros#2171) Co-authored-by: Kevin Chang <kevin.chang@aeolusdev.com> (cherry picked from commit c977e1e) * Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169) * clients/roscpp/include/ros: publisher.h: Fix warning related to Boost bind placeholders declared in global namespace. This commit fixes the following: Warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> * clients/roscpp/include/ros: node_handle.h: Fix warning related to Boost bind placeholders declared in global namespace. This commit fixes the following: Warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> (cherry picked from commit 3294299) * [rospy] add current_real docstring in timer.py (ros#2178) * add current_reald doc in timer.py * fix docstring in timer.py Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org> (cherry picked from commit 11ebadc) * Noetic: Fix XMLRPC endless loop (ros#2185) * Fix oversize string test. It claims to be "well-formed", but the closing tag was wrong. Fix that here. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add defensive checks for offset being NULL. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add unit tests for XML tag utility functions. This includes parseTag, findTag, nextTagIs, and getNextTag. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add implementation of nextTagData. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Switch structFromXml to using nextTagData. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> (cherry picked from commit 41a956c) * Revert "Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)" (ros#2187) This reverts commit 3294299. (cherry picked from commit b9bd85d) * keep the persistent connection only if rosmaster supports http1.1 (ros#2208) * keep the persistent connection only if rosmaster supports http1.1 Signed-off-by: Chen Lihui <lihui.chen@sony.com> * Revert "keep the persistent connection only if rosmaster supports http1.1" This reverts commit 2cb7602. Signed-off-by: Chen Lihui <lihui.chen@sony.com> * fix without breaking ABI Signed-off-by: Chen Lihui <lihui.chen@sony.com> * Update comment Co-authored-by: Jacob Perron <jacob@openrobotics.org> * Fix $(dirname) resolution in include tags (ros#2173) * roslaunch: Extend $(dirname) test * roslaunch include: Resolve substitution args w.r.t. parent's context to ensure that $(dirname) resolves to parent's dir * Correct missed boost::placeholders::_7 (ros#2242) * Add a workaround for a race condition while closing the socket (ros#2212) (ros#2233) Co-authored-by: Daniele Calisi <calisi@magazino.eu> * rosbag reindex bugfix - seek to truncated position after broken chunk (ros#2286) The truncate operation left the current `f.tell()` read head at the pre-truncated position, so the chunk infos that are written on closing the file started writing at this pre-truncated position, leaving dangling broken chunk data in between the last good chunk and the first file-end chunkinfo. Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> * Set TCP_NODELAY. (ros#2293) (cherry picked from commit f03fd33) * Add missing include (ros#2248) (cherry picked from commit 5edee4e) * Move @jacobperron from maintainer to author (ros#2302) Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit 99a1ce0) * Fix determining supported kernel version for HTTP 1.1 (ros#2202) Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> (cherry picked from commit 047716c) * --noarr and --nostr option in rosservice call (ros#2307) (cherry picked from commit 1a1564e) * [topic_tools/mux] add wait_publisher_initialization option in mux (ros#2305) * [topic_tools] add wait_publisher_initialization option in mux * add wait_publisher_second param (cherry picked from commit 13dc820) * Fix error "s is not defined" (reopening ros#2320 again) (ros#2328) * Fix error "s is not defined" (reopening Refs ros#2320 again) * Update clients/rospy/src/rospy/topics.py with suggestion Co-authored-by: Martin Pecka <peci1@seznam.cz> --------- Co-authored-by: Martin Pecka <peci1@seznam.cz> (cherry picked from commit 030e132) * Added init_options::NoSimTime to forcefully disable subscribing to /clock (ros#2342) * Added init_options::NoSimTime to forcefully disable subscribing to /clock. * Fix enum value * Added test for init_options::NoSimTime * Fixed test (cherry picked from commit b1ef2ee) * Fixed ROSCONSOLE_FORMAT with microseconds (ros#2370) (cherry picked from commit aef16f0) * Fixed uninitialized Time usage in rosservice call (ros#2369) (cherry picked from commit de95e28) * [windows] Remove python2 specific hack (ros#2364) This PR ros#1872 made windows act differently than linux because of a specific python 2 delay doing unnecessary DNS checks for localhost. The underlying code in python is different for python3 so the hack is no longer necessary. Given that, its better to reunify the codebase (cherry picked from commit cf0f276) * Fix segfault with default-constructed rosbag::ChunkedFile::swap (ros#2363) Closes ros#2362. (cherry picked from commit 3ad1409) * Fix rostest target names when build dir is inside source dir (ros#2361) It's a common approach to build cmake projects in a `build` folder in the project root. It's just that `rosbuild`/`catkin` does not do it, so the changed name never mattered. When you try the target name includes another `build_` string and there is *exactly one* package in the whole ecosystem that relies on this not happening: https://github.com/ros/ros_comm/blob/845f74602c7464e08ef5ac6fd9e26c97d0fe42c9/test/test_rosbag/bag_migration_tests/CMakeLists.txt#L87-L103 (cherry picked from commit 336b29a) * apply patch to fix build with boost 1.83.0 (ros#2354) (cherry picked from commit 0b0076d) * Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 (ros#2348) * Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 Since boost 1.73, i.e. on Ubuntu 22.04, the old header issues a deprecation warning: ``` /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ ``` While the new header <boost/bind/bind.hpp> is available for a long time (on 18.04 already) and the source has been updated to use boost::placeholders in ros#2023, the header was not yet updated. * For backwards compatibility: pull placeholders into global namespace (cherry picked from commit 076ea3f) * add --min-space option to the python cli of rosbag record (ros#2298) (cherry picked from commit 1b1e7da) * Fix EINTR handling in XmlRpcDispatch::work (ros#2278) * Fix EINTR handling in XmlRpcDispatch::work * Document the XmlRpcDispatch::work behavior we receiving EINTR (cherry picked from commit 3337133) * Expose is_shutdown_requested in rospy namespace. (ros#2267) Just like the C++ `ros::isShuttingDown()`, this can be useful in certain cases where shutdown needs to be checked before all shutdown handlers finished. The difference to `is_shutdown()` is already clearly described in the docstring of `is_shutdown_requested()`. (cherry picked from commit c27175c) * rosnode: allow rosrun & roslaunch to find script (ros#2262) By installing the script in the "package bin destination" as well as letting setup.py install it in the global 'bin' directory. This is similar to what rosservice et al., which do work with roslaunch and rosrun. Signed-off-by: gavanderhoorn <g.a.vanderhoorn@tudelft.nl> (cherry picked from commit 31ddca1) * rosbag_main.py: fix calling uncallable signal handler object (ros#2235) (ros#2236) Co-authored-by: Yannik Nager <yannik@sunflower-labs.com> (cherry picked from commit ce22d1c) * Fix printing XmlRpcValue with GTest (ros#2224) * Fix printing XmlRpcValue with GTest * Added tests for XmlRpc::PrintTo() * Make PrintTo inline (cherry picked from commit 13e4bd0) * check if ignore_unset_args is set in xmlloader (ros#2217) (cherry picked from commit 8917094) * Address DeprecationWarning (ros#2191) (cherry picked from commit d7ddd80) * fix typo t_start -> self.t_start (ros#2183) fix typo local t_start is not defined here, need to use self.t_start (cherry picked from commit eb8bb69) * Exposed record snapshot feature for command line. (ros#2254) (cherry picked from commit ecbb123) * rostest: add subscribetest (ros#2184) * rostest: add subscribetest This PR adds `subscribetest` node to check if the specified topics are subscribed. The usage is almost the same as `publishtest`: ``` <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3"> <rosparam> topics: - name: /chatter timeout: 2. - name: /subscribed_topic timeout: 2. negative: true </rosparam> </test> ``` * install nodes/subscribetest (cherry picked from commit 5067f44) --------- Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> Co-authored-by: Alexis Schad <a@mandelbro.com> Co-authored-by: 金梦磊 <229143434@qq.com> Co-authored-by: Wolfgang Merkt <wxmerkt@users.noreply.github.com> Co-authored-by: Kevin Chang <kevinshchang@gmail.com> Co-authored-by: Elvis Dowson <elvis.dowson@gmail.com> Co-authored-by: Shingo Kitagawa <knorth55@users.noreply.github.com> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Lucas Walter <wsacul@gmail.com> Co-authored-by: madmage <daniele.calisi@gmail.com> Co-authored-by: Daniele Calisi <calisi@magazino.eu> Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Co-authored-by: Rik Baehnemann <brik@ethz.ch> Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de> Co-authored-by: Shane Loretz <sloretz@osrfoundation.org> Co-authored-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: vineet131 <vineet131@users.noreply.github.com> Co-authored-by: Griffin Tabor <tabor473@gmail.com> Co-authored-by: Hugal31 <hugo.laloge@gmail.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: daizhirui <daizhirui@hotmail.com> Co-authored-by: Zijun Xu <30411902+Jeffxzj@users.noreply.github.com> Co-authored-by: Michael Grupp <grupp@magazino.eu> Co-authored-by: G.A. vd. Hoorn <g.a.vanderhoorn@tudelft.nl> Co-authored-by: Yannik Nager <yannik.nager@gmail.com> Co-authored-by: Guglielmo Gemignani <2789215+g-gemignani@users.noreply.github.com> Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp> Co-authored-by: Blake Anderson <blakeanderson@utexas.edu>
* Run tests in Jenkins * removed manual jenkinsfile * Sync with upstream (#44) * Fix memory leak in rosgraph for kernel < 4.16 and Python 3 (ros#2165) (cherry picked from commit c7c5bcb) * Fix ros#2123: Do not raise exception if socket is busy in TCPROSTransport (ros#2131) Make behavior consistent with the C++ implementation. Co-authored-by: 229143434@qq.com <zxcvbnm123-*@> (cherry picked from commit b3f8e3c) * [xmlrpcpp] Fix build when gtest is not available (ros#2177) When gtest is not available, the target test_socket is not created by catkin_add_gtest (it provides a warning that gtest was not found and does not add the test). Trying to set the target properties then leads to a configuration error. Making this block conditional on the existence of the target fixes the configuration error. (cherry picked from commit 98545f8) * Do not set self.transport unless persistent in ServiceProxy (ros#2171) Co-authored-by: Kevin Chang <kevin.chang@aeolusdev.com> (cherry picked from commit c977e1e) * Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169) * clients/roscpp/include/ros: publisher.h: Fix warning related to Boost bind placeholders declared in global namespace. This commit fixes the following: Warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> * clients/roscpp/include/ros: node_handle.h: Fix warning related to Boost bind placeholders declared in global namespace. This commit fixes the following: Warning: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> (cherry picked from commit 3294299) * [rospy] add current_real docstring in timer.py (ros#2178) * add current_reald doc in timer.py * fix docstring in timer.py Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org> (cherry picked from commit 11ebadc) * Noetic: Fix XMLRPC endless loop (ros#2185) * Fix oversize string test. It claims to be "well-formed", but the closing tag was wrong. Fix that here. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add defensive checks for offset being NULL. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add unit tests for XML tag utility functions. This includes parseTag, findTag, nextTagIs, and getNextTag. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add implementation of nextTagData. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Switch structFromXml to using nextTagData. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> (cherry picked from commit 41a956c) * Revert "Fix warning related to Boost bind placeholders declared in global namespace. (ros#2169)" (ros#2187) This reverts commit 3294299. (cherry picked from commit b9bd85d) * keep the persistent connection only if rosmaster supports http1.1 (ros#2208) * keep the persistent connection only if rosmaster supports http1.1 Signed-off-by: Chen Lihui <lihui.chen@sony.com> * Revert "keep the persistent connection only if rosmaster supports http1.1" This reverts commit 2cb7602. Signed-off-by: Chen Lihui <lihui.chen@sony.com> * fix without breaking ABI Signed-off-by: Chen Lihui <lihui.chen@sony.com> * Update comment Co-authored-by: Jacob Perron <jacob@openrobotics.org> * Fix $(dirname) resolution in include tags (ros#2173) * roslaunch: Extend $(dirname) test * roslaunch include: Resolve substitution args w.r.t. parent's context to ensure that $(dirname) resolves to parent's dir * Correct missed boost::placeholders::_7 (ros#2242) * Add a workaround for a race condition while closing the socket (ros#2212) (ros#2233) Co-authored-by: Daniele Calisi <calisi@magazino.eu> * rosbag reindex bugfix - seek to truncated position after broken chunk (ros#2286) The truncate operation left the current `f.tell()` read head at the pre-truncated position, so the chunk infos that are written on closing the file started writing at this pre-truncated position, leaving dangling broken chunk data in between the last good chunk and the first file-end chunkinfo. Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> * Set TCP_NODELAY. (ros#2293) (cherry picked from commit f03fd33) * Add missing include (ros#2248) (cherry picked from commit 5edee4e) * Move @jacobperron from maintainer to author (ros#2302) Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> Signed-off-by: Shane Loretz <sloretz@osrfoundation.org> (cherry picked from commit 99a1ce0) * Fix determining supported kernel version for HTTP 1.1 (ros#2202) Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz> (cherry picked from commit 047716c) * --noarr and --nostr option in rosservice call (ros#2307) (cherry picked from commit 1a1564e) * [topic_tools/mux] add wait_publisher_initialization option in mux (ros#2305) * [topic_tools] add wait_publisher_initialization option in mux * add wait_publisher_second param (cherry picked from commit 13dc820) * Fix error "s is not defined" (reopening ros#2320 again) (ros#2328) * Fix error "s is not defined" (reopening Refs ros#2320 again) * Update clients/rospy/src/rospy/topics.py with suggestion Co-authored-by: Martin Pecka <peci1@seznam.cz> --------- Co-authored-by: Martin Pecka <peci1@seznam.cz> (cherry picked from commit 030e132) * Added init_options::NoSimTime to forcefully disable subscribing to /clock (ros#2342) * Added init_options::NoSimTime to forcefully disable subscribing to /clock. * Fix enum value * Added test for init_options::NoSimTime * Fixed test (cherry picked from commit b1ef2ee) * Fixed ROSCONSOLE_FORMAT with microseconds (ros#2370) (cherry picked from commit aef16f0) * Fixed uninitialized Time usage in rosservice call (ros#2369) (cherry picked from commit de95e28) * [windows] Remove python2 specific hack (ros#2364) This PR ros#1872 made windows act differently than linux because of a specific python 2 delay doing unnecessary DNS checks for localhost. The underlying code in python is different for python3 so the hack is no longer necessary. Given that, its better to reunify the codebase (cherry picked from commit cf0f276) * Fix segfault with default-constructed rosbag::ChunkedFile::swap (ros#2363) Closes ros#2362. (cherry picked from commit 3ad1409) * Fix rostest target names when build dir is inside source dir (ros#2361) It's a common approach to build cmake projects in a `build` folder in the project root. It's just that `rosbuild`/`catkin` does not do it, so the changed name never mattered. When you try the target name includes another `build_` string and there is *exactly one* package in the whole ecosystem that relies on this not happening: https://github.com/ros/ros_comm/blob/845f74602c7464e08ef5ac6fd9e26c97d0fe42c9/test/test_rosbag/bag_migration_tests/CMakeLists.txt#L87-L103 (cherry picked from commit 336b29a) * apply patch to fix build with boost 1.83.0 (ros#2354) (cherry picked from commit 0b0076d) * Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 (ros#2348) * Update: #include <boost/bind.hpp> -> <boost/bind/bind.hpp> for boost 1.73 Since boost 1.73, i.e. on Ubuntu 22.04, the old header issues a deprecation warning: ``` /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ ``` While the new header <boost/bind/bind.hpp> is available for a long time (on 18.04 already) and the source has been updated to use boost::placeholders in ros#2023, the header was not yet updated. * For backwards compatibility: pull placeholders into global namespace (cherry picked from commit 076ea3f) * add --min-space option to the python cli of rosbag record (ros#2298) (cherry picked from commit 1b1e7da) * Fix EINTR handling in XmlRpcDispatch::work (ros#2278) * Fix EINTR handling in XmlRpcDispatch::work * Document the XmlRpcDispatch::work behavior we receiving EINTR (cherry picked from commit 3337133) * Expose is_shutdown_requested in rospy namespace. (ros#2267) Just like the C++ `ros::isShuttingDown()`, this can be useful in certain cases where shutdown needs to be checked before all shutdown handlers finished. The difference to `is_shutdown()` is already clearly described in the docstring of `is_shutdown_requested()`. (cherry picked from commit c27175c) * rosnode: allow rosrun & roslaunch to find script (ros#2262) By installing the script in the "package bin destination" as well as letting setup.py install it in the global 'bin' directory. This is similar to what rosservice et al., which do work with roslaunch and rosrun. Signed-off-by: gavanderhoorn <g.a.vanderhoorn@tudelft.nl> (cherry picked from commit 31ddca1) * rosbag_main.py: fix calling uncallable signal handler object (ros#2235) (ros#2236) Co-authored-by: Yannik Nager <yannik@sunflower-labs.com> (cherry picked from commit ce22d1c) * Fix printing XmlRpcValue with GTest (ros#2224) * Fix printing XmlRpcValue with GTest * Added tests for XmlRpc::PrintTo() * Make PrintTo inline (cherry picked from commit 13e4bd0) * check if ignore_unset_args is set in xmlloader (ros#2217) (cherry picked from commit 8917094) * Address DeprecationWarning (ros#2191) (cherry picked from commit d7ddd80) * fix typo t_start -> self.t_start (ros#2183) fix typo local t_start is not defined here, need to use self.t_start (cherry picked from commit eb8bb69) * Exposed record snapshot feature for command line. (ros#2254) (cherry picked from commit ecbb123) * rostest: add subscribetest (ros#2184) * rostest: add subscribetest This PR adds `subscribetest` node to check if the specified topics are subscribed. The usage is almost the same as `publishtest`: ``` <test test-name="subscribetest_test" pkg="rostest" type="subscribetest" time-limit="7.0" retry="3"> <rosparam> topics: - name: /chatter timeout: 2. - name: /subscribed_topic timeout: 2. negative: true </rosparam> </test> ``` * install nodes/subscribetest (cherry picked from commit 5067f44) --------- Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> Co-authored-by: Alexis Schad <a@mandelbro.com> Co-authored-by: 金梦磊 <229143434@qq.com> Co-authored-by: Wolfgang Merkt <wxmerkt@users.noreply.github.com> Co-authored-by: Kevin Chang <kevinshchang@gmail.com> Co-authored-by: Elvis Dowson <elvis.dowson@gmail.com> Co-authored-by: Shingo Kitagawa <knorth55@users.noreply.github.com> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Lucas Walter <wsacul@gmail.com> Co-authored-by: madmage <daniele.calisi@gmail.com> Co-authored-by: Daniele Calisi <calisi@magazino.eu> Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Co-authored-by: Rik Baehnemann <brik@ethz.ch> Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de> Co-authored-by: Shane Loretz <sloretz@osrfoundation.org> Co-authored-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: vineet131 <vineet131@users.noreply.github.com> Co-authored-by: Griffin Tabor <tabor473@gmail.com> Co-authored-by: Hugal31 <hugo.laloge@gmail.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: daizhirui <daizhirui@hotmail.com> Co-authored-by: Zijun Xu <30411902+Jeffxzj@users.noreply.github.com> Co-authored-by: Michael Grupp <grupp@magazino.eu> Co-authored-by: G.A. vd. Hoorn <g.a.vanderhoorn@tudelft.nl> Co-authored-by: Yannik Nager <yannik.nager@gmail.com> Co-authored-by: Guglielmo Gemignani <2789215+g-gemignani@users.noreply.github.com> Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp> Co-authored-by: Blake Anderson <blakeanderson@utexas.edu> --------- Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com> Co-authored-by: Alexis Schad <a@mandelbro.com> Co-authored-by: 金梦磊 <229143434@qq.com> Co-authored-by: Wolfgang Merkt <wxmerkt@users.noreply.github.com> Co-authored-by: Kevin Chang <kevinshchang@gmail.com> Co-authored-by: Elvis Dowson <elvis.dowson@gmail.com> Co-authored-by: Shingo Kitagawa <knorth55@users.noreply.github.com> Co-authored-by: Chris Lalancette <clalancette@openrobotics.org> Co-authored-by: Jacob Perron <jacob@openrobotics.org> Co-authored-by: Chen Lihui <lihui.chen@sony.com> Co-authored-by: Robert Haschke <rhaschke@users.noreply.github.com> Co-authored-by: Lucas Walter <wsacul@gmail.com> Co-authored-by: madmage <daniele.calisi@gmail.com> Co-authored-by: Daniele Calisi <calisi@magazino.eu> Co-authored-by: Emerson Knapp <537409+emersonknapp@users.noreply.github.com> Co-authored-by: Rik Baehnemann <brik@ethz.ch> Co-authored-by: Jochen Sprickerhof <git@jochen.sprickerhof.de> Co-authored-by: Shane Loretz <sloretz@osrfoundation.org> Co-authored-by: Martin Pecka <peckama2@fel.cvut.cz> Co-authored-by: vineet131 <vineet131@users.noreply.github.com> Co-authored-by: Griffin Tabor <tabor473@gmail.com> Co-authored-by: Hugal31 <hugo.laloge@gmail.com> Co-authored-by: Michael Görner <me@v4hn.de> Co-authored-by: daizhirui <daizhirui@hotmail.com> Co-authored-by: Zijun Xu <30411902+Jeffxzj@users.noreply.github.com> Co-authored-by: Michael Grupp <grupp@magazino.eu> Co-authored-by: G.A. vd. Hoorn <g.a.vanderhoorn@tudelft.nl> Co-authored-by: Yannik Nager <yannik.nager@gmail.com> Co-authored-by: Guglielmo Gemignani <2789215+g-gemignani@users.noreply.github.com> Co-authored-by: Kei Okada <k-okada@jsk.t.u-tokyo.ac.jp> Co-authored-by: Blake Anderson <blakeanderson@utexas.edu>
* Fix EINTR handling in XmlRpcDispatch::work * Document the XmlRpcDispatch::work behavior we receiving EINTR (cherry picked from commit 3337133)
Only leave XmlRpcDispatchwork if the
pollerror is not EINTR.The EINTR check should probably be at every I/O syscalls, but I think this
pollcall is the only one supposed to block.Closes #2275