From 2b4e0e52622dee29ab33f37e515554459484e44cbc64acdf603c279a85040e3c Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 6 Mar 2018 14:09:53 +0000 Subject: [PATCH] Accepting request 583249 from home:Andreas_Schwab:Factory - testsuite-race.patch: fix race condition in testsuite OBS-URL: https://build.opensuse.org/request/show/583249 OBS-URL: https://build.opensuse.org/package/show/devel:tools/gperf?expand=0&rev=13 --- gperf.changes | 5 +++++ gperf.spec | 6 ++++-- testsuite-race.patch | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 testsuite-race.patch diff --git a/gperf.changes b/gperf.changes index 76bfa84..ea89169 100644 --- a/gperf.changes +++ b/gperf.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 6 09:15:05 UTC 2018 - schwab@suse.de + +- testsuite-race.patch: fix race condition in testsuite + ------------------------------------------------------------------- Thu Jan 5 15:07:45 UTC 2017 - mpluskal@suse.com diff --git a/gperf.spec b/gperf.spec index 1255363..cd1c0b9 100644 --- a/gperf.spec +++ b/gperf.spec @@ -1,7 +1,7 @@ # # spec file for package gperf # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,13 @@ Name: gperf Version: 3.1 Release: 0 Summary: A Compiler Tool for Generating Perfect Hash Functions -License: GPL-3.0+ +License: GPL-3.0-or-later Group: Development/Languages/C and C++ Url: https://gnu.org/software/gperf/ Source0: https://ftp.gnu.org/pub/gnu/gperf/gperf-%{version}.tar.gz Source1: https://ftp.gnu.org/pub/gnu/gperf/gperf-%{version}.tar.gz.sig Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=%{name}&download=1#/%{name}.keyring +Patch0: testsuite-race.patch BuildRequires: gcc-c++ Requires(post): %{install_info_prereq} Requires(preun): %{install_info_prereq} @@ -37,6 +38,7 @@ one probe into the data structure. %prep %setup -q +%patch0 -p1 %build %configure \ diff --git a/testsuite-race.patch b/testsuite-race.patch new file mode 100644 index 0000000..e160e2d --- /dev/null +++ b/testsuite-race.patch @@ -0,0 +1,32 @@ +Fix race condition in testsuite + +Move the Ada test from check-test to check-ada, where the aout binary is +being built. + + * tests/Makefile.in (check-test): Don't run aout test. + (check-ada): Run it here. + +Index: gperf-3.1/tests/Makefile.in +=================================================================== +--- gperf-3.1.orig/tests/Makefile.in ++++ gperf-3.1/tests/Makefile.in +@@ -86,6 +86,9 @@ check-ada: test.$(OBJEXT) + @echo "testing Ada predefined words, all items should be found in the set" + ./preout -v < $(srcdir)/adadefs.gperf | LC_ALL=C tr -d '\r' > ada-pred.out + diff $(srcdir)/ada-pred.exp ada-pred.out ++ @echo "only if, do, for, case, goto, else, while, and return should be found " ++ ./aout -v < $(srcdir)/c.gperf | $(POSTPROCESS_FOR_MINGW) > test-7.out ++ diff $(srcdir)/test-7.exp test-7.out + + check-modula3: test.$(OBJEXT) + $(GPERF) -k1,2,'$$' -I -o $(srcdir)/modula3.gperf > m3inset.c +@@ -170,9 +173,6 @@ check-test: + # prints out the help message + -$(GPERF) -h | $(POSTPROCESS_FOR_MINGW) > test-6.out + diff $(srcdir)/test-6.exp test-6.out +- @echo "only if, do, for, case, goto, else, while, and return should be found " +- ./aout -v < $(srcdir)/c.gperf | $(POSTPROCESS_FOR_MINGW) > test-7.out +- diff $(srcdir)/test-7.exp test-7.out + + # The following validates valid language syntax with different parameters. + # Works only with gcc and g++, and only on platforms where "gcc -ansi" is