Merge ~vpa1977/ubuntu/+source/cryptsetup:lp1983522-cryptroot-lvm into ubuntu/+source/cryptsetup:ubuntu/devel

Proposed by Vladimir Petko
Status: Needs review
Proposed branch: ~vpa1977/ubuntu/+source/cryptsetup:lp1983522-cryptroot-lvm
Merge into: ubuntu/+source/cryptsetup:ubuntu/devel
Diff against target: 47 lines (+12/-5)
3 files modified
debian/changelog (+9/-0)
debian/tests/control (+1/-3)
debian/tests/utils/mock.pm (+2/-2)
Reviewer Review Type Date Requested Status
Canonical Server Pending
Review via email: mp+434021@code.launchpad.net

Description of the change

This merge proposal enables cryptsetup-lvm test for cryptsetup package.
The test did wait indefinitely for select() to return when trying to flush the console.

  * Fix cryptroot-lvm autopkgtest on Ubuntu. (LP: #1983522)
    - debian/tests/control: enable cryptroot-lvm
    - debian/tests/utils/mock.pm: return from consume() function if select()
      times out or fails

Please tag and sponsor

PPA: ppa:vpa1977/cryptsetup-review-comments

Steps to test:

The test should be passing in CI now:

https://autopkgtest.ubuntu.com/request.cgi/?release=lunar&arch=amd64&package=cryptsetup&ppa=vpa1977%2Fcryptsetup-review-comments&trigger=cryptsetup%2F2%3A2.5.0-6ubuntu3~ppa1

To post a comment you must log in.

Unmerged commits

3005ffc... by Vladimir Petko

enable cryptroot lvm

7e6e6ff... by Vladimir Petko

stop consuming if select() times out or fails

8f80106... by Vladimir Petko

stop consuming if select() times out or fails

fa9ef6c... by Vladimir Petko

2:2.5.0-6ubuntu2 (patches unapplied)

Imported using git-ubuntu import.

7054325... by Steve Langasek

2:2.5.0-6ubuntu1 (patches unapplied)

Imported using git-ubuntu import.

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 946f04c..9660ba4 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+cryptsetup (2:2.5.0-6ubuntu3~ppa1) lunar; urgency=medium
7+
8+ * Fix cryptroot-lvm autopkgtest on Ubuntu. (LP: #1983522)
9+ - debian/tests/control: enable cryptroot-lvm
10+ - debian/tests/utils/mock.pm: return from consume() function if select()
11+ times out or fails
12+
13+ -- Vladimir Petko <vladimir.petko@canonical.com> Fri, 02 Dec 2022 15:53:42 +1300
14+
15 cryptsetup (2:2.5.0-6ubuntu2) lunar; urgency=medium
16
17 * Fix cryptroot-* autopkgtests on Ubuntu. (LP: #1983522)
18diff --git a/debian/tests/control b/debian/tests/control
19index 729d905..0b7e9be 100644
20--- a/debian/tests/control
21+++ b/debian/tests/control
22@@ -56,9 +56,7 @@ Tests: initramfs-hook
23 Depends: cryptsetup-initramfs, e2fsprogs, zstd
24 Restrictions: allow-stderr, needs-root, isolation-machine
25
26-# cryptroot-lvm test is disabled - it hangs in CI
27-#Tests: cryptroot-lvm, cryptroot-legacy
28-Tests: cryptroot-legacy
29+Tests: cryptroot-lvm, cryptroot-legacy
30 # Only dependencies required to set the VM here are listed here;
31 # cryptsetup is not listed since we only install it in the VM.
32 Depends: cryptsetup-bin,
33diff --git a/debian/tests/utils/mock.pm b/debian/tests/utils/mock.pm
34index d412d12..2425d87 100644
35--- a/debian/tests/utils/mock.pm
36+++ b/debian/tests/utils/mock.pm
37@@ -106,8 +106,8 @@ sub consume($) {
38
39 while(unpack("b*", $RBITS) != 0) {
40 my $rout = $RBITS;
41- while (select($rout, undef, undef, undef) == -1) {
42- die "select: $!" unless $! == EINTR; # try again immediately if select(2) was interrupted
43+ if (select($rout, undef, undef, 1) == -1) {
44+ return;
45 }
46 read_data($rout);
47 if (length($$buffer) == 0) {

Subscribers

People subscribed via source and target branches