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

2021.1 failing tests #2313

Closed
dvzrv opened this issue Mar 25, 2021 · 4 comments · Fixed by #2352
Closed

2021.1 failing tests #2313

dvzrv opened this issue Mar 25, 2021 · 4 comments · Fixed by #2352

Comments

@dvzrv
Copy link

dvzrv commented Mar 25, 2021

Hi! When packaging 2021.1 for Arch Linux I attempted to run the test session against the build.
Unfortunately 4 test runs (tests/test-symbols.sh, tests/test-signed-pull-summary.sh and sometimes also tests/test-remote-gpg-import.sh) still fail and it is unclear to me why.

This is the build log:
ostree-2021.1-build.log

Here are the log outputs of the tests:

tests/test-symbols.sh

++ dirname /build/ostree/src/ostree/tests/test-symbols.sh
+ . /build/ostree/src/ostree/tests/libtest.sh
+++ dirname /build/ostree/src/ostree/tests/test-symbols.sh
++ dn=/build/ostree/src/ostree/tests
++ '[' -n /build/ostree/src/ostree ']'
++ test_srcdir=/build/ostree/src/ostree/tests
++ '[' -n /build/ostree/src/ostree ']'
++ test_builddir=/build/ostree/src/ostree/tests
++ . /build/ostree/src/ostree/tests/libtest-core.sh
+++ type -p locale
++++ locale -a
++++ grep -iEe '^(C|en_US)\.(UTF-8|utf8)$'
++++ head -n1
+++ export LC_ALL=en_US.utf8
+++ LC_ALL=en_US.utf8
+++ '[' -z en_US.utf8 ']'
+++ unset LANGUAGE
+++ export G_DEBUG=fatal-warnings
+++ G_DEBUG=fatal-warnings
++ libtest_exit_cmds=()
++ trap run_exit_cmds EXIT
++ libtest_exit_cmds+=(save_core)
+++ pwd
++ test_tmpdir=/var/tmp/tap-test.ZcjpUA
++ test -f .testtmp
++ unset TAR_OPTIONS
++ export OSTREE_SYSROOT_DEBUG=mutable-deployments
++ OSTREE_SYSROOT_DEBUG=mutable-deployments
++ export TEST_GPG_KEYID_1=7FCA23D8472CDAFA
++ TEST_GPG_KEYID_1=7FCA23D8472CDAFA
++ export TEST_GPG_KEYFPR_1=5E65DE75AB1C501862D476347FCA23D8472CDAFA
++ TEST_GPG_KEYFPR_1=5E65DE75AB1C501862D476347FCA23D8472CDAFA
++ export TEST_GPG_KEYID_2=D8228CFECA950D41
++ TEST_GPG_KEYID_2=D8228CFECA950D41
++ export TEST_GPG_KEYFPR_2=7B3B1020D74479687FDB2273D8228CFECA950D41
++ TEST_GPG_KEYFPR_2=7B3B1020D74479687FDB2273D8228CFECA950D41
++ export TEST_GPG_KEYID_3=0D15FAE7DF444D67
++ TEST_GPG_KEYID_3=0D15FAE7DF444D67
++ export TEST_GPG_KEYFPR_3=7D29CF060B8269CDF63BFBDD0D15FAE7DF444D67
++ TEST_GPG_KEYFPR_3=7D29CF060B8269CDF63BFBDD0D15FAE7DF444D67
++ echo 'Copying gpghome to /var/tmp/tap-test.ZcjpUA'
++ cp -a /build/ostree/src/ostree/tests/gpghome /var/tmp/tap-test.ZcjpUA
++ chmod -R u+w /var/tmp/tap-test.ZcjpUA
++ chmod 700 /var/tmp/tap-test.ZcjpUA/gpghome
++ export TEST_GPG_KEYHOME=/var/tmp/tap-test.ZcjpUA/gpghome
++ TEST_GPG_KEYHOME=/var/tmp/tap-test.ZcjpUA/gpghome
++ export OSTREE_GPG_HOME=/var/tmp/tap-test.ZcjpUA/gpghome/trusted
++ OSTREE_GPG_HOME=/var/tmp/tap-test.ZcjpUA/gpghome/trusted
++ _have_selinux_relabel=
++ echo -n checking for xattrs...
++ have_selinux_relabel
++ assert_has_setfattr
++ which setfattr
++ test '' = ''
++ pushd /var/tmp/tap-test.ZcjpUA
++ echo testlabel
++ selinux_xattr=security.selinux
++ getfattr --encoding=base64 -n security.selinux testlabel.txt
Copying gpghome to /var/tmp/tap-test.ZcjpUA
checking for xattrs.../usr/bin/setfattr
++ sed -e 's/^/# /'
# testlabel.txt: security.selinux: No such attribute
++ echo 'Unable to retrieve SELinux label, assuming disabled'
++ _have_selinux_relabel=no
++ popd
++ test no = yes
++ export OSTREE_SYSROOT_DEBUG=mutable-deployments,no-xattrs
++ OSTREE_SYSROOT_DEBUG=mutable-deployments,no-xattrs
++ export OSTREE_NO_XATTRS=1
++ OSTREE_NO_XATTRS=1
++ echo done
++ test -n 1
++ set -x
++ BUILT_WITH_ASAN=
++ test -n ''
++ test -n ''
++ test -z ''
++ test -z ''
++ CMD_PREFIX='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so'
++ test -n /build/ostree/src/ostree
++ OSTREE_HTTPD=/build/ostree/src/ostree/ostree-trivial-httpd
++ _have_user_xattrs=
++ _have_systemd_and_libmount=
++ _have_strace_fault_injection=
++ libtest_exit_cmds+=(libtest_cleanup_gpg)
++ ED25519PUBLIC=
++ ED25519SEED=
++ ED25519SECRET=
+ echo 1..3
+ released_syms=/build/ostree/src/ostree/src/libostree/libostree-released.sym
+ echo 'libsoup gpgme sign-ed25519 ex-fsverity libarchive openssl avahi libmount systemd experimental release p2p'
/var/tmp/tap-test.ZcjpUA /var/tmp/tap-test.ZcjpUA
Unable to retrieve SELinux label, assuming disabled
/var/tmp/tap-test.ZcjpUA
done
+ grep --quiet --no-messages devel
+ devel_syms=
+ echo 'libsoup gpgme sign-ed25519 ex-fsverity libarchive openssl avahi libmount systemd experimental release p2p'
+ grep --quiet --no-messages experimental
+ experimental_sym=/build/ostree/src/ostree/src/libostree/libostree-experimental.sym
+ experimental_sections=/build/ostree/src/ostree/apidoc/ostree-experimental-sections.txt
+ echo 'Verifying all expected symbols are actually exported...'
1..3
+ grep --no-filename ' ostree_[A-Za-z0-9_]*;' /build/ostree/src/ostree/src/libostree/libostree-released.sym /build/ostree/src/ostree/src/libostree/libostree-experimental.sym
+ sed -e 's,^ *\([A-Za-z0-9_]*\);,\1,'
+ sort -u
grep: /build/ostree/src/ostree/src/libostree/libostree-experimental.sym: No such file or directory
+ run_exit_cmds
+ for expr in "${libtest_exit_cmds[@]}"
+ eval save_core
++ save_core
++ '[' -e core ']'
+ for expr in "${libtest_exit_cmds[@]}"
+ eval libtest_cleanup_gpg
++ libtest_cleanup_gpg
++ local gpg_homedir=/var/tmp/tap-test.ZcjpUA/gpghome
++ gpg-connect-agent --homedir /var/tmp/tap-test.ZcjpUA/gpghome killagent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
Verifying all expected symbols are actually exported...
OK closing connection
ERROR: tests/test-symbols.sh - too few tests run (expected 3, got 0)
ERROR: tests/test-symbols.sh - exited with status 2

