* [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c
@ 2024-03-29 15:47 yangfeng
2024-04-04 13:53 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: yangfeng @ 2024-03-29 15:47 UTC (permalink / raw)
To: ltp; +Cc: yangfeng
From: yangfeng <yangfeng@kylinos.cn>
event not initialized to 0 causes "Got a notification,
expecting a datamsg" issues
Signed-off-by: yangfeng <yangfeng@kylinos.cn>
---
utils/sctp/func_tests/test_1_to_1_events.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils/sctp/func_tests/test_1_to_1_events.c b/utils/sctp/func_tests/test_1_to_1_events.c
index 447845ff3..889d2ff33 100644
--- a/utils/sctp/func_tests/test_1_to_1_events.c
+++ 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));
event.sctp_data_io_event = 1;
event.sctp_association_event = 1;
event.sctp_shutdown_event = 1;
--
2.25.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c
2024-03-29 15:47 [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c yangfeng
@ 2024-04-04 13:53 ` Petr Vorel
2024-04-05 6:53 ` yangfeng59949
0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2024-04-04 13:53 UTC (permalink / raw)
To: yangfeng; +Cc: yangfeng, ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c
2024-04-04 13:53 ` Petr Vorel
@ 2024-04-05 6:53 ` yangfeng59949
2024-04-05 7:34 ` Petr Vorel
0 siblings, 1 reply; 4+ messages in thread
From: yangfeng59949 @ 2024-04-05 6:53 UTC (permalink / raw)
To: Petr Vorel; +Cc: yangfeng, ltp
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c
2024-04-05 6:53 ` yangfeng59949
@ 2024-04-05 7:34 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2024-04-05 7:34 UTC (permalink / raw)
To: yangfeng59949; +Cc: yangfeng, ltp
Hi,
> 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
Thanks for info, merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-05 7:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 15:47 [LTP] [PATCH] sctp: bugfix for utils/sctp/func_tests/test_1_to_1_events.c yangfeng
2024-04-04 13:53 ` Petr Vorel
2024-04-05 6:53 ` yangfeng59949
2024-04-05 7:34 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox