[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running 'pkd' in Nightly and Coverage Builds


>> How would I go about getting the 'pkd_hello' testcase running in the nightly
>> and code coverage builds as found at https://test.libssh.org?  Is this a
>> matter of modifying some set of CMakefiles?  I'd be happy to help get this
>> test enabled in CI by default, including any fixups it may need to run in
>> that environment.
> 
> for this we need support for cwrap [1]. I've started to implement one test 
> with socket_wrapper. This allows us to start sshd with the config options we 
> need.

Ah, I am confused here: why would we need either cwrap or 'sshd' for doing the
testing that 'pkd_hello' already does?  'pkd' implements the server-side half
of libssh-based pubkey auth and simple data transmission.  There shouldn't be
any reason to need to use preload-based testing here or to deal with any
'sshd', for the codepaths that 'pkd' tests.

> Idea for pkd_hello:
> 
> Create a tests/server directory. Move the pkd server to that directory and 
> start it with socket_wrapper. Then implement tests with cmocka ...

The 'pkd' tests are already written using the cmocka headers and init/teardown
functions:

  http://git.libssh.org/projects/libssh.git/tree/tests/pkd/pkd_hello.c#n405

It's not clear to me what we would gain by using a socket_wrapper to hook
socket calls here?  Just trying to understand the suggestion: why would we
use that for this test?


-Jon

Follow-Ups:
Re: Running 'pkd' in Nightly and Coverage BuildsAndreas Schneider <asn@xxxxxxxxxxxxxx>
References:
Running 'pkd' in Nightly and Coverage BuildsJon Simons <jon@xxxxxxxxxxxxx>
Re: Running 'pkd' in Nightly and Coverage BuildsAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org