You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/10/12 16:05:24 UTC
[GitHub] [qpid-dispatch] ChugR opened a new pull request #874: DISPATCH-1799: test message body_data functions
ChugR opened a new pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874
First pass at setting various vbin chunk sizes, vbin number-of-chunks. This is then cast across the differing buffer sizes provided by the unit_test_size_XXX test group.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ganeshmurthy commented on a change in pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ganeshmurthy commented on a change in pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874#discussion_r503580779
##########
File path: tests/message_test.c
##########
@@ -703,6 +705,239 @@ static char *test_check_weird_messages(void *context)
return result;
}
+//
+// Testing protocol adapter 'body_data' interfaces
+//
+
+static void body_data_generate_message(qd_message_t *msg, char *s_chunk_size, char *s_n_chunks)
+{
+ // Fill a message with n_chunks of vbin chunk_size body data.
+
+ int chunk_size = atoi(s_chunk_size);
+ int n_chunks = atoi(s_n_chunks);
+
+ // Add message headers
+ qd_message_compose_1(msg, "whom-it-may-concern", 0);
+
+ // Add the chunks. This creates the test state for not-flattened buffers.
+ for (int j=0; j<n_chunks; j++) {
+ // Create 'buf2' as a linear buffer of the raw data to be sent.
+ // Buffer filled with chunk index + 1.
+ unsigned char *buf2 = (unsigned char *)malloc(chunk_size);
+ memset(buf2, j+1, chunk_size);
+
+ // Use 'set_content' to convert raw buffer 'buf2'
+ // into a buffer list in message 'mule'.
+ qd_message_t *mule = qd_message();
+ qd_message_content_t *mule_content = MSG_CONTENT(mule);
+ set_content(mule_content, buf2, chunk_size);
Review comment:
Oops, found it, sorry
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ganeshmurthy commented on a change in pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ganeshmurthy commented on a change in pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874#discussion_r503550349
##########
File path: tests/message_test.c
##########
@@ -703,6 +705,239 @@ static char *test_check_weird_messages(void *context)
return result;
}
+//
+// Testing protocol adapter 'body_data' interfaces
+//
+
+static void body_data_generate_message(qd_message_t *msg, char *s_chunk_size, char *s_n_chunks)
+{
+ // Fill a message with n_chunks of vbin chunk_size body data.
+
+ int chunk_size = atoi(s_chunk_size);
+ int n_chunks = atoi(s_n_chunks);
+
+ // Add message headers
+ qd_message_compose_1(msg, "whom-it-may-concern", 0);
+
+ // Add the chunks. This creates the test state for not-flattened buffers.
+ for (int j=0; j<n_chunks; j++) {
+ // Create 'buf2' as a linear buffer of the raw data to be sent.
+ // Buffer filled with chunk index + 1.
+ unsigned char *buf2 = (unsigned char *)malloc(chunk_size);
+ memset(buf2, j+1, chunk_size);
+
+ // Use 'set_content' to convert raw buffer 'buf2'
+ // into a buffer list in message 'mule'.
+ qd_message_t *mule = qd_message();
+ qd_message_content_t *mule_content = MSG_CONTENT(mule);
+ set_content(mule_content, buf2, chunk_size);
Review comment:
Where is this set_content() function ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ganeshmurthy commented on a change in pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ganeshmurthy commented on a change in pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874#discussion_r503580779
##########
File path: tests/message_test.c
##########
@@ -703,6 +705,239 @@ static char *test_check_weird_messages(void *context)
return result;
}
+//
+// Testing protocol adapter 'body_data' interfaces
+//
+
+static void body_data_generate_message(qd_message_t *msg, char *s_chunk_size, char *s_n_chunks)
+{
+ // Fill a message with n_chunks of vbin chunk_size body data.
+
+ int chunk_size = atoi(s_chunk_size);
+ int n_chunks = atoi(s_n_chunks);
+
+ // Add message headers
+ qd_message_compose_1(msg, "whom-it-may-concern", 0);
+
+ // Add the chunks. This creates the test state for not-flattened buffers.
+ for (int j=0; j<n_chunks; j++) {
+ // Create 'buf2' as a linear buffer of the raw data to be sent.
+ // Buffer filled with chunk index + 1.
+ unsigned char *buf2 = (unsigned char *)malloc(chunk_size);
+ memset(buf2, j+1, chunk_size);
+
+ // Use 'set_content' to convert raw buffer 'buf2'
+ // into a buffer list in message 'mule'.
+ qd_message_t *mule = qd_message();
+ qd_message_content_t *mule_content = MSG_CONTENT(mule);
+ set_content(mule_content, buf2, chunk_size);
Review comment:
Oops, found it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR closed pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ChugR closed pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ganeshmurthy commented on a change in pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ganeshmurthy commented on a change in pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874#discussion_r503582010
##########
File path: tests/message_test.c
##########
@@ -703,6 +705,239 @@ static char *test_check_weird_messages(void *context)
return result;
}
+//
+// Testing protocol adapter 'body_data' interfaces
+//
+
+static void body_data_generate_message(qd_message_t *msg, char *s_chunk_size, char *s_n_chunks)
+{
+ // Fill a message with n_chunks of vbin chunk_size body data.
+
+ int chunk_size = atoi(s_chunk_size);
+ int n_chunks = atoi(s_n_chunks);
+
+ // Add message headers
+ qd_message_compose_1(msg, "whom-it-may-concern", 0);
+
+ // Add the chunks. This creates the test state for not-flattened buffers.
+ for (int j=0; j<n_chunks; j++) {
+ // Create 'buf2' as a linear buffer of the raw data to be sent.
+ // Buffer filled with chunk index + 1.
+ unsigned char *buf2 = (unsigned char *)malloc(chunk_size);
+ memset(buf2, j+1, chunk_size);
+
+ // Use 'set_content' to convert raw buffer 'buf2'
+ // into a buffer list in message 'mule'.
+ qd_message_t *mule = qd_message();
+ qd_message_content_t *mule_content = MSG_CONTENT(mule);
+ set_content(mule_content, buf2, chunk_size);
Review comment:
> Where is this set_content() function ?
Oops, found it, sorry
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR commented on pull request #874: DISPATCH-1799: test message body_data functions
Posted by GitBox <gi...@apache.org>.
ChugR commented on pull request #874:
URL: https://github.com/apache/qpid-dispatch/pull/874#issuecomment-708535948
Fixed at commit aef58e8
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org