tests/test-signed-pull-summary.sh

Copying gpghome to /var/tmp/tap-test.wvH7qG
checking for xattrs.../usr/bin/setfattr
# testlabel.txt: security.selinux: No such attribute
++ BUILT_WITH_ASAN=
++ test -n ''
++ test -n ''
++ test -z ''
++ test -z ''
++ CMD_PREFIX='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so'
++ test -n /build/ostree/src/ostree
++ OSTREE_HTTPD=/build/ostree/src/ostree/ostree-trivial-httpd
/var/tmp/tap-test.wvH7qG /var/tmp/tap-test.wvH7qG
Unable to retrieve SELinux label, assuming disabled
/var/tmp/tap-test.wvH7qG
++ _have_user_xattrs=
++ _have_systemd_and_libmount=
++ _have_strace_fault_injection=
++ libtest_exit_cmds+=(libtest_cleanup_gpg)
++ ED25519PUBLIC=
++ ED25519SEED=
++ ED25519SECRET=
+ echo 1..14
+ export OSTREE_DUMMY_SIGN_ENABLED=1
+ OSTREE_DUMMY_SIGN_ENABLED=1
done
+ for engine in dummy ed25519
+ case "${engine}" in
+ SIGN_KEY=dummysign
+ PUBLIC_KEY=dummysign
+ COMMIT_SIGN='--sign-type=dummy --sign=dummysign'
+ rm -rf /var/tmp/tap-test.wvH7qG/ostree-srv /var/tmp/tap-test.wvH7qG/gnomerepo /var/tmp/tap-test.wvH7qG/httpd /var/tmp/tap-test.wvH7qG/repo /var/tmp/tap-test.wvH7qG/cachedir /var/tmp/tap-test.wvH7qG/main-copy /var/tmp/tap-test.wvH7qG/other-copy /var/tmp/tap-test.wvH7qG/yet-another-copy
+ setup_fake_remote_repo1 archive '--sign-type=dummy --sign=dummysign'
+ mode=archive
+ shift
+ commit_opts='--sign-type=dummy --sign=dummysign'
+ '[' 1 -eq 0 ']'
+ shift
++ pwd
+ oldpwd=/var/tmp/tap-test.wvH7qG
+ mkdir ostree-srv
+ cd ostree-srv
+ mkdir gnomerepo
+ ostree_repo_init gnomerepo --mode=archive
+ repo=gnomerepo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=gnomerepo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
+ mkdir gnomerepo-files
+ cd gnomerepo-files
+ echo first
+ mkdir baz
+ echo moo
+ echo alien
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=dummy --sign=dummysign --add-metadata-string version=3.0 -b main -s 'A remote commit' -m 'Some Commit body'
1..14
+ mkdir baz/deeper
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=dummy --sign=dummysign --add-metadata-string version=3.1 -b main -s 'Add deeper'
a80f838d0cc27bedb7f70001cb6fe4263fbfdc8356ae569f97a7ec26bd645776
+ echo hi
+ mkdir baz/another/
+ echo x
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=dummy --sign=dummysign --add-metadata-string version=3.2 -b main -s 'The rest'
ae9e9baeb406335dcc048a8d3593a03cf7211c88c4cf6823e82e9130ddcddf4e
+ cd ..
+ rm -rf gnomerepo-files
+ cd /var/tmp/tap-test.wvH7qG
+ mkdir /var/tmp/tap-test.wvH7qG/httpd
+ cd httpd
+ ln -s /var/tmp/tap-test.wvH7qG/ostree-srv ostree
++ pwd
+ /build/ostree/src/ostree/ostree-trivial-httpd --autoexit --log-file /var/tmp/tap-test.wvH7qG/httpd/httpd.log --daemonize -p /var/tmp/tap-test.wvH7qG/httpd-port
++ cat /var/tmp/tap-test.wvH7qG/httpd-port
+ port=40963
+ echo http://127.0.0.1:40963
+ cd /var/tmp/tap-test.wvH7qG
+ export 'OSTREE=env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ OSTREE='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ mkdir /var/tmp/tap-test.wvH7qG/ostree-srv/other-files
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/other-files
+ echo 'hello world another object'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=dummy --sign=dummysign -b other -s 'A commit' -m 'Another Commit body'
2fa80b9b034bbcd68ca1f129967de931a404eb9f9c591aa400152a26ebaa37ae
+ mkdir /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ echo 'hello world yet another object'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=dummy --sign=dummysign -b yet-another -s 'A commit' -m 'Another Commit body'
c7076c512ca725cbc8c1f165630085054813da198c69e1a95f501bea430c5335
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u
++ pwd
+ prev_dir=/var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ cd /var/tmp/tap-test.wvH7qG
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=false origin http://127.0.0.1:40963/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull --mirror origin
fd1607a7ce0d4e11d7daf6e5905d3545e6103999dba2428a3964dc5d99cd6318
+ assert_has_file repo/summary
+ test -f repo/summary
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U main main-copy
+ assert_file_has_content main-copy/baz/cow moo
+ fpath=main-copy/baz/cow
+ shift
+ for re in "$@"
+ grep -q -e moo main-copy/baz/cow
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U other other-copy
+ assert_file_has_content other-copy/hello-world 'hello world another object'
+ fpath=other-copy/hello-world
+ shift
+ for re in "$@"
+ grep -q -e 'hello world another object' other-copy/hello-world
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U yet-another yet-another-copy
+ assert_file_has_content yet-another-copy/yet-another-hello-world 'hello world yet another object'
+ fpath=yet-another-copy/yet-another-hello-world
+ shift
+ for re in "$@"
+ grep -q -e 'hello world yet another object' yet-another-copy/yet-another-hello-world
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo fsck
13 metadata, 7 content objects fetched; 1 KiB transferred in 0 seconds; 79 bytes content written
Validating refs...
Validating refs in collections...
Enumerating objects...
Verifying content integrity of 3 commit objects...
fsck objects (1/17) 5%
+ echo 'ok dummy pull mirror summary'
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
fsck objects (17/17) 100%
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=dummy --sign=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-dummy-key=dummysign
+ ARGS=--set=verification-dummy-key=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-dummy-key=dummysign origin http://127.0.0.1:40963/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
ok dummy pull mirror summary
PASS: tests/test-signed-pull-summary.sh 1 dummy pull mirror summary
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ rm repo/tmp/cache/summaries/origin
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
7 metadata, 5 content objects fetched; 851 B transferred in 0 seconds; 21 bytes content written
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ echo 'ok dummy pull with signed summary'
+ touch repo/tmp/cache/summaries/foo
1 metadata, 0 content objects fetched; 40 B transferred in 0 seconds; 0 bytes content written
+ touch repo/tmp/cache/summaries/foo.sig
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo prune
ok dummy pull with signed summary
PASS: tests/test-signed-pull-summary.sh 2 dummy pull with signed summary
Total objects: 11
+ assert_not_has_file repo/tmp/cache/summaries/foo
+ test -f repo/tmp/cache/summaries/foo
+ assert_not_has_file repo/tmp/cache/summaries/foo.sig
+ test -f repo/tmp/cache/summaries/foo.sig
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ echo 'ok dummy prune summary cache'
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-dummy-key=dummysign
No unreachable objects
+ ARGS=--set=verification-dummy-key=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-dummy-key=dummysign origin http://127.0.0.1:40963/ostree/gnomerepo
+ mkdir cachedir
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull --cache-dir=cachedir origin main
ok dummy prune summary cache
PASS: tests/test-signed-pull-summary.sh 3 dummy prune summary cache
+ assert_not_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_not_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ assert_has_file cachedir/summaries/origin
+ test -f cachedir/summaries/origin
+ assert_has_file cachedir/summaries/origin.sig
+ test -f cachedir/summaries/origin.sig
+ rm cachedir/summaries/origin
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull --cache-dir=cachedir origin main
7 metadata, 5 content objects fetched; 851 B transferred in 0 seconds; 21 bytes content written
+ assert_not_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file cachedir/summaries/origin
+ test -f cachedir/summaries/origin
+ echo 'ok dummy pull with signed summary and cachedir'
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-dummy-key=dummysign
+ ARGS=--set=verification-dummy-key=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
1 metadata, 0 content objects fetched; 40 B transferred in 0 seconds; 0 bytes content written
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-dummy-key=dummysign origin http://127.0.0.1:40963/ostree/gnomerepo
+ mv /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.good
+ echo invalid
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
+ assert_file_has_content err.txt 'No signatures found'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'No signatures found' err.txt
+ mv /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.good /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig
+ echo 'ok dummy pull with invalid dummy summary signature fails'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo static-delta generate --empty main
ok dummy pull with signed summary and cachedir
PASS: tests/test-signed-pull-summary.sh 4 dummy pull with signed summary and cachedir
ok dummy pull with invalid dummy summary signature fails
PASS: tests/test-signed-pull-summary.sh 5 dummy pull with invalid dummy summary signature fails
Generating static delta:
  From: empty
