Mailing List Archive

9.6p1 test suite help
Hi OpenSSH,

I'm working on updating Guix's openssh package definition to the latest
release. So far, I have only changed the version (and checksum) and left
the build/test/install recipe the same. However, the test suite now fails.
I could use some pointers to find out what exactly is going wrong with the
failing test or how to fix it. I'm happy to provide more information about
my environment, but I'm not immediately sure what's relevant. Hopefully
the following is a good starting place.

regress.log looks as follows:

"""
trace: adding modulifile='/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/moduli' to sshd_config
trace: adding modulifile='/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/moduli' to sshd_config
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.613615.ssh.12605.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.614012.ssh.12609.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.625268.ssh.12619.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.625535.ssh.12622.log
trace: generating key type ssh-ed25519
trace: generating key type ssh-ed25519
trace: generating key type sk-ssh-ed25519@openssh.com
trace: generating key type sk-ssh-ed25519@openssh.com
trace: generating key type ecdsa-sha2-nistp256
FAIL: ssh-keygen for sk-ssh-ed25519@openssh.com failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
trace: generating key type ecdsa-sha2-nistp384
trace: generating key type ecdsa-sha2-nistp521
trace: using cached key type ecdsa-sha2-nistp256
trace: using cached key type ecdsa-sha2-nistp384
trace: generating key type sk-ecdsa-sha2-nistp256@openssh.com
trace: using cached key type ecdsa-sha2-nistp521
trace: generating key type sk-ecdsa-sha2-nistp256@openssh.com
trace: generating key type ssh-dss
FAIL: ssh-keygen for sk-ecdsa-sha2-nistp256@openssh.com failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
trace: generating key type ssh-rsa
trace: using cached key type ssh-dss
trace: generating key type ssh-rsa
FAIL: ssh-keygen for ssh-rsa failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
"""

I also see lines like:

"""
/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/ssh-rsa already exists.
Overwrite (y/n)? ssh-keygen for ssh-rsa failed
"""

on the console while the tests are running.

Thanks!
Jack
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
9.6p1 test suite help [ In reply to ]
Hi OpenSSH,

I'm working on updating Guix's openssh package definition to the latest
release. So far, I have only changed the version (and checksum) and left
the build/test/install recipe the same. However, the test suite now fails.
I could use some pointers to find out what exactly is going wrong with the
failing test or how to fix it. I'm happy to provide more information about
my environment, but I'm not immediately sure what's relevant. Hopefully
the following is a good starting place.

regress.log looks as follows:

"""
trace: adding modulifile='/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/moduli' to sshd_config
trace: adding modulifile='/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/moduli' to sshd_config
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.613615.ssh.12605.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.614012.ssh.12609.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.625268.ssh.12619.log
Executing: /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/ssh -Q key-plain log /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/log/20231220T200802.625535.ssh.12622.log
trace: generating key type ssh-ed25519
trace: generating key type ssh-ed25519
trace: generating key type sk-ssh-ed25519@openssh.com
trace: generating key type sk-ssh-ed25519@openssh.com
trace: generating key type ecdsa-sha2-nistp256
FAIL: ssh-keygen for sk-ssh-ed25519@openssh.com failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
trace: generating key type ecdsa-sha2-nistp384
trace: generating key type ecdsa-sha2-nistp521
trace: using cached key type ecdsa-sha2-nistp256
trace: using cached key type ecdsa-sha2-nistp384
trace: generating key type sk-ecdsa-sha2-nistp256@openssh.com
trace: using cached key type ecdsa-sha2-nistp521
trace: generating key type sk-ecdsa-sha2-nistp256@openssh.com
trace: generating key type ssh-dss
FAIL: ssh-keygen for sk-ecdsa-sha2-nistp256@openssh.com failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
trace: generating key type ssh-rsa
trace: using cached key type ssh-dss
trace: generating key type ssh-rsa
FAIL: ssh-keygen for ssh-rsa failed
Saving debug logs to /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/failed--logs.tar
"""

I also see lines like:

"""
/tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/ssh-rsa already exists.
Overwrite (y/n)? ssh-keygen for ssh-rsa failed
"""

on the console while the tests are running.

Thanks!
Jack
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: 9.6p1 test suite help [ In reply to ]
On Thu, 21 Dec 2023 at 15:52, Jack Hill <jackhill@jackhill.us> wrote:
[...]
> /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/ssh-rsa already exists.
> Overwrite (y/n)? ssh-keygen for ssh-rsa failed

The regression tests do this to regenerate the keys if either the
keygen binary has changed:

for t in ${SSH_KEYTYPES}; do
# generate user key
if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN_BIN} -nt $OBJ/$t ]; then
trace "generating key type $t"
rm -f $OBJ/$t
${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\
fail "ssh-keygen for $t failed"

Given that the first couple of key types succeeded, my guess is that
you're running the tests with "make -j2" or higher and the two
instances of test-exec.sh are racing each other. That generally won't
work (there's a subset of tests that could be run in parallel,
generally the ones with no side effects, but we don't currently
support that).

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: 9.6p1 test suite help [ In reply to ]
On Thu, 21 Dec 2023, Darren Tucker wrote:

> On Thu, 21 Dec 2023 at 15:52, Jack Hill <jackhill@jackhill.us> wrote:
> [...]
>> /tmp/guix-build-openssh-9.6p1.drv-0/openssh-9.6p1/regress/ssh-rsa already exists.
>> Overwrite (y/n)? ssh-keygen for ssh-rsa failed
>
> The regression tests do this to regenerate the keys if either the
> keygen binary has changed:
>
> for t in ${SSH_KEYTYPES}; do
> # generate user key
> if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN_BIN} -nt $OBJ/$t ]; then
> trace "generating key type $t"
> rm -f $OBJ/$t
> ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\
> fail "ssh-keygen for $t failed"
>
> Given that the first couple of key types succeeded, my guess is that
> you're running the tests with "make -j2" or higher and the two
> instances of test-exec.sh are racing each other. That generally won't
> work (there's a subset of tests that could be run in parallel,
> generally the ones with no side effects, but we don't currently
> support that).

Indeed, it was. Thanks for pointing that out. We should hopefully have the
new release in Guix soon*.

Best,
Jack

* https://issues.guix.gnu.org/67948
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev