Mailing List Archive

Command-line setup to reproduce regression tests?
Hello,

I'm working on adding the support of Edwards PKCS#11 keys to openssh (WIP,
https://github.com/beldmit/openssh-portable/tree/pkcs11_edwards).

To find out the missing codepaths, I need to reproduce the test scenarios
from regress/agent-pkcs11.sh from the command line. Could anybody please
give some hints which environment variables should be set for it?

Many thanks in advance!

--
Dmitry Belyavskiy
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Command-line setup to reproduce regression tests? [ In reply to ]
On Thu, 4 Feb 2021, Dmitry Belyavskiy wrote:

> Hello,
>
> I'm working on adding the support of Edwards PKCS#11 keys to openssh (WIP,
> https://github.com/beldmit/openssh-portable/tree/pkcs11_edwards).
>
> To find out the missing codepaths, I need to reproduce the test scenarios
> from regress/agent-pkcs11.sh from the command line. Could anybody please
> give some hints which environment variables should be set for it?

If you just want to run the test directly then you can do something
like "make tests LTESTS=agent-pkcs11 SKIP_UNIT=1"

Otherwise, you can run the test and then reuse the generated files.
Something like this might work:

$ make tests LTESTS=agent-pkcs11 SKIP_UNIT=1
./ssh -F regress/ssh_proxy xx

-d
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: Command-line setup to reproduce regression tests? [ In reply to ]
Hi.

On Fri, 5 Feb 2021 at 02:54, Dmitry Belyavskiy <dbelyavs@redhat.com> wrote:
> I'm working on adding the support of Edwards PKCS#11 keys to openssh (WIP,
> https://github.com/beldmit/openssh-portable/tree/pkcs11_edwards).
>
> To find out the missing codepaths, I need to reproduce the test scenarios
> from regress/agent-pkcs11.sh from the command line. Could anybody please
> give some hints which environment variables should be set for it?

What I normally do when I'm trying to debug a failing regression test
is 1) add "set -x" to the top of either test-exec.sh or the test in
question then 2) run the test with TEST_SSH_FAIL_FATAL=yes, which
causes the test driver to exit immediately exit. (If the test
involves a running server, you might also have to comment out the
cleanup.

With a bit of luck you can usually re-run the failing command at the
command line. Since you're reliant on the environment, you might want
to add a "set" to fail() to dump the environment on the way out so you
can grab the appropriate bits.

I was going to include instructions for running a single test but I
see Damien just beat me to it.

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
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