modified: 0
new reachable: metadata=6 content regular=5 symlink=0
rollsum for 0/0 modified
part 1 n:10 compressed:521 uncompressed:457
uncompressed=457 compressed=521 loose=637
rollsum=0 objects, 0 bytes
bsdiff=0 objects
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=dummy --sign=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-dummy-key=dummysign
+ ARGS=--set=verification-dummy-key=dummysign
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-dummy-key=dummysign origin http://127.0.0.1:40963/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
  To:   2fa80b9b034bbcd68ca1f129967de931a404eb9f9c591aa400152a26ebaa37ae
+ echo 'ok dummy pull delta with signed summary'
+ for engine in dummy ed25519
7 metadata, 5 content objects fetched; 851 B transferred in 0 seconds; 21 bytes content written
+ case "${engine}" in
+ has_sign_ed25519
+ local ret
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --version
+ grep -q -e '- sign-ed25519' version.txt
+ ret=0
+ rm -f version.txt
+ return 0
+ gen_ed25519_keys
++ mktemp -p /var/tmp/tap-test.wvH7qG ed25519_XXXXXX.pem
+ pemfile=/var/tmp/tap-test.wvH7qG/ed25519_UnC7eW.pem
+ openssl genpkey -algorithm ed25519 -outform PEM -out /var/tmp/tap-test.wvH7qG/ed25519_UnC7eW.pem
++ openssl pkey -outform DER -pubout -in /var/tmp/tap-test.wvH7qG/ed25519_UnC7eW.pem
++ base64
++ tail -c 32
+ ED25519PUBLIC=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
++ tail -c 32
++ base64
++ openssl pkey -outform DER -in /var/tmp/tap-test.wvH7qG/ed25519_UnC7eW.pem
+ ED25519SEED=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBM=
++ echo ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBM=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
++ base64 -d
++ base64 -w 0
+ ED25519SECRET=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA==
+ echo 'Generated ed25519 keys:'
+ echo 'public: QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ='
+ echo '  seed: ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBM='
+ SIGN_KEY=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA==
+ PUBLIC_KEY=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ COMMIT_SIGN='--sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA=='
+ rm -rf /var/tmp/tap-test.wvH7qG/ostree-srv /var/tmp/tap-test.wvH7qG/gnomerepo /var/tmp/tap-test.wvH7qG/httpd /var/tmp/tap-test.wvH7qG/repo /var/tmp/tap-test.wvH7qG/cachedir /var/tmp/tap-test.wvH7qG/main-copy /var/tmp/tap-test.wvH7qG/other-copy /var/tmp/tap-test.wvH7qG/yet-another-copy
ok dummy pull delta with signed summary
PASS: tests/test-signed-pull-summary.sh 6 dummy pull delta with signed summary
Generated ed25519 keys:
public: QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ setup_fake_remote_repo1 archive '--sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA=='
+ mode=archive
+ shift
+ commit_opts='--sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA=='
+ '[' 1 -eq 0 ']'
+ shift
++ pwd
+ oldpwd=/var/tmp/tap-test.wvH7qG
+ mkdir ostree-srv
+ cd ostree-srv
+ mkdir gnomerepo
+ ostree_repo_init gnomerepo --mode=archive
+ repo=gnomerepo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=gnomerepo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
+ mkdir gnomerepo-files
+ cd gnomerepo-files
+ echo first
+ mkdir baz
+ echo moo
+ echo alien
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA== --add-metadata-string version=3.0 -b main -s 'A remote commit' -m 'Some Commit body'
  seed: ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBM=
