Skip to content

Fix shell script execution and config bugs#6

Open
ammaarrahmed wants to merge 1 commit intoirobot-ros:rollingfrom
ammaarrahmed:fix/issue-5-script-bugs
Open

Fix shell script execution and config bugs#6
ammaarrahmed wants to merge 1 commit intoirobot-ros:rollingfrom
ammaarrahmed:fix/issue-5-script-bugs

Conversation

@ammaarrahmed
Copy link
Copy Markdown

@ammaarrahmed ammaarrahmed commented Mar 19, 2026

Fixes for Benchmark Execution Scripts #5

This update resolves several critical bugs in the execution workflow that were affecting test reliability and data collection.

1. Fixed Zenoh Benchmark Exit Code Muting

  • Issue: In both run_single_process_benchmark.sh and run_multi_process_benchmark.sh, the benchmark's exit code was being clobbered by the subsequent kill ${ROUTER_PID} command. If irobot_benchmark failed but the kill succeeded, the failure was silently ignored and the suite advanced.
  • Fix: The benchmark's exit code is now explicitly captured (local benchmark_exit_code=$?) before the Zenoh cleanup block, ensuring failures are correctly caught and the script aborts.

2. Fixed Incorrect Variable Unset Syntax

  • Issue: The scripts used unset $ROUTER_PID (which evaluates the variable first, e.g., unset 12345) instead of unset ROUTER_PID. This is a no-op that leaves the PID variable defined, causing the next iteration's cleanup conditional to attempt killing the old, now defunct PID. This could potentially terminate unrelated processes on the host.
  • Fix: Corrected to unset ROUTER_PID.

3. Added Missing --results-dir to Multi-Process Runner

  • Issue: The run_multi_process_benchmark.sh script lacked the --results-dir argument, causing irobot_benchmark to dump logs in the current working directory /ws instead of the targeted output folder. The script then relied on a fragile mv ./*log "$RESULT_FOLDER" glob, which caused errors in the SystemLatencyLogger during cleanup.
  • Fix: Added --results-dir ${RESULT_FOLDER} to the execution command, aligning it with the single-process runner and removing the race condition.

4. Applied Zenoh Router Custom Configs

  • Issue: run_zenoh_router.sh loaded ZENOH_ROUTER_CONFIG_URI from the test matrix, but never actually passed it to the rmw_zenohd process. As a result, custom session configurations (like the critical timeout reductions documented in the CHANGELOG) were never applied, causing the router to trigger repeated "scouting delay" warnings.
  • Fix: Exported ZENOH_ROUTER_CONFIG_URI into the environment before launching rmw_zenohd so the RMW implementation picks it up.

5. Corrected Minor Config Typo

  • Fix: Updated the header comment in memory_test.conf which incorrectly stated it was for ActionClient/ActionServer mix process benchmarks instead of memory benchmarks.

- Fix BUG-001: Correctly unset ROUTER_PID
- Fix BUG-002: Preserve benchmark exit code before zenoh cleanup
- Fix BUG-003: Add --results-dir to multi-process runner
- Fix BUG-004: Pass ZENOH_ROUTER_CONFIG_URI to rmw_zenohd
- Fix ISSUE-006: Correct memory_test.conf comment

Signed-off-by: Ammaar Ahmed <ammaarlatif53@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant