[Home]

Summary:ASTERISK-27172: test_message: some tests fail
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2017-08-03 10:56:06Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Tests/General
Versions:13.14.1 13.17.0 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-30049 Seeing unit-test failures in unadulterated master in /main/message
Environment:Debian 9.0 (Current stable, Stretch), x86_64. Both from packages and self-built.Attachments:
Description:I have enabled the test framework on my system. Most tests pass. Three tests fail. Log of their specific category included below. The ones that fail are:

* /main/message test_message_queue_both_nominal
* /main/message test_message_queue_handler_nominal
* /main/message test_message_queue_dialplan_nominal

I have not yet checked this with master / 15.

{code}
pungenday*CLI> test execute category /main/message/
Running all available tests matching category /main/message/

START  /main/message/ - test_message_msg_send
END    /main/message/ - test_message_msg_send Time: <1ms Result: PASS
START  /main/message/ - test_message_has_destination_handler
END    /main/message/ - test_message_has_destination_handler Time: <1ms Result: PASS
START  /main/message/ - test_message_has_destination_dialplan
END    /main/message/ - test_message_has_destination_dialplan Time: <1ms Result: PASS
START  /main/message/ - test_message_queue_both_nominal
[test_message.c:user_event_wait_for_events:265]: Test timed out while waiting for 4 expected user events
[test_message.c:user_event_wait_for_events:272]: Received 0 of 4 user events
[test_message.c:test_message_queue_both_nominal:637]: Failed to received 4 expected user events
END    /main/message/ - test_message_queue_both_nominal Time: 5000ms Result: FAIL
START  /main/message/ - test_message_queue_handler_nominal
[test_message.c:handler_wait_for_message:242]: Test timed out while waiting for handler to get message
END    /main/message/ - test_message_queue_handler_nominal Time: 21190ms Result: FAIL
START  /main/message/ - test_message_queue_dialplan_nominal
[test_message.c:user_event_wait_for_events:265]: Test timed out while waiting for 4 expected user events
[test_message.c:user_event_wait_for_events:272]: Received 0 of 4 user events
[test_message.c:test_message_queue_dialplan_nominal:528]: Failed to received 4 expected user events
END    /main/message/ - test_message_queue_dialplan_nominal Time: 5000ms Result: FAIL
START  /main/message/ - test_message_manipulation
END    /main/message/ - test_message_manipulation Time: <1ms Result: PASS
START  /main/message/ - test_message_msg_handler_registration
END    /main/message/ - test_message_msg_handler_registration Time: <1ms Result: PASS
START  /main/message/ - test_message_msg_tech_registration
END    /main/message/ - test_message_msg_tech_registration Time: <1ms Result: PASS

9 Test(s) Executed  6 Passed  3 Failed
   -- Message technology 'testmsg' registered.
 == Message handler 'testmsg' registered.
   -- Message handler 'testmsg' unregistered.
 == Message technology 'testmsg' unregistered.
 == Message handler 'testmsg' registered.
   -- Message handler 'testmsg' unregistered.
 == Message handler 'testmsg' registered.
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:1] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:To,Value:foo") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:2] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:From,Value:bar") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:3] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:Body,Value:a body") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:4] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:Custom,Value:") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:5] Set("Message/ast_msg_queue", "MESSAGE_DATA(custom_data)=") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:6] MessageSend("Message/ast_msg_queue", "testmsg:bar,testmsg:foo") in new stack
[Aug  3 11:42:21] WARNING[8996][C-00000000]: message.c:1235 msg_send_exec: No message technology 'testmsg' found.
   -- Auto fallthrough, channel 'Message/ast_msg_queue' status is 'UNKNOWN'
   -- Message handler 'testmsg' unregistered.
 == Message handler 'testmsg' registered.
   -- Executing [s@default:1] wait("Message/ast_msg_queue", "1")
   -- Executing [s@default:1] answer("Message/ast_msg_queue", "")
   -- Digit timeout set to 5.000
   -- Response timeout set to 10.000
   -- Executing [s@default:1] background("Message/ast_msg_queue", "demo-congrats")
[Aug  3 11:42:27] ERROR[8996][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Aug  3 11:42:27] WARNING[8996][C-00000000]: file.c:1247 ast_streamfile: Unable to open demo-congrats (format (none)): Function not implemented
[Aug  3 11:42:27] WARNING[8996][C-00000000]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on Message/ast_msg_queue for demo-congrats
   -- Executing [s@default:1] background("Message/ast_msg_queue", "demo-instruct")
