)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"894d542153394e463e30c2279ed4fd534b4f7dba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"c76842c9_e0a0f95a","updated":"2024-02-29 20:07:15.000000000","message":"@jeremie.galarneau@efficios.com I applied the requested changes to the first test and I feel it\u0027s ready for another round of thoughts! When you have a moment 💐","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"c5dd8bc3_5eb4bd52","updated":"2024-03-12 18:52:22.000000000","message":"I only focused on `test_listen_all_triggers` since I understood you\u0027ll base the rest of that general model.\n\nI can confirm the test passes on my machine 😎","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"c697c3906b41c9ca9139e60f6b3f7c3bc51aad11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"8c126c4d_8de4cd5f","updated":"2024-03-07 21:17:34.000000000","message":"Update:\n\n* Add explicit wait until listen is ready to listen","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d1da01946080b89fe4c3bb362477a4a075d5177e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"c1ea240c_0c9ca81d","updated":"2024-03-21 18:47:44.000000000","message":"Update:\n\n* Handle listen launch failure\n* Apply previous reviews to other test cases","commit_id":"aa5f22ce5aeadb62a1d2fbb7f7599e002cf40e74"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"596cfb2c49e40a2edc8e90737f5bb8a491230309","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"15acc54f_4726beb8","updated":"2024-03-21 20:21:56.000000000","message":"Update:\n\n* Fix: Make triggers point to different event rules for two trigger test","commit_id":"22030b3df67af19c221eafe00c0cdf40a5bae38d"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"a573b97c0fbba62c705ebc08e3915b8362950706","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"88bb90c0_9524ed27","updated":"2024-03-27 20:24:35.000000000","message":"Update:\n\n* Explicitly fail the test case when listen fails to launch\n* Say when waiting for a certain number of lines to appear to clarify why a test hangs","commit_id":"0c8561aece177a4ca7ca0063c3e20f88c863d88b"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"f3298d73301018bb2916067444cca33041149845","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"6ef0692a_686911be","updated":"2024-04-02 20:43:15.000000000","message":"Update:\n\n* Rebase on most recent version of master","commit_id":"a0910aa102682ab233565047e0909782eee2cd94"}],"tests/regression/tools/listen/test_listen_cli":[{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"6f44133a8c1847a6090ce9038833dcd1aa114080","unresolved":true,"context_lines":[{"line_number":10,"context_line":"TESTDIR\u003d$CURDIR/../../.."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"# TODO: Add comment that explains what the next line does for shellcheck?"},{"line_number":13,"context_line":"# shellcheck source\u003d../../../utils/utils.sh"},{"line_number":14,"context_line":"source \"$TESTDIR/utils/utils.sh\""},{"line_number":15,"context_line":"TESTAPP_PATH\u003d\"$TESTDIR/utils/testapp\""},{"line_number":16,"context_line":"GEN_UST_EVENTS_TESTAPP_NAME\u003d\"gen-ust-events\""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"4794193c_7d0441d3","line":13,"updated":"2024-01-25 21:49:43.000000000","message":"It allows shellcheck to find `utils.sh` in a path relative to the current file. Otherwise, it would report errors for every use of functions and variables that are defined in that file","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"853f039cc603addefaf3f28bce0846f66c1773e4","unresolved":false,"context_lines":[{"line_number":10,"context_line":"TESTDIR\u003d$CURDIR/../../.."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"# TODO: Add comment that explains what the next line does for shellcheck?"},{"line_number":13,"context_line":"# shellcheck source\u003d../../../utils/utils.sh"},{"line_number":14,"context_line":"source \"$TESTDIR/utils/utils.sh\""},{"line_number":15,"context_line":"TESTAPP_PATH\u003d\"$TESTDIR/utils/testapp\""},{"line_number":16,"context_line":"GEN_UST_EVENTS_TESTAPP_NAME\u003d\"gen-ust-events\""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"ec7763cf_fb9952a9","line":13,"in_reply_to":"4794193c_7d0441d3","updated":"2024-01-31 22:07:24.000000000","message":"Added a comment. Not sure if too hand-holdy.","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"6f44133a8c1847a6090ce9038833dcd1aa114080","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"0ba8e341_512becc5","line":28,"updated":"2024-01-25 21:49:43.000000000","message":"Good idea as it\u0027s not something we want to test for in the context of this test.","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"853f039cc603addefaf3f28bce0846f66c1773e4","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"213c8db6_2a850355","line":28,"in_reply_to":"0ba8e341_512becc5","updated":"2024-01-31 22:07:24.000000000","message":"I was discussing with @kstewart@efficios.com and it was mentioned that including \"subtests\" can really help when trying to figure out the root cause of why a test failed (like having a backtrace). This makes sense to me.\n\nMy main motivation for not testing for the trigger add/remove was that it was really cluttering up the output stream and making it hard for me to understand the test output stream. Instead of not testing the trigger operations, I added \"titles\" to the test blocks and added spaces between the tests. My understanding is that empty lines doesn\u0027t bother TAP consumers so this makes the stream more readable for me while keeping the TAP stream valid.\n\nWhat do you think?","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"586ec120e2dddd41515d586c27b0088868c0bd20","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"54f17bc6_17c93f4d","line":28,"in_reply_to":"213c8db6_2a850355","updated":"2024-02-29 21:31:59.000000000","message":"\u003e I was discussing with Kienan Stewart and it was mentioned that including \"subtests\" can really help when trying to figure out the root cause of why a test failed (like having a backtrace). This makes sense to me.\n\nTypically, even the `notap` versions of the utility functions output the resulting `lttng` invocation as diagnostic output (a line prefixed with `#` that is ignored by the TAP parsers).\n\nMost of them end up calling into [`_run_lttng_cmd`](https://github.com/lttng/lttng-tools/blob/83dc3923fa4b0fc2e0ad091392aea64cac046498/tests/utils/utils.sh#L345\n), which prints the invocation with `diag`.\n\nAt least, that way, you can understand how the test is \"setting up\" before what it _really_ wants to test.\n\nMy impression is that this gives the same information for debugging purposes as using \"real\" test cases.\n\nI personally prefer the tests to have fewer test cases that just focus on what\u0027s intended to be tested, but I don\u0027t have a strong opinion. If you and/or @kstewart@efficios.com feel it\u0027s clearer that way, I\u0027m fine with it.\n\n\u003e I added \"titles\" to the test blocks and added spaces between the tests. My understanding is that empty lines doesn\u0027t bother TAP consumers so this makes the stream more readable for me while keeping the TAP stream valid.\n\u003e\n\u003e What do you think?\n\nWe don\u0027t do it typically, but I agree it makes the output a lot more human friendly, so why not! 🤖👍","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"27a1d1f84810255b6c251dfe322e94b0a3268c35","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"ec7d001c_e0f97dbd","line":28,"in_reply_to":"54f17bc6_17c93f4d","updated":"2024-03-07 17:11:14.000000000","message":"\u003e My impression is that this gives the same information for debugging purposes as using \"real\" test cases.\n\nSo, for example, in this test case you would see the trigger setup failing and why even if it wasn\u0027t \"a test\"? If so, I think it\u0027s sufficient. I think the important thing was to be able to see where and how the test went wrong without needing to modify and rerun the test.\n\n\u003e I personally prefer the tests to have fewer test cases that just focus on what\u0027s intended to be tested\n\nThis was also my initial reflex. @kstewart@efficios.com would the strategy Jérémie is describing meet debugging needs in your opinion?","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"6ab9cc0a703132c0d66c97010f31651bdddbcf15","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"5f6dd440_9bedf8f3","line":28,"in_reply_to":"b21b8134_b2111ee7","updated":"2025-07-10 15:03:25.000000000","message":"Applied these changes! Related [WIP](https://review.lttng.org/c/lttng-tools/+/14934/)","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2f81e335688047562b5ef19473bfd2e4d2ba62cb","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"b21b8134_b2111ee7","line":28,"in_reply_to":"c9ebd210_063370d3","updated":"2024-03-21 20:24:18.000000000","message":"I am planning to remove the unrelated TAP tests, but keep the information about whether or not those steps succeeded as diagnostics. I do feel it adds noise to the stream and to the number of tests.","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    local trigger_name\u003d\"trigger1\""},{"line_number":26,"context_line":"    local output_path\u003d$(mktemp --tmpdir test-listen-cli-output.XXXXXX)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    # TODO: Add no tap version of add trigger? Like for the sessiond"},{"line_number":29,"context_line":"    lttng_add_trigger_ok \\"},{"line_number":30,"context_line":"        $trigger_name \\"},{"line_number":31,"context_line":"        --condition event-rule-matches --type\u003duser --name\u003dtp:tptest \\"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"c9ebd210_063370d3","line":28,"in_reply_to":"ec7d001c_e0f97dbd","updated":"2024-03-12 18:52:22.000000000","message":"\u003e So, for example, in this test case you would see the trigger setup failing and why even if it wasn\u0027t \"a test\"?\n\nNormally you should see the command with a prepended `#` when using the `[...]_notap` version of the utils when running your test. Let me know if it isn\u0027t the case.","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"6f44133a8c1847a6090ce9038833dcd1aa114080","unresolved":true,"context_lines":[{"line_number":45,"context_line":"    local expected_output\u003d\"Warning: Listening for notifications from all existing triggers."},{"line_number":46,"context_line":"Event (trigger trigger1)\""},{"line_number":47,"context_line":"    local actual_output\u003d$(cat \"$output_path\")"},{"line_number":48,"context_line":"    test \"$actual_output\" \u003d \"$expected_output\""},{"line_number":49,"context_line":"    ok $? \"$test_desc\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Tear down."}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"f0792776_31ae0da5","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":2},"updated":"2024-01-25 21:49:43.000000000","message":"Instead of using `test`, I\u0027d like to suggest using `diff` to compare the outputs.\n\nWe can store the various expected outputs in files in the test\u0027s directory (e.g. `test_listen_all_triggers.expect`) and then invoke diff:\n\n```sh\n# Redirecting the output to stderr since the output should not be\n# interpreted as a TAP result. We just want to help the smelly ape debugging\n# this to see the difference between the expected and actual outputs\n# when things go wrong.\n#\n# There will be no output generated if the files are identical.\ndiff -u \"$expected_output_file\" \"$actual_command_output_file\" 1\u003e\u00262\n\n# diff returns 0 if the contents are identical, and 1 if they differ\nok $? \"$test_desc\"\n```","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"6f44133a8c1847a6090ce9038833dcd1aa114080","unresolved":true,"context_lines":[{"line_number":35,"context_line":"    lttng listen \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":36,"context_line":"    local lttng_listen_pid\u003d$!"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Artificially produce the desired event-rule condition."},{"line_number":39,"context_line":"    $GEN_UST_EVENTS_TESTAPP_BIN -i $NR_ITER"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # Stop lttng listen"},{"line_number":42,"context_line":"    kill $lttng_listen_pid"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Check expected output"},{"line_number":45,"context_line":"    local expected_output\u003d\"Warning: Listening for notifications from all existing triggers."},{"line_number":46,"context_line":"Event (trigger trigger1)\""},{"line_number":47,"context_line":"    local actual_output\u003d$(cat \"$output_path\")"},{"line_number":48,"context_line":"    test \"$actual_output\" \u003d \"$expected_output\""},{"line_number":49,"context_line":"    ok $? \"$test_desc\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Tear down."}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"9591287a_892230ac","line":48,"range":{"start_line":38,"start_character":1,"end_line":48,"end_character":36},"updated":"2024-01-25 21:49:43.000000000","message":"There are a couple of problematic cases I can think of with this pattern.\n\n## Triggers are processed asynchronously\n\nWhen a tracer emits an event that matches a trigger\u0027s event-rule condition, it doesn\u0027t wait for the trigger\u0027s actions to complete before continuing the program\u0027s execution.\n\nThis is because the actions of a trigger can take a relatively long time and we don\u0027t want to affect the applications\u0027 or kernel\u0027s timing too much.\n\nThe processing steps of a trigger with an event-rule condition that emits a notification are, roughly:\n1. The tracer instrumentation is invoked when a tracepoint is reached\n2. The instrumentation sends a message to the session daemon with a unique \"cookie\" that allows it to know that \"event rule condition XYZ\" happened in a given process (or the kernel) and the execution resumes.\n3. The tracer\u0027s message is received by the session daemon\n4. The tracer\u0027s message is internally dispatched to an _action executor_ thread that will run the actions associated with that condition (the trigger\u0027s actions)\n5. The _action executor_ thread sends a notification message to any subscribed client(s) (the `lttng` client process running the listen command, in our case)\n6. The `lttng` client receives the notification message\n7. The `lttng` process decodes the notification message and prints its contents to the standard output\n\nWhen the application exits (at line 39), we\u0027re only guaranteed that steps 1 and 2 have occurred.\n\nThis means we could `kill` the `lttng` process before it gets a chance to receive and process the notification message (step 7).\n\nI\u0027m not entirely sure what the best way to handle this is. My reflex would be to add a util function that waits until a given file contains `N` lines before killing the `lttng`.\n\nSomething like\n```sh\nfunction wait_until_n_lines_in_file {\n    local file_path\u003d$1\n    local expected_line_count\u003d$2\n\n    while [ \"$(wc --lines \u003c ${file_path})\" -lt ${expected_line_count} ]\n    do\n        sleep 0.1\n    done\n}\n```\n\nThat you could use like so:\n```sh\n# Artificially produce the desired event-rule condition.\n$GEN_UST_EVENTS_TESTAPP_BIN -i $NR_ITER\n\n# Wait until `lttng` has printed $NR_ITER notifications.\nwait_until_n_lines_in_file $output_path $NR_ITER\n\n# Send the SIGTERM signal\nkill %lttng_listen_pid\n\n# ...\n```\n\nThe part that I dislike about it is that this will hang forever if there\u0027s a bug that causes a notification to not be delivered...\n\nIt\u0027s not the end of the world though as we have a number of tests that react that way and it\u0027s ultimately more reliable than relying on arbitrary timeouts.\n\n## kill doesn\u0027t wait for death 🤘💀\n\nThis one is pretty minor, but I would wait for the `lttng` process to die before progressing to the next test case, simply so that we start with a \"clean slate\".\n\nBy default, `kill` sends the `SIGTERM` signal to the target process (the listen command, in this case). `SIGTERM` politely asks the target process to die, but the process can choose to do so on its own terms (🙄...)\n\nStill, even if we used `kill` to send `SIGKILL` (itself a fair bit more assertive), we don\u0027t have a hard guarantee on when the signal is delivered to the target process.\n\nTo wait for the process to die, we can use `wait $some_pid` to block the script until the target process has exited.\n\n```sh\n# Send the SIGTERM signal\nkill %lttng_listen_pid\n\n# Wait for the process to exit\nwait $lttng_listen_pid\n\n# done!\n```","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"74980aa9a5a99a7a9b30f288ea97c2f0f55ff062","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    lttng listen \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":36,"context_line":"    local lttng_listen_pid\u003d$!"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # Artificially produce the desired event-rule condition."},{"line_number":39,"context_line":"    $GEN_UST_EVENTS_TESTAPP_BIN -i $NR_ITER"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    # Stop lttng listen"},{"line_number":42,"context_line":"    kill $lttng_listen_pid"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    # Check expected output"},{"line_number":45,"context_line":"    local expected_output\u003d\"Warning: Listening for notifications from all existing triggers."},{"line_number":46,"context_line":"Event (trigger trigger1)\""},{"line_number":47,"context_line":"    local actual_output\u003d$(cat \"$output_path\")"},{"line_number":48,"context_line":"    test \"$actual_output\" \u003d \"$expected_output\""},{"line_number":49,"context_line":"    ok $? \"$test_desc\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Tear down."}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"f627185a_c783cc2d","line":48,"range":{"start_line":38,"start_character":1,"end_line":48,"end_character":36},"in_reply_to":"9591287a_892230ac","updated":"2024-02-27 15:42:37.000000000","message":"Update:\n\n* Explicitly synchronize by waiting for the expected number of output lines (line 70, patchset 8)\n* Wait for the process to exit to have a clean slate for the next test (line 73, patchset 8)\n\nAs discussed in person, looping until a certain number of lines appear means that the test could loop forever if something goes wrong. However, it is theoretically valid for the notification to take an arbitrarily long amount of time to arrive at the client listening for notifications. Because of this, we choose to not include a timeout in the test and to let the CI kill the test if it gets stuck. This seems like an appropriate distribution of responsibilities at least in theory.","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"ec0fe6edccb62bf6835d7297e6d131af227a471a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    local expected_output\u003d\"Warning: Listening for notifications from all existing triggers."},{"line_number":46,"context_line":"Event (trigger trigger1)\""},{"line_number":47,"context_line":"    local actual_output\u003d$(cat \"$output_path\")"},{"line_number":48,"context_line":"    test \"$actual_output\" \u003d \"$expected_output\""},{"line_number":49,"context_line":"    ok $? \"$test_desc\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    # Tear down."}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"2059b554_649f5732","line":48,"range":{"start_line":48,"start_character":0,"end_line":48,"end_character":2},"in_reply_to":"f0792776_31ae0da5","updated":"2024-02-29 20:01:49.000000000","message":"Update: Compare files to test output\n\nLines corresponding to this change in Patchset 9 are mainly 86-96","commit_id":"f37bff36ef33852606cd36e6dd690fa48e25cbda"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"586ec120e2dddd41515d586c27b0088868c0bd20","unresolved":true,"context_lines":[{"line_number":45,"context_line":"\t\t--action notify"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"\t# Launch lttng listen"},{"line_number":48,"context_line":"\t#lttng listen \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":49,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":50,"context_line":"\t# Explicitly running the listen command with no buffering is"},{"line_number":51,"context_line":"\t# currently required for this test to pass as expected."}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"fd78096a_3e5b32d8","line":48,"updated":"2024-02-29 21:31:59.000000000","message":"Accidentally left commented?","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"\t\t--action notify"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"\t# Launch lttng listen"},{"line_number":48,"context_line":"\t#lttng listen \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":49,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":50,"context_line":"\t# Explicitly running the listen command with no buffering is"},{"line_number":51,"context_line":"\t# currently required for this test to pass as expected."}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"b08d009d_24a978b6","line":48,"in_reply_to":"707111b4_ada5a57d","updated":"2024-03-12 18:52:22.000000000","message":"Ah okay, my bad!","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"27a1d1f84810255b6c251dfe322e94b0a3268c35","unresolved":true,"context_lines":[{"line_number":45,"context_line":"\t\t--action notify"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"\t# Launch lttng listen"},{"line_number":48,"context_line":"\t#lttng listen \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":49,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":50,"context_line":"\t# Explicitly running the listen command with no buffering is"},{"line_number":51,"context_line":"\t# currently required for this test to pass as expected."}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"707111b4_ada5a57d","line":48,"in_reply_to":"fd78096a_3e5b32d8","updated":"2024-03-07 17:11:14.000000000","message":"No, this should be the line in the final merged test, but it is commented for now because otherwise the test breaks. Listen seems to currently buffer output for some reason so it is called explicitly with no buffering on line 53-54:\n\n\n    stdbuf --input\u003d$unbuffered --output\u003d$unbuffered --error\u003d$unbuffered \\\n\tlttng listen \u003e \"$actual_output\" 2\u003e\u00261 \u0026\n\n\nIt\u0027s a temporary hack to resolve the listen bug (instead of modifying listen) so that I can continue to debug the rest of the test.\n\n----\n\nI did forget to commit the variable name change though! `output_path` --\u003e `actual_output`. Fixed in most recent patchset.","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"586ec120e2dddd41515d586c27b0088868c0bd20","unresolved":true,"context_lines":[{"line_number":117,"context_line":"\t\t--action notify"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\t# Launch lttng listen"},{"line_number":120,"context_line":"\tlttng listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":121,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"\t# Artificially produce the desired event-rule condition"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"adb54930_6ccb7830","line":120,"updated":"2024-02-29 21:31:59.000000000","message":"The test hangs on my machine. Looking into it, it seems to be because of this line.\n\nThis will use the `lttng` binary that is in your system\u0027s \"$PATH\". In my case, the `lttng` version I have installed doesn\u0027t support the listen command.\n\n\u003e PATH is an environment variable that instructs a Linux system in which directories to search for executables. The PATH variable enables the user to run a command without specifying a path.\n\nTo make the test use the binary that was just built, we can replace that with\n\n```sh\n\"$TESTDIR/../src/bin/lttng/$LTTNG_BIN\" listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026\n```\n\n(Fyi, `$LTTNG_BIN` is defined in [`utils.sh`](https://review.lttng.org/plugins/gitiles/lttng-tools.git/+/c5aa32c904ece4ec6b0540b853c359f8ca78a107/tests/utils/utils.sh#14))\n\n---\n\nIt\u0027s a bit unwieldy so if you prefer, you can define a variable after\n```sh\nsource \"$TESTDIR/utils/utils.sh\"\n```\n\nLet\u0027s say\n```sh\nLTTNG_CLIENT_BIN\u003d\"$TESTDIR/../src/bin/lttng/$LTTNG_BIN\"\n```\n\nand then invoke it as such\n```sh\n\"$LTTNG_CLIENT_BIN\" listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026\n```\n\nThe same applies to other invocations of `lttng listen` in the test.","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":true,"context_lines":[{"line_number":117,"context_line":"\t\t--action notify"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\t# Launch lttng listen"},{"line_number":120,"context_line":"\tlttng listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":121,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"\t# Artificially produce the desired event-rule condition"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"b54fbba8_f605d727","line":120,"in_reply_to":"63542f17_0d3d2dcf","updated":"2024-03-12 18:52:22.000000000","message":"Acknowledged","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"fcf26b3be67656f8087a3eea336822856e77a8c9","unresolved":true,"context_lines":[{"line_number":117,"context_line":"\t\t--action notify"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\t# Launch lttng listen"},{"line_number":120,"context_line":"\tlttng listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":121,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"\t# Artificially produce the desired event-rule condition"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"fdbea677_0bee3b14","line":120,"in_reply_to":"adb54930_6ccb7830","updated":"2024-02-29 21:40:08.000000000","message":"In light of my comment about `_run_lttng_cmd`, I guess we could also expose that function from `utils.sh` and use it to launch the client.","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2d96636e6d9c44009a80a93e043ec96600c57039","unresolved":false,"context_lines":[{"line_number":117,"context_line":"\t\t--action notify"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\t# Launch lttng listen"},{"line_number":120,"context_line":"\tlttng listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":121,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"\t# Artificially produce the desired event-rule condition"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"f4a03695_091f1186","line":120,"in_reply_to":"b54fbba8_f605d727","updated":"2024-03-14 22:25:17.000000000","message":"Added a TODO for using _run_lttng_cmd when stdbuf isn\u0027t needed anymore. Resolving because the test uses the right binary now.","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"27a1d1f84810255b6c251dfe322e94b0a3268c35","unresolved":true,"context_lines":[{"line_number":117,"context_line":"\t\t--action notify"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"\t# Launch lttng listen"},{"line_number":120,"context_line":"\tlttng listen $trigger_name \u003e \"$output_path\" 2\u003e\u00261 \u0026"},{"line_number":121,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"\t# Artificially produce the desired event-rule condition"}],"source_content_type":"application/x-shellscript","patch_set":9,"id":"63542f17_0d3d2dcf","line":120,"in_reply_to":"fdbea677_0bee3b14","updated":"2024-03-07 17:11:14.000000000","message":"Update:\n\n* Use the lttng binary that was most recently built (in the source repository)\n\nI didn\u0027t notice the second comment about `_run_lttng_cmd` before updating. I\u0027ll keep this open to remind me to look at that.\n\n----\n\nI\u0027m not applying reviews to this and the other tests below at the moment. To clarify this, I commented launching this test and the other tests below (at lines 252-255 in patchset 11). I\u0027m just iterating on the first test `test_listen_all_triggers` in this file until the general strategy is finalized and free of bugs.","commit_id":"e19021f2b506083f41b0d0c6ccbec126158b5266"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"c697c3906b41c9ca9139e60f6b3f7c3bc51aad11","unresolved":true,"context_lines":[{"line_number":60,"context_line":"\t\t--action notify"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\t# Launch lttng listen"},{"line_number":63,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":64,"context_line":"\t#lttng listen \u003e \"$actual_output\" 2\u003e\u00261 \u0026"},{"line_number":65,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":66,"context_line":"\t# Explicitly running the listen command with no buffering is"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"0f87c237_ed597525","line":63,"updated":"2024-03-07 21:17:34.000000000","message":"This feels kind of silly and basic, but I was hesitating about when to set/reset this flag. Especially since it\u0027s shared with the other tests I\u0027m trying to be fairly safe (bugs here are low stakes, but potentially annoying to debug).","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":true,"context_lines":[{"line_number":60,"context_line":"\t\t--action notify"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\t# Launch lttng listen"},{"line_number":63,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":64,"context_line":"\t#lttng listen \u003e \"$actual_output\" 2\u003e\u00261 \u0026"},{"line_number":65,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":66,"context_line":"\t# Explicitly running the listen command with no buffering is"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"72598331_21fec6b0","line":63,"in_reply_to":"0f87c237_ed597525","updated":"2024-03-12 18:52:22.000000000","message":"If you want to make it less error prone, I\u0027d suggest lifting the code from lines 62-81 to a function that can be used by all test cases (say, `launch_lttng_listen`. The function would launch `lttng-listen` and only return once it is \"ready\".\n\nYou can look at `_run_lttng_cmd` to see how to forward your arguments (`--all` or the trigger names) to the invocation of `lttng listen` (look at the use of the `$@` special variable: https://linuxhandbook.com/bash-special-variables/)","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2d96636e6d9c44009a80a93e043ec96600c57039","unresolved":false,"context_lines":[{"line_number":60,"context_line":"\t\t--action notify"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"\t# Launch lttng listen"},{"line_number":63,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":64,"context_line":"\t#lttng listen \u003e \"$actual_output\" 2\u003e\u00261 \u0026"},{"line_number":65,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":66,"context_line":"\t# Explicitly running the listen command with no buffering is"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"dd1ea98e_e8994736","line":63,"in_reply_to":"72598331_21fec6b0","updated":"2024-03-14 22:25:17.000000000","message":"Done","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"d8482cd7205cec79b1841c808d6d1e213da928f3","unresolved":true,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"\t# Send the SIGTERM signal"},{"line_number":107,"context_line":"\tkill $lttng_listen_pid"},{"line_number":108,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"\t# Wait for the process to exit"},{"line_number":111,"context_line":"\twait $lttng_listen_pid"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"5101b701_c65d18ef","line":108,"updated":"2024-03-12 18:52:22.000000000","message":"If you do implement `launch_lttng_listen` idea, you can remove this assignation. The flag would only every be accessed/managed by that function.","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000006,"name":"Jérémie Galarneau","email":"jeremie.galarneau@efficios.com","username":"jgalar","avatars":[{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/8689763327e5bbda7dec9f18846b60ae.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"95d9ae7ce5b035b1c397f66824f9b84136c22ad0","unresolved":true,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"\t# Send the SIGTERM signal"},{"line_number":107,"context_line":"\tkill $lttng_listen_pid"},{"line_number":108,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"\t# Wait for the process to exit"},{"line_number":111,"context_line":"\twait $lttng_listen_pid"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"ccc0c39b_972f2290","line":108,"in_reply_to":"5101b701_c65d18ef","updated":"2024-03-12 18:53:11.000000000","message":"*only ever be [...]","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2d96636e6d9c44009a80a93e043ec96600c57039","unresolved":false,"context_lines":[{"line_number":105,"context_line":""},{"line_number":106,"context_line":"\t# Send the SIGTERM signal"},{"line_number":107,"context_line":"\tkill $lttng_listen_pid"},{"line_number":108,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"\t# Wait for the process to exit"},{"line_number":111,"context_line":"\twait $lttng_listen_pid"}],"source_content_type":"application/x-shellscript","patch_set":13,"id":"7eea959f_da675603","line":108,"in_reply_to":"ccc0c39b_972f2290","updated":"2024-03-14 22:25:17.000000000","message":"Done","commit_id":"cfd06a74ca1d1aefe37b6e34a0e9c5077c12f394"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"146aaf97e6796753c3f4857686784a34892bdb1e","unresolved":true,"context_lines":[{"line_number":71,"context_line":"\t# e.g. _run_lttng_cmd \"$output_dest\" \"$error_dest\" listen \"$@\" \u0026"},{"line_number":72,"context_line":"\tlocal unbuffered\u003d0"},{"line_number":73,"context_line":"\tstdbuf --input\u003d$unbuffered --output\u003d$unbuffered --error\u003d$unbuffered \\"},{"line_number":74,"context_line":"\t\t\"$LTTNG\" listen --signal-when-ready \"$@\" \u0026\u003e\"$output_dest\" \u0026"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"\tlocal lttng_listen_pid\u003d$!"},{"line_number":77,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":52,"id":"9c187abd_c6290435","line":74,"updated":"2025-07-02 19:44:16.000000000","message":"When it is available, use machine interface for the tests instead of human readable.","commit_id":"a7b185e7d01e4d03d488a91e02b566d7fe32ac62"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"e9b50b93812b2a641df7d96eff94c47b83f052f7","unresolved":true,"context_lines":[{"line_number":976,"context_line":"# signal the LTTng listen application will send when it is ready."},{"line_number":977,"context_line":"LISTEN_READY_SIGNAL\u003d\"SIGUSR2\""},{"line_number":978,"context_line":"if [ \"$(trap -p \"$LISTEN_READY_SIGNAL\")\" !\u003d \"\" ]; then"},{"line_number":979,"context_line":"\tLTTNG_BAIL_OUT \"Test attempts to use signal ${LISTEN_READY_SIGNAL}, but this signal already has a registered handler. The testing code must be adjusted.\""},{"line_number":980,"context_line":"else"},{"line_number":981,"context_line":"\t# Register sync signal handler"},{"line_number":982,"context_line":"\ttrap handle_listen_ready_signal \"$LISTEN_READY_SIGNAL\""}],"source_content_type":"application/x-shellscript","patch_set":53,"id":"91dc53fb_638a50ec","line":979,"range":{"start_line":979,"start_character":1,"end_line":979,"end_character":154},"updated":"2025-07-07 19:45:17.000000000","message":"Nitpick: Figure out how to wrap this line nicely in the source, but still have it print as a single line in a message.\n\nSource looks something like this:\n```\nLTTNG_BAIL_OUT \"Test attempts to use signal ${LISTEN_READY_SIGNAL}, but this signal \\\n\t\t       already has a registered handler. The testing code must be adjusted.\"\n```\n\nBut message displays like this:\n`Bail out! Test attempts to use signal SIGUSR2, but this signal already has a registered handler. The testing code must be adjusted.`\n\nAnd not like this:\n`Bail out! Test attempts to use signal SIGUSR2, but this signal \t\t       already has a registered handler. The testing code must be adjusted.`","commit_id":"d52a5af59ca583905dd09b177850b27c8af98cb5"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2ac0298177653b8282943bbcecb4fdb0c9cd2ace","unresolved":true,"context_lines":[{"line_number":54,"context_line":"\tLISTEN_IS_READY\u003d0"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"\tdiag \"$LTTNG listen $*\""},{"line_number":57,"context_line":"\t# Launch listen in the background because otherwise it will block"},{"line_number":58,"context_line":"\t# the test script."},{"line_number":59,"context_line":"\t#"},{"line_number":60,"context_line":"\t# TODO: Fix listen command to make it not buffer output"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"af732984_90ea105c","line":57,"updated":"2025-07-09 14:08:20.000000000","message":"Nitpick (for the end): Fix comment/line wrapping throughout (72 max). Things are wrapped correctly for not being in a function, but are too long for being indented.","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"dbba2652a22c252a140f76b73b05e0d47110a6c8","unresolved":true,"context_lines":[{"line_number":57,"context_line":"\t# Launch listen in the background because otherwise it will block"},{"line_number":58,"context_line":"\t# the test script."},{"line_number":59,"context_line":"\t#"},{"line_number":60,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":61,"context_line":"\t# Explicitly running the listen command with no buffering is"},{"line_number":62,"context_line":"\t# currently required for this test to pass as expected."},{"line_number":63,"context_line":"\t#"},{"line_number":64,"context_line":"\t# TODO: When buffering is fixed, adapt to use _run_lttng_cmd. This"},{"line_number":65,"context_line":"\t# makes it less likely for folks to forget to call the built binary"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"d09ecd43_f407a53a","line":62,"range":{"start_line":60,"start_character":1,"end_line":62,"end_character":56},"updated":"2025-07-09 19:01:03.000000000","message":"The tests are currently written to wait for a certain number of lines to appear in an output file. Writing to a file isn\u0027t buffered by line. At the moment we approach this by having [listen](https://review.lttng.org/c/lttng-tools/+/5198/45) explicitly flush content that it\u0027s printing (with `fflush()`), BUT I\u0027m unsure whether this is the appropriate decision. \n\nIf users are redirecting to a file, do they care whether or not lines appear right away? If they don\u0027t care, then I don\u0027t think listen should explicitly flush and that the test methodology should be adjusted to not require that listen explicitly flush.","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"24aca32e1e607fb5b7168e6813bd151cc81f22e0","unresolved":true,"context_lines":[{"line_number":57,"context_line":"\t# Launch listen in the background because otherwise it will block"},{"line_number":58,"context_line":"\t# the test script."},{"line_number":59,"context_line":"\t#"},{"line_number":60,"context_line":"\t# TODO: Fix listen command to make it not buffer output"},{"line_number":61,"context_line":"\t# Explicitly running the listen command with no buffering is"},{"line_number":62,"context_line":"\t# currently required for this test to pass as expected."},{"line_number":63,"context_line":"\t#"},{"line_number":64,"context_line":"\t# TODO: When buffering is fixed, adapt to use _run_lttng_cmd. This"},{"line_number":65,"context_line":"\t# makes it less likely for folks to forget to call the built binary"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"b524e65b_dce0cbb0","line":62,"range":{"start_line":60,"start_character":1,"end_line":62,"end_character":56},"in_reply_to":"d09ecd43_f407a53a","updated":"2025-07-17 20:38:24.000000000","message":"(Also at the moment I\u0027m just explicitly flushing stdout with [listen](https://review.lttng.org/c/lttng-tools/+/5198/45), but I\u0027m thinking stderr should also be explicitly flushed if I\u0027m taking the flushing explicitly approach)","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"dbba2652a22c252a140f76b73b05e0d47110a6c8","unresolved":true,"context_lines":[{"line_number":220,"context_line":"\t\twait_until_n_lines_in_file \"$actual_output\" \"$expected_output_n_lines\""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"\t\t# Send the SIGTERM signal"},{"line_number":223,"context_line":"\t\tkill $lttng_listen_pid"},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"\t\t# Wait for the process to exit"},{"line_number":226,"context_line":"\t\twait $lttng_listen_pid"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"90854640_7e4c4774","line":223,"updated":"2025-07-09 19:01:03.000000000","message":"Nitpick (for the end): Make sure the output is valid TAP. In this case that probably means any lines that don\u0027t start with `ok` or `not ok` have a `#` in front.\n\nFor example, in the following test stream output snippet: \n```\n# The LTTng listen application is ready.\n# Proceed with test since the LTTng listen application is ready.\n# Wait until the output has the expected number of lines.\n[2]+  Terminated              stdbuf --output\u003d0 \"$LTTNG\" listen --signal-when-ready \"$@\" \u0026\u003e \"$output_dest\"\nok 2 - Implicitly listen for all trigger notifications (No arguments)\n```\n\nI believe the line `[2]+  Terminated              stdbuf --output\u003d0 \"$LTTNG\" listen --signal-when-ready` isn\u0027t valid.\n\nI\u0027ve been told that the TAP parser doesn\u0027t always trip up when it\u0027s not strictly valid TAP, so can also use that as a reference for what to fix.","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"dbba2652a22c252a140f76b73b05e0d47110a6c8","unresolved":true,"context_lines":[{"line_number":241,"context_line":"\t\trm \"$expected_output\""},{"line_number":242,"context_line":"\tfi"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"\t# Tear down"},{"line_number":245,"context_line":"\tlttng_remove_trigger_ok $trigger_name"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"\trm \"$actual_output\""}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"406501e4_30192a9e","line":244,"updated":"2025-07-09 19:01:03.000000000","message":"(For the end) Make sure I\u0027m cleaning up the launched listen processes correctly especially if the test doesn\u0027t go as expected. On my computer I\u0027ve sometimes found `lttng listen` processes floating around.","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2ac0298177653b8282943bbcecb4fdb0c9cd2ace","unresolved":true,"context_lines":[{"line_number":249,"context_line":"\techo # Empty line for readability"},{"line_number":250,"context_line":"}"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"function test_listen_one_trigger {"},{"line_number":253,"context_line":"\tlocal test_desc\u003d\"Listen for one trigger notification\""},{"line_number":254,"context_line":"\tlocal trigger_name\u003d\"trigger1\""},{"line_number":255,"context_line":"\tlocal actual_output\u003d$(mktemp --tmpdir test-listen-cli-actual-output.XXXXXX)"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"6a5808e0_4ab72746","line":252,"updated":"2025-07-09 14:08:20.000000000","message":"Remove this test? Redundant with testing for two triggers (test_listen_two_triggers)?","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"},{"author":{"_account_id":1000033,"name":"Erica Bugden","display_name":"Erica Bugden","email":"ebugden@efficios.com","username":"ebugden","avatars":[{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d32","height":32},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d56","height":56},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d100","height":100},{"url":"https://www.gravatar.com/avatar/c42f50f12968dff6041103eb3b1af3bd.jpg?d\u003dretro\u0026r\u003dr\u0026s\u003d120","height":120}]},"change_message_id":"2ac0298177653b8282943bbcecb4fdb0c9cd2ace","unresolved":true,"context_lines":[{"line_number":991,"context_line":"test_listen_without_notify_action"},{"line_number":992,"context_line":"#test_listen_trigger_does_not_exist"},{"line_number":993,"context_line":""},{"line_number":994,"context_line":"# Unregister the signal used to check for listen application readiness"},{"line_number":995,"context_line":"trap - \"$LISTEN_READY_SIGNAL\""},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"stop_lttng_sessiond_notap"}],"source_content_type":"application/x-shellscript","patch_set":54,"id":"127e407c_12342ac6","line":994,"updated":"2025-07-09 14:08:20.000000000","message":"Check if I don\u0027t need to do this because it\u0027s automatically unregistered when the script exits or something like that","commit_id":"224373d5bc22c679b32c1a152678496e2ce92c38"}]}