+ mkdir baz/deeper
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA== --add-metadata-string version=3.1 -b main -s 'Add deeper'
6dd4c023a3822bb9d14846538c3cd9a1d26c425c8a461044e17e79ce7fc3eb96
+ echo hi
+ mkdir baz/another/
+ echo x
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA== --add-metadata-string version=3.2 -b main -s 'The rest'
98a2ae8d4e7a71adb8a8744c48f76551a6ce851a2b8c54d5af0c27b4ed6a8120
+ cd ..
+ rm -rf gnomerepo-files
+ cd /var/tmp/tap-test.wvH7qG
+ mkdir /var/tmp/tap-test.wvH7qG/httpd
+ cd httpd
+ ln -s /var/tmp/tap-test.wvH7qG/ostree-srv ostree
++ pwd
+ /build/ostree/src/ostree/ostree-trivial-httpd --autoexit --log-file /var/tmp/tap-test.wvH7qG/httpd/httpd.log --daemonize -p /var/tmp/tap-test.wvH7qG/httpd-port
++ cat /var/tmp/tap-test.wvH7qG/httpd-port
+ port=43057
+ echo http://127.0.0.1:43057
+ cd /var/tmp/tap-test.wvH7qG
+ export 'OSTREE=env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ OSTREE='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ mkdir /var/tmp/tap-test.wvH7qG/ostree-srv/other-files
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/other-files
+ echo 'hello world another object'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA== -b other -s 'A commit' -m 'Another Commit body'
a51ced09956791ac2ff4a7c2acc4df1d49666b8d577eb123d36e77b95c467a6d
+ mkdir /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ echo 'hello world yet another object'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA== -b yet-another -s 'A commit' -m 'Another Commit body'
3899bb28377a3806b37c421ca796e00c287c7f88b869bc37649729729e859be3
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u
++ pwd
+ prev_dir=/var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ cd /var/tmp/tap-test.wvH7qG
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=false origin http://127.0.0.1:43057/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull --mirror origin
67c42b8dba6384203f6f433f756f4592b24c2dcd99de0e76dfc25003b8cda249
+ assert_has_file repo/summary
+ test -f repo/summary
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U main main-copy
+ assert_file_has_content main-copy/baz/cow moo
+ fpath=main-copy/baz/cow
+ shift
+ for re in "$@"
+ grep -q -e moo main-copy/baz/cow
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U other other-copy
+ assert_file_has_content other-copy/hello-world 'hello world another object'
+ fpath=other-copy/hello-world
+ shift
+ for re in "$@"
+ grep -q -e 'hello world another object' other-copy/hello-world
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo checkout -U yet-another yet-another-copy
+ assert_file_has_content yet-another-copy/yet-another-hello-world 'hello world yet another object'
+ fpath=yet-another-copy/yet-another-hello-world
+ shift
+ for re in "$@"
+ grep -q -e 'hello world yet another object' yet-another-copy/yet-another-hello-world
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo fsck
13 metadata, 7 content objects fetched; 1 KiB transferred in 0 seconds; 79 bytes content written
Validating refs...
Validating refs in collections...
Enumerating objects...
Verifying content integrity of 3 commit objects...
fsck objects (1/17) 5%
+ echo 'ok ed25519 pull mirror summary'
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/yet-other-files
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA==
fsck objects (17/17) 100%
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ ARGS=--set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ= origin http://127.0.0.1:43057/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
ok ed25519 pull mirror summary
PASS: tests/test-signed-pull-summary.sh 7 ed25519 pull mirror summary
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ rm repo/tmp/cache/summaries/origin
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
7 metadata, 5 content objects fetched; 906 B transferred in 0 seconds; 21 bytes content written
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ echo 'ok ed25519 pull with signed summary'
+ touch repo/tmp/cache/summaries/foo
1 metadata, 0 content objects fetched; 95 B transferred in 0 seconds; 0 bytes content written
+ touch repo/tmp/cache/summaries/foo.sig
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo prune
ok ed25519 pull with signed summary
PASS: tests/test-signed-pull-summary.sh 8 ed25519 pull with signed summary
Total objects: 11
+ assert_not_has_file repo/tmp/cache/summaries/foo
+ test -f repo/tmp/cache/summaries/foo
+ assert_not_has_file repo/tmp/cache/summaries/foo.sig
+ test -f repo/tmp/cache/summaries/foo.sig
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ echo 'ok ed25519 prune summary cache'
+ cd /var/tmp/tap-test.wvH7qG
No unreachable objects
+ repo_reinit --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ ARGS=--set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ= origin http://127.0.0.1:43057/ostree/gnomerepo
+ mkdir cachedir
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull --cache-dir=cachedir origin main
ok ed25519 prune summary cache
PASS: tests/test-signed-pull-summary.sh 9 ed25519 prune summary cache
+ assert_not_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_not_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ assert_has_file cachedir/summaries/origin
+ test -f cachedir/summaries/origin
+ assert_has_file cachedir/summaries/origin.sig
+ test -f cachedir/summaries/origin.sig
+ rm cachedir/summaries/origin
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull --cache-dir=cachedir origin main
7 metadata, 5 content objects fetched; 906 B transferred in 0 seconds; 21 bytes content written
+ assert_not_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file cachedir/summaries/origin
+ test -f cachedir/summaries/origin
+ echo 'ok ed25519 pull with signed summary and cachedir'
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ ARGS=--set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
1 metadata, 0 content objects fetched; 95 B transferred in 0 seconds; 0 bytes content written
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ= origin http://127.0.0.1:43057/ostree/gnomerepo
+ mv /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.good
+ echo invalid
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
+ assert_file_has_content err.txt 'No signatures found'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'No signatures found' err.txt
+ mv /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.good /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig
+ echo 'ok ed25519 pull with invalid ed25519 summary signature fails'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo static-delta generate --empty main
ok ed25519 pull with signed summary and cachedir
PASS: tests/test-signed-pull-summary.sh 10 ed25519 pull with signed summary and cachedir
ok ed25519 pull with invalid ed25519 summary signature fails
PASS: tests/test-signed-pull-summary.sh 11 ed25519 pull with invalid ed25519 summary signature fails
Generating static delta:
  From: empty
