Daniel Stenberg <daniel-7AX/[EMAIL PROTECTED]> writes:

> On Fri, 21 Nov 2008, Simon Josefsson wrote:
>
>> I'm thinking that the self-tests could start 'sshd' with appropriate 
>> parameters that would work for ordinary users, with a dummy host key, and 
>> then invoke some libssh2 self-test against that ssh server.  Do you think 
>> this would be useful?
>
> Yes, that would be very useful! Getting a test suite system setup will
> help us greatly, not only to verify that we don't regress too much but
> also to work on bug fixes easier when we can create test cases to
> repeat problems.

Agreed.

>> I have some sketchy ideas how it would work (using a TESTS_ENVIRONMENT 
>> script that wraps the libssh2 self-tests), and could propose some patches if 
>> I find time, so you can see more in detail what I mean.
>
> I would imagine that we have a separate dir in which we can write test
> applictions and then we have some file/description that describes what
> to feed to the test and what the expected output from the test is so
> that a "run-them-all" script can run all (or single) tests and verify
> that they did fine. (This is bascially what we have for (lib)curl and
> that works pretty good.)

I've added a starting pointer now, it works for me but no guarantees.
Please test!  See tests/ssh2.c and tests/ssh2.sh.

There is a nit with OpenSSH run as non-root: it dies trying to update
the last-log on the system, which is understandable because it does not
have appropriate write access.  I've not found any way to disable this
behaviour in OpenSSH. :( So right now the script does not diagnose
OpenSSH errors.  Fixing it would be nice, but not critical.

/Simon


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to