From patchwork Thu Nov 3 23:37:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: 1/n: trans-mem: libitm runtime tests Date: Thu, 03 Nov 2011 13:37:29 -0000 From: Aldy Hernandez X-Patchwork-Id: 123531 Message-Id: <4EB325B9.7050105@redhat.com> To: Jakub Jelinek Cc: Jeff Law , gcc-patches On 11/03/11 17:36, Jakub Jelinek wrote: > On Thu, Nov 03, 2011 at 05:26:43PM -0500, Aldy Hernandez wrote: >>> I'm going to assume the tests themselves are good. It'd be nice if >>> they all stated what they were testing, but I don't consider that a >>> requirement. If the tests were written independently rather than >>> extracted from another blob of code, you may consider adding a >>> copyright notice to them. >> >> Hmm, we based a lot of the original skeleton from libgomp, and >> AFAICT only one test has a copyright notice: >> >> libgomp.c/sort-1.c >> >> If you feel strongly about this, I can add a copyright notice to >> every test, after I finish all the other recommendations elsewhere. > > The reason for the copyright notice in there is that at that time > I felt the test was already quite big, but looking at it now > there are many even bigger tests in libgomp testsuite. And most > of the libgomp tests (except for appendix-a/ tests) were written > independently. > In libstdc++-v3/testsuite it seems most of the tests have the notice > (including very small ones), elsewhere most of the tests don't have > anything at all. > So I would say if the test is really small, it isn't worth adding it > there, perhaps only for very large tests. > > Jakub Fair enough. Most of the tests are very small. For that matter, they are all smaller than sort-1.c. However, I have added copyright notices to some of them for good measure. Committing to branch. * testsuite/libitm.c/memcpy-1.c: Add copyright notice. * testsuite/libitm.c/memset-1.c: Same. * testsuite/libitm.c/c.exp: Same. * testsuite/lib/libitm-dg.exp: Same. * testsuite/lib/libitm.exp: Same. * testsuite/libitm.c++/c++.exp: Same. Index: testsuite/libitm.c/memcpy-1.c =================================================================== --- testsuite/libitm.c/memcpy-1.c (revision 180744) +++ testsuite/libitm.c/memcpy-1.c (working copy) @@ -1,3 +1,18 @@ +/* This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + /* Verify memcpy operation. */ #include Index: testsuite/libitm.c/memset-1.c =================================================================== --- testsuite/libitm.c/memset-1.c (revision 180744) +++ testsuite/libitm.c/memset-1.c (working copy) @@ -1,3 +1,18 @@ +/* This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ + /* Verify memcpy operation. */ #include Index: testsuite/libitm.c/c.exp =================================================================== --- testsuite/libitm.c/c.exp (revision 180744) +++ testsuite/libitm.c/c.exp (working copy) @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + if [info exists lang_library_path] then { unset lang_library_path unset lang_link_flags Index: testsuite/lib/libitm-dg.exp =================================================================== --- testsuite/lib/libitm-dg.exp (revision 180744) +++ testsuite/lib/libitm-dg.exp (working copy) @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + proc libitm-dg-test { prog do_what extra_tool_flags } { return [gcc-dg-test-1 libitm_target_compile $prog $do_what $extra_tool_flags] } Index: testsuite/lib/libitm.exp =================================================================== --- testsuite/lib/libitm.exp (revision 180744) +++ testsuite/lib/libitm.exp (working copy) @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + # Damn dejagnu for not having proper library search paths for load_lib. # We have to explicitly load everything that gcc-dg.exp wants to load. Index: testsuite/libitm.c++/c++.exp =================================================================== --- testsuite/libitm.c++/c++.exp (revision 180744) +++ testsuite/libitm.c++/c++.exp (working copy) @@ -1,3 +1,17 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + load_lib libitm-dg.exp global shlib_ext