From 0c76d6df2a53926d7d66dfa5e48046f4fb513b8c0a805c13004faddf1efa7dd1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 29 Oct 2018 15:31:03 +0000 Subject: [PATCH] Accepting request 645313 from home:mcepl:work - Add 7a76a381534012af4790e815140d1538510b7d93.patch to fix bsc#1111657 (we need use to proper void returning function not to corrupt memory in tests). OBS-URL: https://build.opensuse.org/request/show/645313 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=57 --- ...a381534012af4790e815140d1538510b7d93.patch | 29 +++++++++++++++++++ python-cffi.changes | 7 +++++ python-cffi.spec | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 7a76a381534012af4790e815140d1538510b7d93.patch diff --git a/7a76a381534012af4790e815140d1538510b7d93.patch b/7a76a381534012af4790e815140d1538510b7d93.patch new file mode 100644 index 0000000..f09662d --- /dev/null +++ b/7a76a381534012af4790e815140d1538510b7d93.patch @@ -0,0 +1,29 @@ +# HG changeset patch +# User Armin Rigo +# Date 1536088314 -7200 +# Node ID 7a76a381534012af4790e815140d1538510b7d93 +# Parent ef09637b23147f63a7d3fda628fa1704c97f1c72 +Issue #382 + +Second fix attempt, thanks Adam + +--- a/testing/cffi0/test_function.py ++++ b/testing/cffi0/test_function.py +@@ -45,14 +45,14 @@ class TestFunction(object): + assert x != math.sin(1.23) # rounding effects + assert abs(x - math.sin(1.23)) < 1E-6 + +- def test_sin_no_return_value(self): ++ def test_lround_no_return_value(self): + # check that 'void'-returning functions work too + ffi = FFI(backend=self.Backend()) + ffi.cdef(""" +- void sin(double x); ++ void lround(double x); + """) + m = ffi.dlopen(lib_m) +- x = m.sin(1.23) ++ x = m.lround(1.23) + assert x is None + + def test_dlopen_filename(self): diff --git a/python-cffi.changes b/python-cffi.changes index 87659af..8cad3b2 100644 --- a/python-cffi.changes +++ b/python-cffi.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 29 16:10:03 CET 2018 - mcepl@suse.com + +- Add 7a76a381534012af4790e815140d1538510b7d93.patch to fix + bsc#1111657 (we need use to proper void returning function not + to corrupt memory in tests). + ------------------------------------------------------------------- Wed Oct 17 18:53:19 CEST 2018 - mcepl@suse.com diff --git a/python-cffi.spec b/python-cffi.spec index 624bdc5..907ce79 100644 --- a/python-cffi.spec +++ b/python-cffi.spec @@ -30,6 +30,8 @@ Source1: python-cffi-rpmlintrc Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch # https://bitbucket.org/cffi/cffi/issues/378 Patch1: 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch +# https://bitbucket.org/cffi/cffi/issues/382/test_sin_no_return_value-violates-calling +Patch2: 7a76a381534012af4790e815140d1538510b7d93.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pycparser} BuildRequires: %{python_module pytest}