modified: 0
new reachable: metadata=6 content regular=5 symlink=0
rollsum for 0/0 modified
part 1 n:10 compressed:521 uncompressed:457
uncompressed=457 compressed=521 loose=637
rollsum=0 objects, 0 bytes
bsdiff=0 objects
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=ed25519 --sign=ZdvTkb5G9dl1UnhSwG4zekYlUl6kkcYJhN/hbrkJSBNB8+RL3+9bMnNBbVQ4sOnOaHjYZrF7TBgtBlAtzMQWhA==
+ cd /var/tmp/tap-test.wvH7qG
+ repo_reinit --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ ARGS=--set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ=
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-ed25519-key=QfPkS9/vWzJzQW1UOLDpzmh42Gaxe0wYLQZQLczEFoQ= origin http://127.0.0.1:43057/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
  To:   a51ced09956791ac2ff4a7c2acc4df1d49666b8d577eb123d36e77b95c467a6d
+ echo 'ok ed25519 pull delta with signed summary'
7 metadata, 5 content objects fetched; 906 B transferred in 0 seconds; 21 bytes content written
+ has_sign_ed25519
+ local ret
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --version
+ grep -q -e '- sign-ed25519' version.txt
+ ret=0
+ rm -f version.txt
+ return 0
+ gen_ed25519_keys
++ mktemp -p /var/tmp/tap-test.wvH7qG ed25519_XXXXXX.pem
+ pemfile=/var/tmp/tap-test.wvH7qG/ed25519_f8rYqA.pem
+ openssl genpkey -algorithm ed25519 -outform PEM -out /var/tmp/tap-test.wvH7qG/ed25519_f8rYqA.pem
++ openssl pkey -outform DER -pubout -in /var/tmp/tap-test.wvH7qG/ed25519_f8rYqA.pem
++ tail -c 32
++ base64
+ ED25519PUBLIC=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
++ openssl pkey -outform DER -in /var/tmp/tap-test.wvH7qG/ed25519_f8rYqA.pem
++ tail -c 32
++ base64
+ ED25519SEED=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9I=
++ echo HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9I=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
++ base64 -d
++ base64 -w 0
+ ED25519SECRET=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg==
+ echo 'Generated ed25519 keys:'
+ echo 'public: evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24='
+ echo '  seed: HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9I='
ok ed25519 pull delta with signed summary
+ SIGN_KEY=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg==
+ PUBLIC_KEY=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
PASS: tests/test-signed-pull-summary.sh 12 ed25519 pull delta with signed summary
Generated ed25519 keys:
public: evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
+ COMMIT_SIGN='--sign-type=ed25519 --sign=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg=='
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote summary origin
+ assert_file_has_content summary.txt '* main'
+ fpath=summary.txt
+ shift
+ for re in "$@"
+ grep -q -e '* main' summary.txt
+ assert_file_has_content summary.txt '* other'
+ fpath=summary.txt
+ shift
+ for re in "$@"
+ grep -q -e '* other' summary.txt
+ assert_file_has_content summary.txt '* yet-another'
+ fpath=summary.txt
+ shift
+ for re in "$@"
+ grep -q -e '* yet-another' summary.txt
+ grep static-deltas summary.txt
++ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo rev-parse origin:main
+ assert_file_has_content static-deltas.txt a51ced09956791ac2ff4a7c2acc4df1d49666b8d577eb123d36e77b95c467a6d
+ fpath=static-deltas.txt
+ shift
+ for re in "$@"
+ grep -q -e a51ced09956791ac2ff4a7c2acc4df1d49666b8d577eb123d36e77b95c467a6d static-deltas.txt
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=ed25519 --sign=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg==
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.1
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.1
+ mkdir /var/tmp/tap-test.wvH7qG/ostree-srv/even-another-files
+ cd /var/tmp/tap-test.wvH7qG/ostree-srv/even-another-files
+ echo 'hello world even another object'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo commit --sign-type=ed25519 --sign=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg== -b even-another -s 'A commit' -m 'Another Commit body'
  seed: HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9I=
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=/var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo summary -u --sign-type=ed25519 --sign=HjaIoY96Jn+EuSPQewoKaH1tN+BfEamLuLfiOP7ph9J689qaWGZtpz8fqO6dt5dhogyH+PM0a2gAYqP4pyg/bg==
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.2
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.2
+ cd /var/tmp/tap-test.wvH7qG
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.1 /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.1 /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig
+ repo_reinit --set=verification-ed25519-key=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
+ ARGS=--set=verification-ed25519-key=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24=
+ cd /var/tmp/tap-test.wvH7qG
+ rm -rf repo
+ mkdir repo
+ ostree_repo_init repo --mode=archive
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo remote add --set=gpg-verify=false --set=gpg-verify-summary=false --set=sign-verify=false --set=sign-verify-summary=true --set=verification-ed25519-key=evPamlhmbac/H6junbeXYaIMh/jzNGtoAGKj+KcoP24= origin http://127.0.0.1:43057/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
1cf1948e57f85c8c32366d65c187cdd7b283e21b9e587839b65d518cae6ad4c6
+ assert_has_file repo/tmp/cache/summaries/origin
+ test -f repo/tmp/cache/summaries/origin
+ assert_has_file repo/tmp/cache/summaries/origin.sig
+ test -f repo/tmp/cache/summaries/origin.sig
+ cmp repo/tmp/cache/summaries/origin /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.1
+ cmp repo/tmp/cache/summaries/origin.sig /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.1
+ cp /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig.2 /var/tmp/tap-test.wvH7qG/ostree-srv/gnomerepo/summary.sig
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo --repo=repo pull origin main
7 metadata, 5 content objects fetched; 906 B transferred in 0 seconds; 21 bytes content written
+ assert_not_reached 'Successful pull with old summary'
+ fatal 'Successful pull with old summary'
+ echo Successful pull with old summary
Successful pull with old summary
+ exit 1
+ run_exit_cmds
+ for expr in "${libtest_exit_cmds[@]}"
+ eval save_core
++ save_core
++ '[' -e core ']'
+ for expr in "${libtest_exit_cmds[@]}"
+ eval libtest_cleanup_gpg
++ libtest_cleanup_gpg
++ local gpg_homedir=/var/tmp/tap-test.wvH7qG/gpghome
++ gpg-connect-agent --homedir /var/tmp/tap-test.wvH7qG/gpghome killagent /bye
gpg-connect-agent: no running gpg-agent - starting '/usr/bin/gpg-agent'
gpg-connect-agent: waiting for the agent to come up ... (5s)
gpg-connect-agent: connection to agent established
1 metadata, 0 content objects fetched; 95 B transferred in 0 seconds; 0 bytes content written
OK closing connection
ERROR: tests/test-signed-pull-summary.sh - too few tests run (expected 14, got 12)
ERROR: tests/test-signed-pull-summary.sh - exited with status 1

