[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, 21 Jun 2018 19:34:23 +0000
with message-id <E1fW5Lb-000A8V-N4@fasolo.debian.org>
and subject line Bug#893391: fixed in libinput 1.11.1-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.1-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, 21 Jun 2018 22:14:02 +0300
Source: libinput
Binary: libinput10 libinput-bin libinput10-udeb libinput-dev libinput-tools
Architecture: source
Version: 1.11.1-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.1-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.
   * symbols: Updated.
Checksums-Sha1:
 a78d76169629f05fe6ccafdf8a19f8d8c78e1b72 2633 libinput_1.11.1-1.dsc
 22decba7e43b3fb0e76dedddd579e50ef6a53157 485064 libinput_1.11.1.orig.tar.xz
 de136c2638b0bfc3cecffc6f510d8186bd3b35f7 241 libinput_1.11.1.orig.tar.xz.asc
 9b81f860062322cda32e2b77b02ce25176114f78 8828 libinput_1.11.1-1.debian.tar.xz
 3c766a632d65a93f261aef9d58625ee2a86454b9 6169 libinput_1.11.1-1_source.buildinfo
Checksums-Sha256:
 eb723d755f1e5614efc17f471be23876703f6f6df634fa4178ef8eb9c5318df9 2633 libinput_1.11.1-1.dsc
 642e95aecc7a592c676cde5b4cfda6d2939d2e2f686a8edbbc369808e646f1fc 485064 libinput_1.11.1.orig.tar.xz
 b1ce38219ac152eeb80726d1d0b6bcdebf41610c9b8beaaf000a7822a9628af7 241 libinput_1.11.1.orig.tar.xz.asc
 642870ff6f23ff85ddee498094a3cc5fcc5b8653c8084212c74d64513398c00b 8828 libinput_1.11.1-1.debian.tar.xz
 93bb051e89f07d8693b143c2fa2761894dff744f34c8ceb4349f2b592a0290be 6169 libinput_1.11.1-1_source.buildinfo
Files:
 c11557d059dd0a6b558ba962edc78c59 2633 libs optional libinput_1.11.1-1.dsc
 4ebf3ceb1d7de9b171050a4a254d85bb 485064 libs optional libinput_1.11.1.orig.tar.xz
 0429d128a341066ffb5bb5abf406b8e1 241 libs optional libinput_1.11.1.orig.tar.xz.asc
 8f96b5141b93aced7d8840e77a136541 8828 libs optional libinput_1.11.1-1.debian.tar.xz
 9cd6d88ad6d6585f86bdb9dc8d1593f3 6169 libs optional libinput_1.11.1-1_source.buildinfo

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

iQIzBAEBCgAdFiEEdS3ifE3rFwGbS2Yjy3AxZaiJhNwFAlsr+V8ACgkQy3AxZaiJ
hNxTvQ/+J0hnJJY0q8z8uAAuJ8gzLmJEhULD4ouwNUP1pyZe1ccM++Odqmrj3Fnp
szaOwQyicajStcjvvrx1GA9QlSaAQgwLQP1/MB3WhW+js117xFLOTMMvDZpYy9WV
zS0PVsAfIcf4djIBbFyfotj3NuolxquiRHr15BOZpiB0SPPvvyfO/XmbHjuDD+9W
0T4rLyJjaPtUic5mzxcJAcKlkVovFeUq6Xz0U1ZCBIuUB86sDJDS69xr9Hx7ZxRz
Dm/se+QkkRxM5rlJ5W1dWtI/y0+0zL6eL+RTzF4nzNjGtWPjRBYK5G98uDep2FlH
H4ofmt0Ha8ZVNJujU+Fe20aUNcy1YV3HHJQL+S6YtC6kPDJeEFOUvRudJuSWuTwc
zlpQE9lhVAzXufWIpYvnZBSSVdAd0riKvGlO3Ahh2ZT/Ho3+jGsdHzXUadpWKMNA
PHjHnsNqgBCEs1qFcFDyPo07xo1fz0LV2V00eg2OwLGiLAU/8Y3J+dU2T5CVF9FV
MP7BILa+d6P8rpFihO1aAmWecS+RqI6AsP4DXAD4VgBzoziTG40jEqBnyAph3GqS
nCBI1gNt/7fq1KGH6bP5hS9UbTMdJ9AEmtfQzReZrv64yle7MuZ+VvA35pgTU83F
edDjFo7Nw7GAV8+zfgRo4bn1TKerC4AMz0uBKrDFyLFZT3u9sx4=
=JI9d
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: