[v2,0/2] Add tests for strdup and strndup (BZ #30266)

Message ID 20230330145008.3035194-1-josimmon@redhat.com
Headers
Series Add tests for strdup and strndup (BZ #30266) |

Message

Joe Simmons-Talbott March 30, 2023, 2:50 p.m. UTC
  Copy strcpy and strncpy tests to strdup and strndup repectively.  Remove
tests that checked the surrounding bytes of the result as they are not needed.

Changes to v1: Since strdup and strndup are not ifuncs and likely won't
be, call them directly.  Use TEST_COMPARE_BLOB() rather than memcmp().
Clear up wording in a comment.

Joe Simmons-Talbott (2):
  strdup: Add tests (BZ #30266)
  strndup: Add tests (BZ #30266)

 string/Makefile       |   2 +
 string/test-strdup.c  | 241 +++++++++++++++++++++++++++++++++++++++
 string/test-strndup.c | 255 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 498 insertions(+)
 create mode 100644 string/test-strdup.c
 create mode 100644 string/test-strndup.c