Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fscrypt tests fail on non x86_64 arches (aarch64, ppc64le, s390x) #382

Open
Conan-Kudo opened this issue Sep 2, 2023 · 7 comments · Fixed by #384
Open

fscrypt tests fail on non x86_64 arches (aarch64, ppc64le, s390x) #382

Conan-Kudo opened this issue Sep 2, 2023 · 7 comments · Fixed by #384
Labels

Comments

@Conan-Kudo
Copy link

While packaging fscrypt for Fedora Linux, I encountered that the tests fail on non-x86_64 arches.

On those architectures, I get a variation of this error:

Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.WrCoy3
+ umask 022
+ cd /builddir/build/BUILD
+ cd fscrypt-0.3.4
+ LDFLAGS=' -X github.com/google/fscrypt/version=0.3.4'
+ GO_TEST_FLAGS='-buildmode pie -compiler gc'
+ GO_TEST_EXT_LD_FLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  '
+ go-rpm-integration check -i github.com/google/fscrypt -b /builddir/build/BUILD/fscrypt-0.3.4/_build/bin -s /builddir/build/BUILD/fscrypt-0.3.4/_build -V 0.3.4-1.fc40 -p /builddir/build/BUILDROOT/fscrypt-0.3.4-1.fc40.aarch64 -g /usr/share/gocode -r '.*example.*'
Testing    in: /builddir/build/BUILD/fscrypt-0.3.4/_build/src
         PATH: /builddir/build/BUILD/fscrypt-0.3.4/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/fscrypt-0.3.4/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags " -X github.com/google/fscrypt/version=0.3.4 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes  '"
      testing: github.com/google/fscrypt
github.com/google/fscrypt/actions
skipping integration test
ok  	github.com/google/fscrypt/actions	0.005s
github.com/google/fscrypt/actions
skipping integration test
ok  	github.com/google/fscrypt/actions	0.005s
github.com/google/fscrypt/cmd/fscrypt
PASS
ok  	github.com/google/fscrypt/cmd/fscrypt	0.007s
github.com/google/fscrypt/crypto
2023/09/02 22:48:55 WARNING: Truncating parallelism cost of 257 to 1
PASS
ok  	github.com/google/fscrypt/crypto	0.103s
github.com/google/fscrypt/crypto
2023/09/02 22:48:56 WARNING: Truncating parallelism cost of 257 to 1
PASS
ok  	github.com/google/fscrypt/crypto	0.105s
github.com/google/fscrypt/filesystem
2023/09/02 22:48:56 WARNING: "/tmp/fscrypt2504712535/file" is owned by uid 1000, but expected 4294967295 or 0
2023/09/02 22:48:56 ignoring mountpoint "/proc/filesystems" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/btrfs-control" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop-control" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop0" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop1" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop10" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop11" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop2" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop3" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop4" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop5" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop6" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop7" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop8" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/loop9" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/dev/mapper/control" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/run/host/os-release" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/etc/resolv.conf" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/proc/sys/kernel/random/boot_id" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/proc/sys/kernel/random/boot_id" because it is not a directory
2023/09/02 22:48:56 ignoring mountpoint "/proc/kmsg" because it is not a directory
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
--- FAIL: TestLoadSourceDevice (0.00s)
    mountpoint_test.go:112: mnt.Device wasn't set to source device
2023/09/02 22:48:56 ignoring mountpoint "/tmp/fscrypt_regfile2324297373" because it is not a directory
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line "a"
2023/09/02 22:48:56 ignoring invalid mountinfo line "a a a a a a a a a a a a a a a"
2023/09/02 22:48:56 ignoring invalid mountinfo line "a a a a a a a a a a a a - a a"
2023/09/02 22:48:56 ignoring invalid mountinfo line "15 0 BAD:3 / / rw,relatime shared:1 - ext4 /dev/root rw,data=ordered"
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
2023/09/02 22:48:56 ignoring invalid mountinfo line ""
FAIL
exit status 1
FAIL	github.com/google/fscrypt/filesystem	0.009s
error: Bad exit status from /var/tmp/rpm-tmp.WrCoy3 (%check)
    Bad exit status from /var/tmp/rpm-tmp.WrCoy3 (%check)

Full build logs:

@ebiggers
Copy link
Collaborator

ebiggers commented Sep 9, 2023

b928729 probably fixed this. Can you try the latest master branch?

@Conan-Kudo
Copy link
Author

Well, now POWER works, but IBM Z and AArch64 don't: https://koji.fedoraproject.org/koji/taskinfo?taskID=105965161

@ebiggers
Copy link
Collaborator

ebiggers commented Sep 9, 2023

So the tests do work on AArch64; I just tested it. You seem to be doing your builds in containers, and I think this failure is actually related to that. Is /sys mounted in your containers?

@ebiggers ebiggers reopened this Sep 9, 2023
@Conan-Kudo
Copy link
Author

I'm not sure... @nirik or @praiskup would be able to answer that confidently for the build system environments.

@nirik
Copy link

nirik commented Sep 9, 2023

It's mock using (default) systemd-nspawn container. /sys should be there...

@praiskup
Copy link

@nirik is right; rpmbuild in mock is wrapped with systemd-nspawn, and it provides it's own /sys (Mock actually pre-creates one as well, but nspawn overmounts it).

@praiskup
Copy link

Actually, there's a reported Copr issue that relates to /proc/sys. Is this /sys or /proc/sys related?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants