)]}'
{"neutron/agent/linux/utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8638952808433376ec1eba244edee96f17b36ec7","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        return []"},{"line_number":326,"context_line":"    with open(\u0027/proc/%s/cmdline\u0027 % pid, \u0027r\u0027) as f:"},{"line_number":327,"context_line":"        cmdline \u003d f.readline()"},{"line_number":328,"context_line":"        cmdline_args \u003d cmdline.split(\u0027\\0\u0027)[:-1]"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # NOTE(slaweq): sometimes it may happen that values in"},{"line_number":331,"context_line":"        # /proc/{pid}/cmdline are separated by space instead of NUL char,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_5b6193d2","line":328,"range":{"start_line":328,"start_character":8,"end_line":328,"end_character":20},"updated":"2019-03-26 22:04:57.000000000","message":"nit: this could have been cmdline since it\u0027s unused after this line","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"de1b248c3a4a0892598c86908ce40d87cd041a83","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        return []"},{"line_number":326,"context_line":"    with open(\u0027/proc/%s/cmdline\u0027 % pid, \u0027r\u0027) as f:"},{"line_number":327,"context_line":"        cmdline \u003d f.readline()"},{"line_number":328,"context_line":"        cmdline_args \u003d cmdline.split(\u0027\\0\u0027)[:-1]"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        # NOTE(slaweq): sometimes it may happen that values in"},{"line_number":331,"context_line":"        # /proc/{pid}/cmdline are separated by space instead of NUL char,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_12b0c5dc","line":328,"range":{"start_line":328,"start_character":8,"end_line":328,"end_character":20},"in_reply_to":"5fc1f717_5b6193d2","updated":"2019-03-27 09:59:04.000000000","message":"Addressed in https://review.openstack.org/648065","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8638952808433376ec1eba244edee96f17b36ec7","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        # list and it would not match to expected cmd so we need to try to"},{"line_number":334,"context_line":"        # split it by spaces"},{"line_number":335,"context_line":"        if len(cmdline_args) \u003d\u003d 1:"},{"line_number":336,"context_line":"            cmdline_args \u003d cmdline_args[0].split(\u0027 \u0027)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        LOG.debug(\"Found cmdline %s for rocess with PID %s.\","},{"line_number":339,"context_line":"                  cmdline_args, pid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_9bde1b6b","line":336,"updated":"2019-03-26 22:04:57.000000000","message":"Does this work correctly if the cmdline is a single argument?  For example I added a test with process_cmd \u003d \"test-binary\" and the returned cmdline was []","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"de1b248c3a4a0892598c86908ce40d87cd041a83","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        # list and it would not match to expected cmd so we need to try to"},{"line_number":334,"context_line":"        # split it by spaces"},{"line_number":335,"context_line":"        if len(cmdline_args) \u003d\u003d 1:"},{"line_number":336,"context_line":"            cmdline_args \u003d cmdline_args[0].split(\u0027 \u0027)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        LOG.debug(\"Found cmdline %s for rocess with PID %s.\","},{"line_number":339,"context_line":"                  cmdline_args, pid)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_72bd89b5","line":336,"in_reply_to":"5fc1f717_9bde1b6b","updated":"2019-03-27 09:59:04.000000000","message":"It will work fine because \u0027\\0\u0027 should be always also at the end of cmdline file. And from my tests it looks that even in cases where arguments were separated by space at end of file there was \u0027\\0\u0027\nBut I added one additional UT to cover that in https://review.openstack.org/648065","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"}],"neutron/tests/unit/agent/linux/test_utils.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8638952808433376ec1eba244edee96f17b36ec7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    def test_cmdline_separated_with_null_char(self):"},{"line_number":316,"context_line":"        process_cmd \u003d \"python3\\0test-binary\\0test option\\0\""},{"line_number":317,"context_line":"        expected_cmdline \u003d [\"python3\", \"test-binary\", \"test option\"]"},{"line_number":318,"context_line":"        self._test_cmdline(process_cmd, expected_cmdline)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def test_cmdline_separated_with_space_char(self):"},{"line_number":321,"context_line":"        process_cmd \u003d \"python3 test-binary test option\\0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_7bdfaf65","line":318,"updated":"2019-03-26 22:04:57.000000000","message":"should be (expected, actual)","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"7812d7599affc000fc5e90885c6cd9e3ae20abc8","unresolved":false,"context_lines":[{"line_number":315,"context_line":"    def test_cmdline_separated_with_null_char(self):"},{"line_number":316,"context_line":"        process_cmd \u003d \"python3\\0test-binary\\0test option\\0\""},{"line_number":317,"context_line":"        expected_cmdline \u003d [\"python3\", \"test-binary\", \"test option\"]"},{"line_number":318,"context_line":"        self._test_cmdline(process_cmd, expected_cmdline)"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def test_cmdline_separated_with_space_char(self):"},{"line_number":321,"context_line":"        process_cmd \u003d \"python3 test-binary test option\\0\""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_db3ee389","line":318,"in_reply_to":"5fc1f717_7bdfaf65","updated":"2019-03-26 22:06:48.000000000","message":"whoops, i can\u0027t read, disregard this one as the callee does the right thing","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8638952808433376ec1eba244edee96f17b36ec7","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    def test_cmdline_separated_with_space_char(self):"},{"line_number":321,"context_line":"        process_cmd \u003d \"python3 test-binary test option\\0\""},{"line_number":322,"context_line":"        expected_cmdline \u003d [\"python3\", \"test-binary\", \"test\", \"option\"]"},{"line_number":323,"context_line":"        self._test_cmdline(process_cmd, expected_cmdline)"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"    def test_no_process_running(self):"},{"line_number":326,"context_line":"        self.process_is_running_mock.return_value \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_1bd46b47","line":323,"updated":"2019-03-26 22:04:57.000000000","message":"same","commit_id":"cf13b2f0cc18fdb1d512ecfe9f2c65ad4bb284dd"}]}
