This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] Add wcsmbs IFUNC tests


On Mon, Oct 15, 2012 at 01:17:42PM -0700, Roland McGrath wrote:
> > 	* wcsmbs/Makefile (ifunc-tests): New macro.
> > 	(tests-ifunc): Likewise.
> 
> They're called variables in GNU makefiles.
> 
> > +ifunc-tests = $(addprefix test-,$(strop-tests))
> > +tests-ifunc = $(addsuffix -ifunc,$(ifunc-tests))
> 
> Having these two variables with such similar names is confusing.
> ifunc-tests isn't any use at all.  Just do:
> 
> tests-ifunc := $(strop-tests:%=test-%-ifunc)

This is what I checked in.


H.J.
---
commit 228cfb018a162ad3df239f4cb7f2ed2368b6da5e
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Oct 19 22:13:34 2012 -0700

    Add wcsmbs IFUNC tests

diff --git a/ChangeLog b/ChangeLog
index de7470c..1fbb602 100644
--- 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.
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 7402ec9..37e379c 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -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
index 0000000..f550d51
--- /dev/null
+++ b/wcsmbs/test-wcschr-ifunc.c
@@ -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
index 0000000..bef97d9
--- /dev/null
+++ b/wcsmbs/test-wcscmp-ifunc.c
@@ -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
index 0000000..0e38971
--- /dev/null
+++ b/wcsmbs/test-wcscpy-ifunc.c
@@ -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
index 0000000..baac78f
--- /dev/null
+++ b/wcsmbs/test-wcslen-ifunc.c
@@ -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
index 0000000..28a5106
--- /dev/null
+++ b/wcsmbs/test-wcsrchr-ifunc.c
@@ -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
index 0000000..a6110b4
--- /dev/null
+++ b/wcsmbs/test-wmemcmp-ifunc.c
@@ -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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]