[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#893391: marked as done (libinput: please add an autopkgtest smoke-test for the library)



Your message dated Thu, 07 Jun 2018 07:49:49 +0000
with message-id <E1fQpg5-0002lN-Vm@fasolo.debian.org>
and subject line Bug#893391: fixed in libinput 1.11.0-1
has caused the Debian Bug report #893391,
regarding libinput: please add an autopkgtest smoke-test for the library
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
893391: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893391
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: libinput
Version: 1.10.3-1
Severity: wishlist
Tags: patch

Some common failure modes of library packaging (particularly around
dependencies or transitions) result in inability to link dependent
binaries to the library. To catch mistakes before they become
release-critical, it's useful to have an autopkgtest that checks that
the library can work at all, even if it's a library that is awkward or
impossible to test more thoroughly.

I attach a simple autopkgtest that checks that libinput-dev can be
initialized and uninitialized, loosely based on one that I added to dbus.

I included a test for static linking, but libinput-dev doesn't seem to
contain libinput.a, so I've assumed that linking to it statically is
unsupported and left that part of the test commented out.

Note that I don't really know this library, so if I'm using it
incorrectly or in ways that are not what its upstream developers would
recommend, the test might need adjusting. It seems to work locally though.

If libinput_path_create_context() cannot legitimately fail (even in a
chroot or container running as an unprivileged user) then you might
want to make the test abort() if that call fails.

Thanks,
    smcv
>From f850c612b25fe8964ff900447f444698578572cc Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Sun, 18 Mar 2018 14:24:20 +0000
Subject: [PATCH] Add a simple compile/link/execute smoke-test for libinput-dev

This verifies that it is possible to link to libinput, and would have
detected #893067.

Signed-off-by: Simon McVittie <smcv@debian.org>
---
 debian/tests/build   | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/tests/control |  2 ++
 2 files changed, 62 insertions(+)
 create mode 100755 debian/tests/build
 create mode 100644 debian/tests/control

diff --git a/debian/tests/build b/debian/tests/build
new file mode 100755
index 00000000..bacd15e1
--- /dev/null
+++ b/debian/tests/build
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+exec 2>&1
+set -eux
+
+cd "${AUTOPKGTEST_TMP:-"${ADTTMP}"}"
+
+echo "1..2"
+
+cat > simple.c <<'EOF'
+#include <libinput.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+static int
+my_open (const char *path, int flags, void *user_data)
+{
+  return open (path, flags);
+}
+
+static void
+my_close (int fd, void *user_data)
+{
+  close (fd);
+}
+
+static struct libinput_interface iface = { my_open, my_close };
+
+int
+main (void)
+{
+  struct libinput *ctx;
+
+  ctx = libinput_path_create_context (&iface, NULL);
+
+  if (ctx)
+    libinput_unref (ctx);
+
+  return 0;
+}
+EOF
+
+gcc -o dynamic simple.c $(pkg-config --cflags --libs libinput)
+echo "ok 1 - compile dynamic executable"
+test -x dynamic
+./dynamic
+echo "ok 2 - run dynamic executable"
+
+# This should also be tested if linking statically to libinput is supported
+#gcc -static -o static simple.c $(pkg-config --static --cflags --libs libinput)
+#echo "ok 3 - compile static executable"
+#test -x static
+#./static
+#echo "ok 4 - run static executable"
+
+echo "# everything seems OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 00000000..493aaf0f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build
+Depends: build-essential, libinput-dev
-- 
2.16.2


--- End Message ---
--- Begin Message ---
Source: libinput
Source-Version: 1.11.0-1

We believe that the bug you reported is fixed in the latest version of
libinput, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 893391@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Timo Aaltonen <tjaalton@debian.org> (supplier of updated libinput package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 07 Jun 2018 10:25:25 +0300
Source: libinput
Binary: libinput10 libinput-bin libinput10-udeb libinput-dev libinput-tools
Architecture: source
Version: 1.11.0-1
Distribution: unstable
Urgency: medium
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Changed-By: Timo Aaltonen <tjaalton@debian.org>
Description:
 libinput-bin - input device management and event handling library - udev quirks
 libinput-dev - input device management and event handling library - development
 libinput-tools - input device management and event handling library - command line
 libinput10 - input device management and event handling library - shared libra
 libinput10-udeb - input device management and event handling library - shared libra (udeb)
Closes: 893391
Launchpad-Bugs-Fixed: 1746740 1761365 1764097
Changes:
 libinput (1.11.0-1) unstable; urgency=medium
 .
   * New upstream release. (LP: #1764097, #1746740, #1761365)
   * tests: Add a simple smoketest to check that linking to libinput
     works. Thanks, Simon McVittie! (Closes: #893391)
   * watch: Update upstream git repo location.
Checksums-Sha1:
 c2432064cee4c98b5789a041af8b207406c5e7d3 2633 libinput_1.11.0-1.dsc
 5c242a99c7e4c678e15f7bd100f94fa338b81240 485976 libinput_1.11.0.orig.tar.xz
 a3ef211e4be00d0ca94390ffed0ff152532fcf9c 241 libinput_1.11.0.orig.tar.xz.asc
 95357f1bf04e66a50fae15175d45b786cd0e2992 8816 libinput_1.11.0-1.debian.tar.xz
 ff055b42d6e18ff4e241d41778aeb31e805dfccf 6082 libinput_1.11.0-1_source.buildinfo
Checksums-Sha256:
 3956c4fd67e7ca2f5cddef268d530d158ea7195f5c64f0495959883477b73ad6 2633 libinput_1.11.0-1.dsc
 64a36c4f826f4b5d473bf2cb803122f96390a18243ec810f2ce8ac5076a0bc12 485976 libinput_1.11.0.orig.tar.xz
 7b1169cfd9b59a2af6a4aea6cea9afc2cce0800b828c4ef06ac0638919032fec 241 libinput_1.11.0.orig.tar.xz.asc
 8dacd521df2f2d61fb8d74b06f86e98ac4190a0cb9595bfdf5247caec3fe536f 8816 libinput_1.11.0-1.debian.tar.xz
 2078c3e330cf2409776d299240d3637b37bde26abbbcbc3bcf597085867b11f8 6082 libinput_1.11.0-1_source.buildinfo
Files:
 6ba8e915e2e21147c09d4eba40142a00 2633 libs optional libinput_1.11.0-1.dsc
 a182dab52f4d33bc1ef50668dcf53cc6 485976 libs optional libinput_1.11.0.orig.tar.xz
 5624adca2b57ea19d2f636e8c2d3dffb 241 libs optional libinput_1.11.0.orig.tar.xz.asc
 05a754d20d53defe02d7d2e32fd0642d 8816 libs optional libinput_1.11.0-1.debian.tar.xz
 860709281f7838e152f724ecd562d4e9 6082 libs optional libinput_1.11.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAlsY4SMACgkQy3AxZaiJ
hNyRyg/8CdHsCF2NNSih+hacCVlhXCtHgwkgCQ0+h3sZCj8iGYupRD/zDYOqQAdN
ANsPbZAZx2ntepaRR1vpWFzwng0MII8gtfQtkkGz5ehdxWar3zgSef9mW/uowbB7
jnf1uPYd4Mpoeb/+VSAoC4F7ulIfmCJDXIZ207culuEpJZ1Agxq3F+58zhF7BSfx
M5XE8YnNwjQ/ZpxVvG82JIz/rmKhcZuJoOkufgfESmFRqfCC/VH1Sap5cDDtnSdh
jnq+lEgEgbQEfCiBOyCtN+taVl5VIBd6UtYkMuI5pc+JBIBzgkdg5wexyXGJXmvc
lX46D6nvTK+cRStA8gAKq67i71iTPgKu4VRYVaZUtk6sWrc5YQimVHM6UMv3afFT
OMDUtxEI2b87GNmZagrGVUnKFrDworXZt5k29XOwWPemP03b+FsO9pZdCNLCXxwR
tHYuwFzqhUPRdrgUKtsr4erJA6pD+XebVGO56ygY2B5LzreZf/gcLhYLPEEPDw/s
IZYidn2ilH7g8ZnUP0XTY4LrqBKBB6XdZv2iHGYE3ftTc/w2J81o0LPrEklxwFms
ZegnddQBVjJMwiWljg4SdG4e8HF3xnUZ2iRSaITd1/jC/pj3p5Pp/tR++6aL8q9Q
1gMgM6+FDI+MV1W7+zYGV8gHtmYGIcdTEw8z18BRToqPVeRHqBw=
=/Bxk
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: