Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMRSOCK API: Implement OMRAddrInfoNode Element Extraction Functions on Unix #4745

Closed
2 of 9 tasks
caohaley opened this issue Jan 22, 2020 · 0 comments
Closed
2 of 9 tasks

Comments

@caohaley
Copy link
Contributor

Working on Issue: #4102
/cc @rwy0717 @babsingh @mpirvu

Omrsock functions to be implemented:
omrsock_getaddrinfo_length, omrsock_getaddrinfo_family, omrsock_getaddrinfo_socktype, omrsock_getaddrinfo_protocol

Description

We will be implementing functions that can extract length, family, socktype, and protocol from OMRAddrInfoNode and from addrInfo of OMRAddrInfoNode.

OMRAddrInfoNode struct has the definition:

typedef struct OMRAddrInfoNode {
	/**
	 * Pointer to the first addrinfo node in listed list. Defined differently depending on the operating system. 
	 */
	omr_os_addrinfo *addrInfo;
	
	/**
	 * Number of addrinfo nodes in linked list.
	 */
	uint32_t length;
} OMRAddrInfoNode;

For Unix, addrInfo has the definition:

struct addrinfo {
	int ai_flags;
	int ai_family;
	int ai_socktype;
	int ai_protocol;
	socklen_t ai_addrlen;
	struct sockaddr *ai_addr;
	char *ai_canonname;
	struct addrinfo *ai_next;
};

Unix Progress Tracker

  • Implement omrsock_getaddrinfo_create_hints (and socket per thread buffer) PR:Added a per thread buffer and related tests for OMR socket API #4555

  • Implement OMRAddrInfoNode element extraction (omrsock_getaddrinfo_length, family, socktype, protocol)

  • Implementing omrsock_getaddrinfo

  • Implementing omrsock_socket

  • Implementing omrsock_bind and omrsock_listen

  • Implementing omrsock_connect and omrsock_accept

  • Implementing omrsock_send and receive

  • Implementing omrsock_sendto and recvfrom

  • Implementing omrsock_close

caohaley pushed a commit to caohaley/omr that referenced this issue Jan 22, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jan 22, 2020
Fixed the name of the argument to match similar functions

- Changed name from hints to handle for the omrsock_addrinfo_t pointer.

Issue: eclipse-omr#4745

Depends on PR: eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jan 22, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jan 22, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first one, addrInfo,
  is a pointer to the first addrinfo node in a linked list.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Jan 22, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 5, 2020
Fixed the name of the argument to match similar functions

- Changed name from hints to handle for the omrsock_addrinfo_t pointer.

Issue: eclipse-omr#4745

Depends on PR: eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 5, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 5, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Fixed the name of the argument to match similar functions

- Changed name from hints to handle for the omrsock_addrinfo_t pointer.

Issue: eclipse-omr#4745

Depends on PR: eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Fixed the name of the argument to match similar functions

- Changed name from hints to handle for the omrsock_addrinfo_t pointer.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Depends on PR:eclipse-omr#4555

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 6, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 11, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.
- Test cases also checks for overwriting of the hints per
  thread buffer, and see if it overwrites correctly.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
caohaley pushed a commit to caohaley/omr that referenced this issue Feb 14, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.
- Test cases also checks for overwriting of the hints per
  thread buffer, and see if it overwrites correctly.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
@caohaley caohaley closed this as completed Mar 9, 2020
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Fixed the name of the argument to match similar functions

- Changed name from hints to handle for the omrsock_addrinfo_t pointer.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Added a line in unix/omrsock.c to omrsock_getaddrinfo_create_hints

- Hints has the length value of 0 after memset setting Hints to be 0. However,
  it should be 1 because Hints structure technically has 1 addrinfo node, so
  it is modified to be 1 now.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
To extract length, family, socktype, protocol from addrInfo of OMRAddrInfoNode struct

- The OMRAddrInfoNode has two elements, which first element, named
  addrInfo, is a pointer to the first addrinfo node in a linked list
  of addrinfo nodes.
- The Unix addrinfo structs contains many elements which stores
  a variety of information about a socket address.
- Extracts unix addrinfo elements by passing in a pointer to a
  OMRAddrInfoNode and the index of which one of the linked list of
  addrinfo nodes to extract.
- Currently implemented the element extractions of what is needed
  to create a socket.

Issue: eclipse-omr#4745

Co-authored-by: Babneet Singh <sbabneet@ca.ibm.com>

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Made changes to descriptions of what the test cases test for

- Changed the first test name from per_thread_buffer_functionality
  to create_hints_and_element_extraction. Changed the second test
  from getaddrinfo_and_element_extraction to just testing
  getaddrinfo_and_freeaddrinfo.
- Changed descriptions of what the test cases will test.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
PushkarBettadpur pushed a commit to PushkarBettadpur/omr that referenced this issue Mar 13, 2020
Added test implementations for per_thread_buffer_functionality test

- Added implementations to first create a hints structure, which
  relies on the per thread buffer structure and functions.
- Added values to hints, which is stored by per thread buffer
  and the element getters retrieves the values and compare
  them to values inserted.
- Test case checks for if the correct error code has been returned
  in cases where there are errors such as invalid arguments.
- Test cases also checks for overwriting of the hints per
  thread buffer, and see if it overwrites correctly.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants