Skip to content

ttcn3_start runs forever when passing empty string as test argument

Summary

usage: ttcn3_start [-ip host_ip_address] executable [file.cfg] {module_name[.testcase_name]}

When passing a valid config file as file.cfg argument in combination with an empty string "" as module_name[.testcase_name] argument, ttcn3_start never exits:

  • It goes into this branch to execute tests from the command-line arguments
  • The testsuite starts and runs all tests from the config file
  • ttcn3_start exists after the first test is done (Test execution finished.)
  • ttcn3_start tries to stop the MTC
  • The MTC is still in MC_EXECUTING_TESTCASE, not in MC_READY, so it says "MTC cannot be terminated."
  • ttcn3_start waits forever for "MTC terminated\..*\r\n", even after the testsuite is done with all test cases

Steps and/or TTCN-3 code to reproduce

ttcn3_start executable file.cfg ""

What is the current bug behavior?

ttcn3_start doesn't exit at all

What is the expected correct behavior?

Give an error if the testcase argument is an empty string.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code, as it's very hard to read otherwise.)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Titan version

9.0.0 (but seems to be the same on master)

Platform details (OS type and version)

Debian 12

/cc @aknappqwt @mmagyari