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

Joe Simmons-Talbott josimmon@redhat.com
Thu Mar 30 14:50:06 GMT 2023


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

-- 
2.39.2



More information about the Libc-alpha mailing list