tpm2-software / tpm2-totp

Attest the trustworthiness of a device against a human using time-based one-time passwords
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
163 stars 36 forks source link

test: add integration test for mkinitcpio hook #25

Closed diabonas closed 5 years ago

diabonas commented 5 years ago

As suggested in https://github.com/tpm2-software/tpm2-totp/pull/21#issuecomment-489558311, add a test for the mkinitcpio run hook to verify that all non-POSIX options to read are understood correctly. We want to do this with the BusyBox shell /usr/lib/initcpio/busybox ash used in initcpio ramdisks, so we need to have mkinitcpio installed for this test.

Also move the shebang to the first line in the other integration tests so that it is recognised by the kernel and we don't run into problems on systems where the default shell isn't Bash.

diabonas commented 5 years ago

Not sure why building OpenSSL with GCC is failing, but it seems to be reproducible...

codecov[bot] commented 5 years ago

Codecov Report

Merging #25 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   80.46%   80.46%           
=======================================
  Files           5        5           
  Lines         819      819           
=======================================
  Hits          659      659           
  Misses        160      160

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cd3df71...ad17e7f. Read the comment docs.

diabonas commented 5 years ago

There seems to be a problem with ccache: I have tried three times, each time getting a failure of the form

../libcrypto.so: file not recognized: File truncated

or

../../libcrypto.so: file not recognized: File format not recognized

This might either be a corrupt cache or a race condition in the OpenSSL build process that manifests itself if the files are retrieved faster from the cache. Either way, the CI doesn't take that long, so simply disable ccache for now.