github.com/meulengracht/snapd@v0.0.0-20210719210640-8bde69bcc84e/packaging/debian-sid/patches/0003-cmd-snap-seccomp-skip-tests-that-use-m32.patch (about)

     1  From 3b9980d774be5ae8458ed006f712e584ae0ce97d Mon Sep 17 00:00:00 2001
     2  From: Zygmunt Krynicki <me@zygoon.pl>
     3  Date: Thu, 17 Jan 2019 17:21:22 +0200
     4  Subject: [PATCH 3/9] cmd/snap-seccomp: skip tests that use -m32
     5  
     6  Apparently Debian's amd64 compiler somehow cannot compile -m32 mode
     7  binaries. The compilation error is:
     8  
     9  	multipass@debian-10:~/packaging/snapd/cmd/snap-seccomp$ go test
    10  	cannot build multi-lib syscall runner: exit status 1
    11  	In file included from /usr/include/errno.h:25,
    12  			 from /tmp/check-3806730340354206876/1/seccomp_syscall_runner.c:3:
    13  	/usr/include/features.h:424:12: fatal error: sys/cdefs.h: No such file or directory
    14  	 #  include <sys/cdefs.h>
    15  		    ^~~~~~~~~~~~~
    16  	compilation terminated.
    17  	OK: 2 passed, 11 skipped
    18  
    19  I was unable to resolve this issue, let's disable this test until we can get to
    20  the bottom of it.
    21  
    22  Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
    23  ---
    24   cmd/snap-seccomp/main_test.go | 8 ++++++++
    25   1 file changed, 8 insertions(+)
    26  
    27  Index: snapd/cmd/snap-seccomp/main_test.go
    28  ===================================================================
    29  --- snapd.orig/cmd/snap-seccomp/main_test.go
    30  +++ snapd/cmd/snap-seccomp/main_test.go
    31  @@ -192,6 +192,14 @@ func (s *snapSeccompSuite) SetUpSuite(c
    32   	// Ideally we would build for ppc64el->powerpc and arm64->armhf but
    33   	// it seems tricky to find the right gcc-multilib for this.
    34   	if arch.DpkgArchitecture() == "amd64" && s.canCheckCompatArch {
    35  +		// This test fails on Debian amd64
    36  +		// cannot build multi-lib syscall runner: exit status 1
    37  +		// In file included from /usr/include/errno.h:25,
    38  +		//                  from /tmp/check-3806730340354206876/1/seccomp_syscall_runner.c:3:
    39  +		// /usr/include/features.h:424:12: fatal error: sys/cdefs.h: No such file or directory
    40  +		//  #  include <sys/cdefs.h>
    41  +		//             ^~~~~~~~~~~~~
    42  +		c.Skip(`This test fails to build on Debian amd64`)
    43   		cmd = exec.Command(cmd.Args[0], cmd.Args[1:]...)
    44   		cmd.Args = append(cmd.Args, "-m32")
    45   		for i, k := range cmd.Args {