Add wcsmbs IFUNC tests
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 20 Oct 2012 05:13:34 +0000 (22:13 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 20 Oct 2012 05:13:34 +0000 (22:13 -0700)
ChangeLog
wcsmbs/Makefile
wcsmbs/test-wcschr-ifunc.c [new file with mode: 0644]
wcsmbs/test-wcscmp-ifunc.c [new file with mode: 0644]
wcsmbs/test-wcscpy-ifunc.c [new file with mode: 0644]
wcsmbs/test-wcslen-ifunc.c [new file with mode: 0644]
wcsmbs/test-wcsrchr-ifunc.c [new file with mode: 0644]
wcsmbs/test-wmemcmp-ifunc.c [new file with mode: 0644]

index de7470c..1fbb602 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-10-20  H.J. Lu  <hongjiu.lu@intel.com>
 
+       * wcsmbs/Makefile (tests-ifunc): New variable.
+       (tests): Add $(tests-ifunc).
+       * wcsmbs/test-wcschr-ifunc.c: New file.
+       * wcsmbs/test-wcscmp-ifunc.c: Likewise.
+       * wcsmbs/test-wcscpy-ifunc.c: Likewise.
+       * wcsmbs/test-wcslen-ifunc.c: Likewise.
+       * wcsmbs/test-wcsrchr-ifunc.c: Likewise.
+       * wcsmbs/test-wmemcmp-ifunc.c: Likewise.
+
        * string/Makefile (tests-ifunc): New variable.
        (tests): Add $(tests-ifunc).
        * string/test-memccpy.c (TEST_NAME): New macro.
index 7402ec9..37e379c 100644 (file)
@@ -45,6 +45,8 @@ strop-tests :=  wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
         tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
         tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
+tests-ifunc := $(strop-tests:%=test-%-ifunc)
+tests += $(tests-ifunc)
 
 include ../Rules
 
diff --git a/wcsmbs/test-wcschr-ifunc.c b/wcsmbs/test-wcschr-ifunc.c
new file mode 100644 (file)
index 0000000..f550d51
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcschr function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wcschr.c"
diff --git a/wcsmbs/test-wcscmp-ifunc.c b/wcsmbs/test-wcscmp-ifunc.c
new file mode 100644 (file)
index 0000000..bef97d9
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcscmp function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wcscmp.c"
diff --git a/wcsmbs/test-wcscpy-ifunc.c b/wcsmbs/test-wcscpy-ifunc.c
new file mode 100644 (file)
index 0000000..0e38971
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcscpy function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wcscpy.c"
diff --git a/wcsmbs/test-wcslen-ifunc.c b/wcsmbs/test-wcslen-ifunc.c
new file mode 100644 (file)
index 0000000..baac78f
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcslen function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wcslen.c"
diff --git a/wcsmbs/test-wcsrchr-ifunc.c b/wcsmbs/test-wcsrchr-ifunc.c
new file mode 100644 (file)
index 0000000..28a5106
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wcsrchr function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wcsrchr.c"
diff --git a/wcsmbs/test-wmemcmp-ifunc.c b/wcsmbs/test-wmemcmp-ifunc.c
new file mode 100644 (file)
index 0000000..a6110b4
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test and measure IFUNC implementations of wmemcmp function.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define TEST_IFUNC 1
+#include "test-wmemcmp.c"