From ff3da384343abe31f48061b8c080aa9cdceb16594e6a551133177631792fbe28 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 14 Nov 2023 15:20:16 +0000 Subject: [PATCH] - Add skip-tests_big-endian.patch to skip little-endian-only tests (bsc#1216930). OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=88 --- lua54.changes | 6 ++++++ lua54.spec | 3 +++ skip-tests_big-endian.patch | 27 +++++++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 skip-tests_big-endian.patch diff --git a/lua54.changes b/lua54.changes index 29f8b34..c1cc414 100644 --- a/lua54.changes +++ b/lua54.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 14 15:10:19 UTC 2023 - Matej Cepl + +- Add skip-tests_big-endian.patch to skip little-endian-only + tests (bsc#1216930). + ------------------------------------------------------------------- Mon May 29 16:23:16 UTC 2023 - Callum Farmer diff --git a/lua54.spec b/lua54.spec index 840bd0d..75275b0 100644 --- a/lua54.spec +++ b/lua54.spec @@ -43,6 +43,9 @@ Patch1: attrib_test.patch Patch2: files_test.patch Patch3: main_test.patch Patch6: shared_link.patch +# PATCH-FIX-UPSTREAM skip-tests_big-endian.patch bsc#1216930 mcepl@suse.com +# patch out little-endian-only test +Patch7: skip-tests_big-endian.patch Requires(post): update-alternatives Requires(postun):update-alternatives Provides: lua = %{version} diff --git a/skip-tests_big-endian.patch b/skip-tests_big-endian.patch new file mode 100644 index 0000000..b4cdbd7 --- /dev/null +++ b/skip-tests_big-endian.patch @@ -0,0 +1,27 @@ +--- + testes/calls.lua | 14 -------------- + 1 file changed, 14 deletions(-) + +--- a/testes/calls.lua ++++ b/testes/calls.lua +@@ -342,20 +342,6 @@ do -- another bug (in 5.4.0) + end + + +-do -- another bug (since 5.2) +- -- corrupted binary dump: list of upvalue names is larger than number +- -- of upvalues, overflowing the array of upvalues. +- local code = +- "\x1b\x4c\x75\x61\x54\x00\x19\x93\x0d\x0a\x1a\x0a\x04\x08\x08\x78\x56\z +- \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x77\x40\x00\x86\x40\z +- \x74\x65\x6d\x70\x81\x81\x01\x00\x02\x82\x48\x00\x02\x00\xc7\x00\x01\z +- \x00\x80\x80\x80\x82\x00\x00\x80\x81\x82\x78\x80\x82\x81\x86\x40\x74\z +- \x65\x6d\x70" +- +- assert(load(code)) -- segfaults in previous versions +-end +- +- + x = string.dump(load("x = 1; return x")) + a = assert(load(read1(x), nil, "b")) + assert(a() == 1 and _G.x == 1)