tests/test-remote-gpg-import.sh

Copying gpghome to /var/tmp/tap-test.y5sBm4
checking for xattrs.../usr/bin/setfattr
# testlabel.txt: security.selinux: No such attribute
/var/tmp/tap-test.y5sBm4 /var/tmp/tap-test.y5sBm4
Unable to retrieve SELinux label, assuming disabled
/var/tmp/tap-test.y5sBm4
++ BUILT_WITH_ASAN=
++ test -n ''
++ test -n ''
++ test -z ''
++ test -z ''
++ CMD_PREFIX='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so'
++ test -n /build/ostree/src/ostree
++ OSTREE_HTTPD=/build/ostree/src/ostree/ostree-trivial-httpd
++ _have_user_xattrs=
++ _have_systemd_and_libmount=
++ _have_strace_fault_injection=
++ libtest_exit_cmds+=(libtest_cleanup_gpg)
++ ED25519PUBLIC=
++ ED25519SEED=
++ ED25519SECRET=
+ unset OSTREE_GPG_HOME
+ setup_fake_remote_repo1 archive
+ mode=archive
+ shift
+ commit_opts=
+ '[' 0 -eq 0 ']'
++ pwd
+ oldpwd=/var/tmp/tap-test.y5sBm4
+ mkdir ostree-srv
+ cd ostree-srv
+ mkdir gnomerepo
+ ostree_repo_init gnomerepo --mode=archive
+ repo=gnomerepo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=gnomerepo init --mode=archive
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
+ mkdir gnomerepo-files
+ cd gnomerepo-files
+ echo first
+ mkdir baz
+ echo moo
+ echo alien
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit --add-metadata-string version=3.0 -b main -s 'A remote commit' -m 'Some Commit body'
done
+ mkdir baz/deeper
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit --add-metadata-string version=3.1 -b main -s 'Add deeper'
e18be176558a62269a87958adb7ea08177f45d24ecc923c685973d9f50b45a58
+ echo hi
+ mkdir baz/another/
+ echo x
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit --add-metadata-string version=3.2 -b main -s 'The rest'
76cb6696d413dcacdc02c00491ecf2052d154a0b3af90076df44da544d75c0d0
+ cd ..
+ rm -rf gnomerepo-files
+ cd /var/tmp/tap-test.y5sBm4
+ mkdir /var/tmp/tap-test.y5sBm4/httpd
+ cd httpd
+ ln -s /var/tmp/tap-test.y5sBm4/ostree-srv ostree
++ pwd
+ /build/ostree/src/ostree/ostree-trivial-httpd --autoexit --log-file /var/tmp/tap-test.y5sBm4/httpd/httpd.log --daemonize -p /var/tmp/tap-test.y5sBm4/httpd-port
++ cat /var/tmp/tap-test.y5sBm4/httpd-port
+ port=42633
+ echo http://127.0.0.1:42633
+ cd /var/tmp/tap-test.y5sBm4
+ export 'OSTREE=env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ OSTREE='env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo'
+ num_non_gpg_tests=4
+ num_gpg_tests=2
+ num_tests=6
+ echo 1..6
+ cd /var/tmp/tap-test.y5sBm4
+ mkdir repo
5ffde41a9762f7feff782a60939e704353cc87751e8b8c39811c05a09a2aa402
+ ostree_repo_init repo
+ repo=repo
+ shift
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo init
+ test -n 1
+ echo -e 'disable-xattrs=true\n'
+ assert_not_has_file repo/R1.trustedkeys.gpg
+ test -f repo/R1.trustedkeys.gpg
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add R1 http://127.0.0.1:42633/ostree/gnomerepo
+ assert_not_has_file repo/R1.trustedkeys.gpg
+ test -f repo/R1.trustedkeys.gpg
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --keyring /var/tmp/tap-test.y5sBm4/gpghome/trusted/pubring.gpg R1 7FCA23D8472CDAFA
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 1 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 1 GPG key' result
+ assert_has_file repo/R1.trustedkeys.gpg
+ test -f repo/R1.trustedkeys.gpg
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote delete R1
+ assert_not_has_file repo/R1.trustedkeys.gpg
+ test -f repo/R1.trustedkeys.gpg
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add R1 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --keyring /var/tmp/tap-test.y5sBm4/gpghome/trusted/pubring.gpg R1 7FCA23D8472CDAFA
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 1 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 1 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --keyring /var/tmp/tap-test.y5sBm4/gpghome/trusted/pubring.gpg R1 D8228CFECA950D41 0D15FAE7DF444D67
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 2 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 2 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --keyring /var/tmp/tap-test.y5sBm4/gpghome/trusted/pubring.gpg R1 7FCA23D8472CDAFA 0D15FAE7DF444D67
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 0 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 0 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote delete R1
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add R1 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --keyring /var/tmp/tap-test.y5sBm4/gpghome/trusted/pubring.gpg R1
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 3 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 3 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote delete R1
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add R1 http://127.0.0.1:42633/ostree/gnomerepo
+ cat /var/tmp/tap-test.y5sBm4/gpghome/key1.asc /var/tmp/tap-test.y5sBm4/gpghome/key2.asc /var/tmp/tap-test.y5sBm4/gpghome/key3.asc
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote gpg-import --stdin R1
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 3 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 3 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote delete R1
+ grep -o 'Imported [[:digit:]] GPG key'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --gpg-import /var/tmp/tap-test.y5sBm4/gpghome/key1.asc R1 http://127.0.0.1:42633/ostree/gnomerepo
+ assert_file_has_content result 'Imported 1 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 1 GPG key' result
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --gpg-import /var/tmp/tap-test.y5sBm4/gpghome/key2.asc R2 http://127.0.0.1:42633/ostree/gnomerepo
+ grep -o 'Imported [[:digit:]] GPG key'
+ assert_file_has_content result 'Imported 1 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 1 GPG key' result
+ grep -o 'Imported [[:digit:]] GPG key'
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --gpg-import /var/tmp/tap-test.y5sBm4/gpghome/key3.asc R3 http://127.0.0.1:42633/ostree/gnomerepo
+ assert_file_has_content result 'Imported 1 GPG key'
+ fpath=result
+ shift
+ for re in "$@"
+ grep -q -e 'Imported 1 GPG key' result
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=ostree-srv/gnomerepo checkout main workdir
+ echo shadow
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=ostree-srv/gnomerepo commit -b main -s 'Add blinky' --gpg-sign 7FCA23D8472CDAFA --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
1..6
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R2:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R3:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R1:main
+ echo speedy
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=ostree-srv/gnomerepo commit -b main -s 'Add pinky' --gpg-sign D8228CFECA950D41 --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
5b78a09c198f5b98a0f52a459e4ec69e87519036fbc18ab9b26ebc2f258510a6
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R1:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R3:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R2:main
+ echo bashful
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=ostree-srv/gnomerepo commit -b main -s 'Add inky' --gpg-sign 0D15FAE7DF444D67 --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
e564e9d274a22a8cebc7f56e0b69cd358892e17f4736c6eeeef099ea66e8cb37
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R1:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R2:main
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R3:main
+ echo ok
539e96d890408a761192186fa3b29e0d16998ef754f2a6c35eeddc169e2f463d
+ rm repo/refs/remotes/R1 repo/refs/remotes/R2 repo/refs/remotes/R3 -rf
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo prune --refs-only
ok
PASS: tests/test-remote-gpg-import.sh 1
Total objects: 18
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key3.asc R4 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R4:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key1.asc,/var/tmp/tap-test.y5sBm4/gpghome/key2.asc,/var/tmp/tap-test.y5sBm4/gpghome/key3.asc R7 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R7:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key1.asc,/var/tmp/tap-test.y5sBm4/gpghome/key2.asc R8 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R8:main
+ assert_file_has_content err.txt 'public key not found'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'public key not found' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/ R9 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R9:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYDIRPATH/ R10 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R10:main
+ assert_file_has_content err.txt 'INVALIDKEYDIRPATH.*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'INVALIDKEYDIRPATH.*No such file or directory' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/,/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYPATH.asc R11 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R11:main
+ assert_file_has_content err.txt 'INVALIDKEYPATH.*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'INVALIDKEYPATH.*No such file or directory' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/,/var/tmp/tap-test.y5sBm4/gpghome/key1.asc R12 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R12:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYDIRPATH/,/var/tmp/tap-test.y5sBm4/gpghome/key3.asc R13 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R13:main
+ assert_file_has_content err.txt 'INVALIDKEYDIRPATH.*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'INVALIDKEYDIRPATH.*No such file or directory' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYDIRPATH/,/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYPATH.asc R14 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R14:main
+ assert_file_has_content err.txt 'INVALIDKEYDIRPATH.*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'INVALIDKEYDIRPATH.*No such file or directory' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome R15 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R15:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=,/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYPATH.asc R16 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R16:main
+ assert_file_has_content err.txt '().*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e '().*No such file or directory' err.txt
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key3.asc, R17 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R17:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add '--set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key1.asc;/var/tmp/tap-test.y5sBm4/gpghome/key2.asc;/var/tmp/tap-test.y5sBm4/gpghome/key3.asc' R18 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R18:main
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add '--set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key1.asc,/var/tmp/tap-test.y5sBm4/gpghome/key2.asc;/var/tmp/tap-test.y5sBm4/gpghome/key3.asc' R19 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R19:main
+ assert_file_has_content err.txt '.*key value list contains more than one separator'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e '.*key value list contains more than one separator' err.txt
+ rm repo/refs/remotes/R12 repo/refs/remotes/R15 repo/refs/remotes/R17 repo/refs/remotes/R18 repo/refs/remotes/R4 repo/refs/remotes/R7 repo/refs/remotes/R9 -rf
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo prune --refs-only
Deleted 18 objects, 1.4 kB freed
Total objects: 14
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/INVALIDKEYPATH.asc R5 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R5:main
+ assert_file_has_content err.txt 'INVALIDKEYPATH.*No such file or directory'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'INVALIDKEYPATH.*No such file or directory' err.txt
+ rm 'repo/refs/remotes/*' -rf
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo prune --refs-only
Deleted 14 objects, 757 bytes freed
Total objects: 0
++ cat httpd-address
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo remote add --set=gpgkeypath=/var/tmp/tap-test.y5sBm4/gpghome/key2.asc R6 http://127.0.0.1:42633/ostree/gnomerepo
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R6:main
+ assert_file_has_content err.txt 'public key not found'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'public key not found' err.txt
+ echo ok
+ cd /var/tmp/tap-test.y5sBm4
No unreachable objects
+ rm 'repo/refs/remotes/*' -rf
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo prune --refs-only
ok
PASS: tests/test-remote-gpg-import.sh 2
Total objects: 0
++ date
+ echo Thu Mar 25 11:09:39 PM CET 2021
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit -b main --gpg-sign 7FCA23D8472CDAFA --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
No unreachable objects
++ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo rev-parse main
+ prevrev=9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull R1:main
9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
++ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo rev-parse R1:main
+ assert_streq 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
+ test 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef = 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
++ date
+ echo Thu Mar 25 11:09:39 PM CET 2021
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit -b main --gpg-sign D8228CFECA950D41 --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
8 metadata, 9 content objects fetched; 1 KiB transferred in 0 seconds; 75 bytes content written
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo static-delta generate main
c22b15b68bf5b6d9bddf77711137119f108370e86d5707fbc5c23cf2912eef79
Generating static delta:
  From: 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