[Aug  3 11:42:27] ERROR[8996][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Aug  3 11:42:27] WARNING[8996][C-00000000]: file.c:1247 ast_streamfile: Unable to open demo-instruct (format (none)): Function not implemented
[Aug  3 11:42:27] WARNING[8996][C-00000000]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on Message/ast_msg_queue for demo-instruct
   -- Executing [s@default:1] waitexten("Message/ast_msg_queue", "")
   -- Timeout on Message/ast_msg_queue, continuing...
   -- Executing [s@default:2] Answer("Message/ast_msg_queue", "") in new stack
   -- Executing [s@default:3] Set("Message/ast_msg_queue", "TIMEOUT(digit)=5") in new stack
   -- Digit timeout set to 5.000
   -- Executing [s@default:4] Set("Message/ast_msg_queue", "TIMEOUT(response)=10") in new stack
   -- Response timeout set to 10.000
   -- Executing [s@default:5] BackGround("Message/ast_msg_queue", "demo-congrats") in new stack
[Aug  3 11:42:37] ERROR[8996][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Aug  3 11:42:37] WARNING[8996][C-00000000]: file.c:1247 ast_streamfile: Unable to open demo-congrats (format (none)): Function not implemented
[Aug  3 11:42:37] WARNING[8996][C-00000000]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on Message/ast_msg_queue for demo-congrats
   -- Executing [s@default:6] BackGround("Message/ast_msg_queue", "demo-instruct") in new stack
[Aug  3 11:42:37] ERROR[8996][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Aug  3 11:42:37] WARNING[8996][C-00000000]: file.c:1247 ast_streamfile: Unable to open demo-instruct (format (none)): Function not implemented
[Aug  3 11:42:37] WARNING[8996][C-00000000]: pbx_builtins.c:1100 pbx_builtin_background: ast_streamfile failed on Message/ast_msg_queue for demo-instruct
   -- Executing [s@default:7] WaitExten("Message/ast_msg_queue", "") in new stack
   -- Timeout on Message/ast_msg_queue, going to 't'
   -- Executing [t@default:1] playback("Message/ast_msg_queue", "demo-thanks")
[Aug  3 11:42:47] ERROR[8996][C-00000000]: channel.c:5640 set_format: Unable to set format because channel Message/ast_msg_queue supports no formats
[Aug  3 11:42:47] WARNING[8996][C-00000000]: file.c:1247 ast_streamfile: Unable to open demo-thanks (format (none)): Function not implemented
[Aug  3 11:42:47] WARNING[8996][C-00000000]: app_playback.c:494 playback_exec: Playback failed on Message/ast_msg_queue for demo-thanks
   -- Executing [t@default:1] hangup("Message/ast_msg_queue", "")
 == Spawn extension (default, t, 1) exited non-zero on 'Message/ast_msg_queue'
   -- Message handler 'testmsg' unregistered.
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:1] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:To,Value:foo") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:2] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:From,Value:bar") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:3] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:Body,Value:a body") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:4] UserEvent("Message/ast_msg_queue", "TestMessageUnitTest,Verify:Custom,Value:field") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:5] Set("Message/ast_msg_queue", "MESSAGE_DATA(custom_data)=field") in new stack
   -- Executing [test_message_extension@__TEST_MESSAGE_CONTEXT__:6] MessageSend("Message/ast_msg_queue", "testmsg:bar,testmsg:foo") in new stack
[Aug  3 11:42:47] WARNING[8996][C-00000000]: message.c:1235 msg_send_exec: No message technology 'testmsg' found.
   -- Auto fallthrough, channel 'Message/ast_msg_queue' status is 'UNKNOWN'
 == Message handler 'testmsg' registered.
[Aug  3 11:42:52] ERROR[9018]: message.c:1416 ast_msg_handler_register: Message handler already registered for 'testmsg'
   -- Message handler 'testmsg' unregistered.
[Aug  3 11:42:52] ERROR[9018]: message.c:1455 ast_msg_handler_unregister: No 'testmsg' message handler found.
   -- Message technology 'testmsg' registered.
[Aug  3 11:42:52] ERROR[9018]: message.c:1361 ast_msg_tech_register: Message technology already registered for 'testmsg'
 == Message technology 'testmsg' unregistered.
[Aug  3 11:42:52] ERROR[9018]: message.c:1399 ast_msg_tech_unregister: No 'testmsg' message technology found.

{code}
Comments:By: Asterisk Team (asteriskteam) 2017-08-03 10:56:07.213-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Philip Prindeville (pprindeville) 2022-05-09 12:32:24.516-0500

Did anyone try to bisect to see where the regression crept in?