Merge ~liushuyu-011/ubuntu/+source/libzstd:ubuntu/devel into ubuntu/+source/libzstd:ubuntu/devel

Proposed by Zixing Liu
Status: Needs review
Proposed branch: ~liushuyu-011/ubuntu/+source/libzstd:ubuntu/devel
Merge into: ubuntu/+source/libzstd:ubuntu/devel
Diff against target: 102 lines (+38/-7)
6 files modified
debian/changelog (+6/-0)
debian/tests/control (+7/-7)
debian/tests/test-cmake (+7/-0)
debian/tests/ztest/cmake_i386 (+1/-0)
debian/tests/ztest/pkg-make/Makefile (+6/-0)
debian/tests/ztest/programs.toml (+11/-0)
Reviewer Review Type Date Requested Status
Steve Langasek (community) Needs Fixing
Lucas Kanashiro (community) Needs Information
git-ubuntu import Pending
Review via email: mp+438588@code.launchpad.net

Description of the change

This merge proposal fixes the tests under i386 using some workarounds but without skipping any of the tests.

To post a comment you must log in.
Revision history for this message
Jeremy BĂ­cha (jbicha) wrote :

Ubuntu's libzstd packaging is currently in sync with Debian. Could you propose this to Debian?

https://salsa.debian.org/pkg-rpm-team/libzstd

Revision history for this message
Simon Chopin (schopin) wrote :

Hi Zixing,

Thanks for the contribution.

Is this still needed? There's been a new sync from Debian on this package that addresses some test failures seemingly related to 32-bit ints.

If you still want this merged, it'd be nice to have a changelog entry, ideally giving some more context as to what was broken in the first place.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) :
review: Needs Information
Revision history for this message
Zixing Liu (liushuyu-011) wrote :

> Ubuntu's libzstd packaging is currently in sync with Debian. Could you propose this to Debian?

I think I will propose this to Debian.

> There's been a new sync from Debian on this package that addresses some test failures seemingly related to 32-bit ints.

This new sync did not fix the test failures with i386, where the compiler choice was incorrect.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you, Zixing. Since you're going to be working directly with the Debian maintainer, do you mind withdrawing/closing this MP? If you can't do that, then please remove the Ubuntu Sponsors review slot. Thanks.

Revision history for this message
Steve Langasek (vorlon) wrote :

Changes such as this do NOT need to go via Debian first. This is in the sponsorship queue to be uploaded to Ubuntu, and we should not be redirecting contributors to land such changes in Debian first, particularly when they concern architectural differences between Debian and Ubuntu (autopkgtests on i386 pass in Debian, and not in Ubuntu because i386 is a partial arch for us).

Our policy is to forward changes to Debian and try to reduce the delta from Debian where possible, not to block improving Ubuntu on getting agreement from Debian first.

review: Needs Fixing

Unmerged commits

ea0efdc... by Zixing Liu

d/tests: fix tests on i386

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 535bde4..be4e48b 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+libzstd (1.5.4+dfsg2-5ubuntu1) unstable; urgency=medium
7+
8+ * Fix the autopkgtest on i386 when running from a x86_64 host system
9+
10+ -- Zixing Liu <zixing.liu@canonical.com> Fri, 23 Jun 2023 13:50:34 -0600
11+
12 libzstd (1.5.4+dfsg2-5) unstable; urgency=medium
13
14 * Add the 0021-tests-newline patch to fix a very rarely occurring bug in
15diff --git a/debian/tests/control b/debian/tests/control
16index d656628..b9819b9 100644
17--- a/debian/tests/control
18+++ b/debian/tests/control
19@@ -6,19 +6,19 @@ Depends:
20 @,
21 build-essential,
22 pkgconf,
23- python3,
24- python3-click,
25- python3-typedload,
26+ python3:any,
27+ python3-click:all,
28+ python3-typedload:all,
29 Restrictions: allow-stderr
30 Features: test-name=build-pkg-config
31
32-Test-Command: env PYTHONPATH="$(pwd)/debian/tests/python" python3 -B -u -m check_build -c debian/tests/ztest/programs.toml -v -- cmake
33+Test-Command: "$(pwd)"/debian/tests/test-cmake
34 Depends:
35 @,
36 build-essential,
37 cmake,
38- python3,
39- python3-click,
40- python3-typedload,
41+ python3:any,
42+ python3-click:all,
43+ python3-typedload:all,
44 Restrictions: allow-stderr
45 Features: test-name=build-cmake
46diff --git a/debian/tests/test-cmake b/debian/tests/test-cmake
47new file mode 100755
48index 0000000..ec4391b
49--- /dev/null
50+++ b/debian/tests/test-cmake
51@@ -0,0 +1,7 @@
52+#!/bin/bash -e
53+
54+suffix=''
55+if [[ "$DEB_HOST_ARCH" = 'i386' ]]; then
56+ suffix='_i386'
57+fi
58+PYTHONPATH="$(pwd)/debian/tests/python" python3 -B -u -m check_build -c debian/tests/ztest/programs.toml -v -- cmake"$suffix"
59diff --git a/debian/tests/ztest/cmake_i386 b/debian/tests/ztest/cmake_i386
60new file mode 120000
61index 0000000..b6868d4
62--- /dev/null
63+++ b/debian/tests/ztest/cmake_i386
64@@ -0,0 +1 @@
65+cmake
66\ No newline at end of file
67diff --git a/debian/tests/ztest/pkg-make/Makefile b/debian/tests/ztest/pkg-make/Makefile
68index d2f343f..282a1b9 100644
69--- a/debian/tests/ztest/pkg-make/Makefile
70+++ b/debian/tests/ztest/pkg-make/Makefile
71@@ -27,6 +27,12 @@ LIBS+= ${LIBS_ZSTD}
72
73 RM?= rm -f --
74
75+ifeq (i386,${DEB_HOST_ARCH})
76+ CFLAGS += $(shell i386-linux-gnu-pkg-config --cflags libzstd)
77+ LIBS += $(shell i386-linux-gnu-pkg-config --libs libzstd)
78+ CC = i686-linux-gnu-gcc
79+endif
80+
81 all: ${PROG}
82
83 ${PROG}: ${OBJS}
84diff --git a/debian/tests/ztest/programs.toml b/debian/tests/ztest/programs.toml
85index e6a5854..fdae211 100644
86--- a/debian/tests/ztest/programs.toml
87+++ b/debian/tests/ztest/programs.toml
88@@ -17,3 +17,14 @@ executable = "ztest"
89 clean = [["make", "clean"]]
90 build = [["cmake", "."], ["make"]]
91 test = [["./ztest"]]
92+
93+[program.cmake_i386]
94+executable = "ztest"
95+
96+[program.cmake_i386.commands]
97+clean = [["make", "clean"]]
98+build = [
99+ ["cmake", ".", "-DCMAKE_C_COMPILER=i686-linux-gnu-gcc", "-DCMAKE_CXX_COMPILER=i686-linux-gnu-g++"],
100+ ["make"]
101+]
102+test = [["./ztest"]]

Subscribers

People subscribed via source and target branches