modified: 0
new reachable: metadata=2 content regular=0 symlink=0
rollsum for 0/0 modified
part 1 n:1 compressed:389 uncompressed:355
uncompressed=355 compressed=389 loose=355
rollsum=0 objects, 0 bytes
bsdiff=0 objects
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo summary -u --gpg-sign 7FCA23D8472CDAFA --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome
++ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo rev-parse main
+ newrev=c22b15b68bf5b6d9bddf77711137119f108370e86d5707fbc5c23cf2912eef79
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull --require-static-deltas R1:main
+ assert_file_has_content err.txt 'public key not found'
+ fpath=err.txt
+ shift
+ for re in "$@"
+ grep -q -e 'public key not found' err.txt
+ echo 'ok gpg untrusted signed commit for delta upgrades'
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo reset main 'main^'
  To:   c22b15b68bf5b6d9bddf77711137119f108370e86d5707fbc5c23cf2912eef79
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo commit -b main --gpg-sign 7FCA23D8472CDAFA --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome workdir
ok gpg untrusted signed commit for delta upgrades
PASS: tests/test-remote-gpg-import.sh 3 gpg untrusted signed commit for delta upgrades
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo static-delta generate main
4cfe536e3bda472ad65dff818517334b24527e6742b072f687038a21c61cfe08
Generating static delta:
  From: 9c4e669961f4f92468a7c7da43039f97fdc067fe062b0d49da7182bed60f5cef
