From 0ada181aa1a3a675a1d189744429665e0f4cb301 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 22 Nov 2020 21:02:59 -0600 Subject: gnu: ocaml-cairo2: Patch test phase. * gnu/local.mk (ocaml-cairo2-caml_ba_array_fix.patch): Add ref. * gnu/packages/ocaml.scm (ocaml-cairo2): Utilize patch. * gnu/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch: Add file. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 60155b0d3b..f0a5560b8f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1392,6 +1392,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ + %D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ %D%/packages/patches/ocaml-Add-a-.file-directive.patch \ %D%/packages/patches/ocaml-enable-ocamldoc-reproducibility.patch \ -- cgit v1.2.3 From 2bf502138c9c8cad945866061772fe0e1f4b7175 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 23 Nov 2020 05:06:08 +0100 Subject: gnu: lsof: Make test failures fatal. * gnu/packages/lsof.scm (lsof)[source]: Add patch to make test suite failures stop the build. * gnu/packages/patches/lsof-fatal-test-failures.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lsof.scm | 4 +- .../patches/lsof-fatal-test-failures.patch | 58 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lsof-fatal-test-failures.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f0a5560b8f..f105f559f7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1313,6 +1313,7 @@ dist_patch_DATA = \ %D%/packages/patches/lrcalc-includes.patch \ %D%/packages/patches/lrzip-CVE-2017-8842.patch \ %D%/packages/patches/lsh-fix-x11-forwarding.patch \ + %D%/packages/patches/lsof-fatal-test-failures.patch \ %D%/packages/patches/lua-CVE-2014-5461.patch \ %D%/packages/patches/lua-pkgconfig.patch \ %D%/packages/patches/lua51-liblua-so.patch \ diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 0421ca7e9d..77d93e99c7 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -24,6 +24,7 @@ #:use-module (guix packages) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (gnu packages) #:use-module (gnu packages groff) #:use-module (gnu packages perl)) @@ -39,7 +40,8 @@ (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")))) + (base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp")) + (patches (search-patches "lsof-fatal-test-failures.patch")))) (build-system gnu-build-system) (native-inputs `(("groff" ,groff) ; for soelim diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch b/gnu/packages/patches/lsof-fatal-test-failures.patch new file mode 100644 index 0000000000..e874ba6ad4 --- /dev/null +++ b/gnu/packages/patches/lsof-fatal-test-failures.patch @@ -0,0 +1,58 @@ +From: Tobias Geerinckx-Rice +Date: Mon, 23 Nov 2020 05:36:53 +0100 +Subject: [PATCH] gnu: lsof: Make test failures fatal. + +Submitted upstream[0]. + +[0]: https://github.com/lsof-org/lsof/pull/144 + +diff --git a/tests/Makefile b/tests/Makefile +index 08574a0..2923bb8 100644 +--- a/tests/Makefile ++++ b/tests/Makefile +@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + exit 1 ;\ + fi + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Basic test:"; \ + ./${BASTST}; \ +@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC + echo "Suggestion: try the optional tests: \"make opt\""; \ + echo ""; \ + fi; \ +- fi; +- @rm -f config.LT* ++ fi; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + auto: ckDB silent FRC + +@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags + + opt: ${CKTSTDB} ${OPTTST} FRC + @rm -f config.LT* +- -@err=0; \ ++ @err=0; \ + echo ""; \ + echo "Optional tests:"; \ + for i in ${OPTTST}; do \ +@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC + else \ + echo "All optional tests succeeded."; \ + fi; \ +- echo ""; +- @rm -f config.LT* ++ echo ""; \ ++ rm -f config.LT*; \ ++ if [ $$err -ne 0 ]; then \ ++ exit 1; \ ++ fi + + optional: opt + -- cgit v1.2.3 From b1aac582caee711020c078217c58b15aeeef550e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 23 Nov 2020 09:44:57 +0200 Subject: gnu: python-pydot: Run tests. * gnu/packges/graphviz.scm (python-pydot)[source]: Add patch. [arguments]: Override check phase. [native-inputs]: Add graphviz. * gnu/packages/patches/python-pydot-regression-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/graphviz.scm | 18 ++++- .../patches/python-pydot-regression-test.patch | 79 ++++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-pydot-regression-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f105f559f7..2bde6e604b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1532,6 +1532,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ + %D%/packages/patches/python-pydot-regression-test.patch \ %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index bd70c87c9a..86f20bf23f 100644 --- a/gnu/packages/graphviz.scm +++ b/gnu/packages/graphviz.scm @@ -32,6 +32,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages check) @@ -331,11 +332,24 @@ can be used either as a standalone application, or as a Python library.") (uri (pypi-uri "pydot" version)) (sha256 (base32 - "00az4cbf8bv447lkk9xi6pjm7gcc7ia33y4pm71fwfwis56rv76l")))) + "00az4cbf8bv447lkk9xi6pjm7gcc7ia33y4pm71fwfwis56rv76l")) + (patches (search-patches "python-pydot-regression-test.patch")))) (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + ;; Taken from .travis.yaml + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (with-directory-excursion "test" + (invoke "python" "pydot_unittest.py"))) + #t))))) (native-inputs ;; For tests. - `(("python-chardet" ,python-chardet))) + `(("graphviz" ,graphviz) + ("python-chardet" ,python-chardet))) (propagated-inputs `(("python-pyparsing" ,python-pyparsing))) (home-page "https://github.com/erocarrera/pydot") diff --git a/gnu/packages/patches/python-pydot-regression-test.patch b/gnu/packages/patches/python-pydot-regression-test.patch new file mode 100644 index 0000000000..d2f0f5996e --- /dev/null +++ b/gnu/packages/patches/python-pydot-regression-test.patch @@ -0,0 +1,79 @@ +This patch is taken from the upstream repository +https://github.com/pydot/pydot/commit/a10ced4d132361027a545a471af4541dea8c5cf5.patch +It should be included in the 1.4.2 release. + + +From a10ced4d132361027a545a471af4541dea8c5cf5 Mon Sep 17 00:00:00 2001 +From: Peter Nowee +Date: Wed, 26 Jun 2019 15:43:38 +0800 +Subject: [PATCH] Fix multi.dot Graphviz regression test + +Commit d6602ad of 2018-12-01 fixed the regression test broken by commit +2d55978 of 2016-07-01. This revealed that `test/graphs/multi.dot` was +failing. + +`multi.dot` was introduced in commit 2b3f088 of 2010-11-07 together +with many of the other tests still here today. It has not been touched +since. It is a DOT-file containing two digraphs. The regression test +compares the JPEG images rendered from the DOT-file by pydot with those +rendered by Graphviz's dot directly. + +Commit 66734d2 of 2016-07-01 is the actual cause of the failure. It +changed one of the render methods of the regression test, +`_render_with_pydot`, from calculating a single hash for all the JPEG +images to calculating separate hashes for each JPEG image and then +concatenating those hashes in one long string. The other render method, +`_render_with_graphviz`, still calculates a single hash over all data. +For DOT-files that generate only one image the end result is the same, +but because `multi.dot` has two graphs, it produces two images and this +leads to comparing a string of two hashes with one single hash. + +I do not think the change in generating the hash was intentional, for +the following reasons: +- Commit 66734d2 states that its purpose was to adapt the test to an + API change in pydot. It does not mention a deliberate choice to + change the testing method. +- There was no effort to change `_render_with_graphviz` to also produce + multiple hashes. +- Except for easier debugging in case of a failing test with multiple + images (AFAICT, only `multi.dot`), I do not see much added benefit in + checking a concatenation of the hashes of all images vs. checking one + hash of all images together: In both cases the test will fail if one + or more images is rendered differently. +- Given that there were many commits authored that same hour, including + commit 2d55978 which broke the regression tests, I suspect the author + did not run the tests for each individual commit, but only at the end + of that batch, and was therefore also not alerted of this change by + the test suite. + +Assuming that the change was not intended, this commit will now revert +`_render_with_pydot` to the old behavior of calculating a single hash +from all JPEG image data. + +Tested with Debian 9.9, Graphviz 2.38.0-17, Python 2.7.13-2 and 3.5.3-1. + +Fixes https://github.com/pydot/pydot/issues/204. +--- + test/pydot_unittest.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/pydot_unittest.py b/test/pydot_unittest.py +index 881ee16..64aa856 100644 +--- a/test/pydot_unittest.py ++++ b/test/pydot_unittest.py +@@ -194,11 +194,11 @@ def _render_with_graphviz(self, filename, encoding): + + def _render_with_pydot(self, filename, encoding): + c = pydot.graph_from_dot_file(filename, encoding=encoding) +- sha = '' ++ jpe_data = bytearray() + for g in c: +- jpe_data = g.create(prog=TEST_PROGRAM, format='jpe', encoding=encoding) +- sha += sha256(jpe_data).hexdigest() +- return sha ++ jpe_data.extend(g.create(prog=TEST_PROGRAM, format='jpe', ++ encoding=encoding)) ++ return sha256(jpe_data).hexdigest() + + def test_my_regression_tests(self): + path = os.path.join(test_dir, TESTS_DIR_1) -- cgit v1.2.3 From ba902a15987b5ea2cd7adf2487229c2fe444931c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 23 Nov 2020 19:22:00 +0100 Subject: gnu: eigen: Add upstream bugfix patch. This fixes the build of nanopolish, imp, and others. Reported by apteryx in #guix. * gnu/packages/algebra.scm (eigen)[source]: Add patch. * gnu/packages/patches/eigen-remove-openmp-error-counting.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/algebra.scm | 3 +- .../eigen-remove-openmp-error-counting.patch | 64 ++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/eigen-remove-openmp-error-counting.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2bde6e604b..14b626c600 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -935,6 +935,7 @@ dist_patch_DATA = \ %D%/packages/patches/ecl-16-format-directive-limit.patch \ %D%/packages/patches/ecl-16-ignore-stderr-write-error.patch \ %D%/packages/patches/ecl-16-libffi.patch \ + %D%/packages/patches/eigen-remove-openmp-error-counting.patch \ %D%/packages/patches/eigen-stabilise-sparseqr-test.patch \ %D%/packages/patches/einstein-build.patch \ %D%/packages/patches/elfutils-tests-ptrace.patch \ diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 1c485a3f07..5b391449a0 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -1017,7 +1017,8 @@ Optional thin wrappers allow usage of the library from other languages.") (base32 "1vxrsncfnkyq6gwxpsannpryp12mk7lc8f42ybvz3saf7icwc582")) (file-name (string-append name "-" version ".tar.bz2")) - (patches (search-patches "eigen-stabilise-sparseqr-test.patch")) + (patches (search-patches "eigen-remove-openmp-error-counting.patch" + "eigen-stabilise-sparseqr-test.patch")) (modules '((guix build utils))) (snippet ;; There are 3 test failures in the "unsupported" directory, diff --git a/gnu/packages/patches/eigen-remove-openmp-error-counting.patch b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch new file mode 100644 index 0000000000..556474e8b3 --- /dev/null +++ b/gnu/packages/patches/eigen-remove-openmp-error-counting.patch @@ -0,0 +1,64 @@ +From ef3cc72cb65e2d500459c178c63e349bacfa834f Mon Sep 17 00:00:00 2001 +From: Luke Peterson +Date: Thu, 8 Oct 2020 12:16:53 -0700 +Subject: [PATCH] Remove error counting in OpenMP parallelize_gemm + +This resolves a compilation error associated with +Eigen::eigen_assert_exception. It also eliminates the counting of +exceptions that may occur in the OpenMP parallel section. If an +unhandled exception occurs in this section, the behavior is non-conforming +according to the OpenMP specification. +--- + Eigen/src/Core/products/Parallelizer.h | 14 +++++--------- + test/CMakeLists.txt | 2 +- + 2 files changed, 6 insertions(+), 10 deletions(-) + +diff --git a/Eigen/src/Core/products/Parallelizer.h b/Eigen/src/Core/products/Parallelizer.h +index 67b2442b5..a3cc05b77 100644 +--- a/Eigen/src/Core/products/Parallelizer.h ++++ b/Eigen/src/Core/products/Parallelizer.h +@@ -132,8 +132,7 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + + ei_declare_aligned_stack_constructed_variable(GemmParallelInfo,info,threads,0); + +- int errorCount = 0; +- #pragma omp parallel num_threads(threads) reduction(+: errorCount) ++ #pragma omp parallel num_threads(threads) + { + Index i = omp_get_thread_num(); + // Note that the actual number of threads might be lower than the number of request ones. +@@ -152,14 +151,11 @@ void parallelize_gemm(const Functor& func, Index rows, Index cols, Index depth, + info[i].lhs_start = r0; + info[i].lhs_length = actualBlockRows; + +- EIGEN_TRY { +- if(transpose) func(c0, actualBlockCols, 0, rows, info); +- else func(0, rows, c0, actualBlockCols, info); +- } EIGEN_CATCH(...) { +- ++errorCount; +- } ++ if(transpose) ++ func(c0, actualBlockCols, 0, rows, info); ++ else ++ func(0, rows, c0, actualBlockCols, info); + } +- if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception()); + #endif + } + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0747aa6cb..b02577780 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -163,7 +163,7 @@ ei_add_test(constructor) + ei_add_test(linearstructure) + ei_add_test(integer_types) + ei_add_test(unalignedcount) +-if(NOT EIGEN_TEST_NO_EXCEPTIONS) ++if(NOT EIGEN_TEST_NO_EXCEPTIONS AND NOT EIGEN_TEST_OPENMP) + ei_add_test(exceptions) + endif() + ei_add_test(redux) +-- +GitLab + -- cgit v1.2.3