]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Illumos regtest: memmem testacase update
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 26 Dec 2023 18:02:19 +0000 (19:02 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 26 Dec 2023 18:02:19 +0000 (19:02 +0100)
Like Darwin, Illumos memmem returns NULL if either length is 0.

memcheck/tests/memmem.c

index b8a055306da0485175f54a404962814873bc5a9a..a4f804f7f25aca6e7d460ab5343ea376c177c7e3 100644 (file)
@@ -24,7 +24,7 @@ main ()
 
   haystack = create_mem ("a");
   needle = create_mem ("a");
-#if defined(VGO_darwin)
+#if defined(VGO_darwin) || defined(VGO_solaris)
   /*
    * macOS manpage says
    * If big_len is smaller than little_len, if little_len is 0, if big_len is 0 or if
@@ -44,7 +44,7 @@ main ()
 
   haystack = create_mem ("abc");
   needle = create_mem ("bc");
-#if defined(VGO_darwin)
+#if defined(VGO_darwin) || defined(VGO_solaris)
   assert (memmem (haystack, 3, needle, 0) == NULL);
 #else
   assert (memmem (haystack, 3, needle, 0) == haystack);