modified: 0
new reachable: metadata=2 content regular=0 symlink=0
rollsum for 0/0 modified
part 1 n:1 compressed:389 uncompressed:355
uncompressed=355 compressed=389 loose=355
rollsum=0 objects, 0 bytes
bsdiff=0 objects
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=/var/tmp/tap-test.y5sBm4/ostree-srv/gnomerepo summary -u --gpg-sign 7FCA23D8472CDAFA --gpg-homedir /var/tmp/tap-test.y5sBm4/gpghome
+ env LD_PRELOAD=/build/ostree/src/ostree/tests/libreaddir-rand.so ostree --repo=repo pull --require-static-deltas R1:main
error: Commit c22b15b68bf5b6d9bddf77711137119f108370e86d5707fbc5c23cf2912eef79: Signature made Thu 25 Mar 2021 11:09:39 PM CET using RSA key ID D8228CFECA950D41
Can't check signature: public key not found
+ run_exit_cmds
+ for expr in "${libtest_exit_cmds[@]}"
+ eval save_core
++ save_core
++ '[' -e core ']'
+ for expr in "${libtest_exit_cmds[@]}"
+ eval libtest_cleanup_gpg
++ libtest_cleanup_gpg
++ local gpg_homedir=/var/tmp/tap-test.y5sBm4/gpghome
++ gpg-connect-agent --homedir /var/tmp/tap-test.y5sBm4/gpghome killagent /bye
  To:   4cfe536e3bda472ad65dff818517334b24527e6742b072f687038a21c61cfe08
OK closing connection
ERROR: tests/test-remote-gpg-import.sh - too few tests run (expected 6, got 3)
ERROR: tests/test-remote-gpg-import.sh - exited with status 1
@dvzrv
Copy link
Author

dvzrv commented Mar 25, 2021

I have just updated the data to also include an example of a failed tests/test-remote-gpg-import.sh.

cgwalters added a commit to cgwalters/ostree that referenced this issue Apr 7, 2021
It was added for the collections bits, but we made that stable.
It's now just cruft and we're very unlikely to reuse the infrastructure
again.

Motivated by a unit test failure when running from a tarball:
ostreedev#2313
cgwalters added a commit to cgwalters/ostree that referenced this issue Apr 7, 2021
It was added for the collections bits, but we made that stable.
It's now just cruft and we're very unlikely to reuse the infrastructure
again.

Motivated by a unit test failure when running from a tarball:
ostreedev#2313
cgwalters added a commit to cgwalters/ostree that referenced this issue Apr 7, 2021
It was added for the collections bits, but we made that stable.
It's now just cruft and we're very unlikely to reuse the infrastructure
again.

Motivated by a unit test failure when running from a tarball:
ostreedev#2313
cgwalters added a commit to cgwalters/ostree that referenced this issue Apr 15, 2021
It was added for the collections bits, but we made that stable.
It's now just cruft and we're very unlikely to reuse the infrastructure
again.

Motivated by a unit test failure when running from a tarball:
ostreedev#2313
@dvzrv
Copy link
Author

dvzrv commented Apr 17, 2021

With 2021.2 I still have tests/test-signed-pull-summary.sh and tests/test-remote-gpg-import.sh failing:

test-suite.log
test-signed-pull-summary.sh.log
test-remote-gpg-import.sh.log

@smcv
Copy link
Contributor

smcv commented Apr 18, 2021

It would probably be easier to deal with each test failure as a separate issue.

I'm seeing a similar failure mode for test-remote-gpg-import.sh on Debian, so I'll open that one separately, and perhaps you could retitle/repurpose this issue for the test-signed-pull-summary.sh failure?

You might find it useful to apply #2350 and re-test - that might make the failure a bit more obvious (it did for test-remote-gpg-import.sh in Debian).

Another thing that might help, which I'm trying in Debian, is to run the tests under stdbuf -oL so that output on stdout and stderr interleaves in an order that more accurately reflects what actually happened.

dbnicholson added a commit to dbnicholson/ostree that referenced this issue Apr 19, 2021
Several tests generate summaries and then expect to use the generated
summary immediately. However, this can cause intermittent test failures
when they inadvertantly get a cached summary file. This typically
happens when the test is run on a filesystem that doesn't support user
extended attributes. In that case, the caching code can only use the
last modified time, which only has 1 second granularity. If tests don't
carefully manage the summary modification times or the repo cache then
they are likely subject to races in some test environments.

This introduces an environment variable `OSTREE_SKIP_CACHE` that
prevents the repo from using a cache directory. This is enabled by
default in tests and disabled for tests that are a explicitly trying to
test the caching behavior.

Fixes: ostreedev#2313
Fixes: ostreedev#2351
@dbnicholson
Copy link
Member

Another thing that might help, which I'm trying in Debian, is to run the tests under stdbuf -oL so that output on stdout and stderr interleaves in an order that more accurately reflects what actually happened.

I wasn't aware of stbuf and this would be awesome. I can't tell you how many times I've tried to read through a failure and had to untangle the log messages.

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

Successfully merging a pull request may close this issue.

3 participants