[LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c

yangfeng59949 yangfeng59949@163.com
Fri Apr 5 08:53:55 CEST 2024


Hi,<br/>Thanks for getting back to me.<br/><br/>gcc (GCC) 7.3.0<br/>Linux localhost.localdomain 4.19.90-89.6.v2401.ky10.aarch64 #1 SMP Thu Mar 14 20:06:10 CST 2024 aarch64 aarch64 aarch64 GNU/Linux<br/>Manufacturers ID:                   HiSilicon<br/>BIOS Vendor ID:                        QEMU<br/>Model name:                          Kunpeng-920<br/>BIOS Model name:                    virt-4.1<br/><br/>Kind regards,<br/>yangfeng
At 2024-04-04 21:53:23, "Petr Vorel" <pvorel@suse.cz> wrote:
>Hi,
>
>> event not initialized to 0 causes "Got a notification,
>> expecting a datamsg" issues
>
>Out of curiosity which architecture, kernel version, toolchain version and
>distro do you see the issue? I cannot reproduce it on any of systems we test.
>
>...
>> +++ b/utils/sctp/func_tests/test_1_to_1_events.c
>> @@ -96,6 +96,7 @@ main(void)
>>  	/* Create the client socket.  */
>>  	clt_sk = test_socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP);
>
>> +	memset(&event, 0, sizeof(struct sctp_event_subscribe));
>
>Obviously correct.
>
>Reviewed-by: Petr Vorel <pvorel@suse.cz>
>
>Note, nowadays it'd be enough to initialize as:
>
>struct sctp_event_subscribe event = {0};
>
>But because we use the old style with the rest of the functions, memset() is OK.
>
>Kind regards,
>Petr


More information about the ltp mailing list