----- Original Message ----- From: "Serguei Trouchelle" <[EMAIL PROTECTED]>
.
.

Try this:

ppm install http://trouchelle.com/ppm10/Net-SSH2.ppd


Didn't realize you had built one, Serguei.

When I use your ppm, if I run the attached test script (using the SSH2 server on my linux box at 192.168.0.3 for the extended tests) , the script segfaults after test 28 has been run. Here's the output:

-------------------------------------------
C:\_32\comp\Net-SSH2-0.18_5.10>perl t/Net-SSH2.t
1..72
ok 1 - use Net::SSH2;
ok 2 - new session isa Net::SSH2
ok 3 - error state clear
ok 4 - set banner
ok 5 - LIBSSH2_* constants
ok 6 - libSSH2 version 0.18 > 0.16
ok 7 - list version match
ok 8 - decimal version matches
ok 9 - banner is SSH-2.0-libssh2_0.18
ok 10 - poll indefinite
ok 11 - poll 1/4 second

To test the connection capabilities of Net::SSH2, we need a test site running
a secure shell server daemon.  Enter 'localhost' to use this host.

Select host [ENTER to skip]: 192.168.0.3

ok 12 - connect to 192.168.0.3
ok 13 - kex method: diffie-hellman-group-exchange-sha1
ok 14 - hostkey method: ssh-rsa
ok 15 - crypt_cs method: aes256-cbc
ok 16 - crypt_sc method: aes256-cbc
ok 17 - mac_cs method: hmac-sha1
ok 18 - mac_sc method: hmac-sha1
ok 19 - comp_cs method: none
ok 20 - comp_sc method: none
ok 21 - have MD5 hostkey hash
ok 22 - have SHA1 hostkey hash

Enter username: rob
ok 23 - authenticate: publickey,password,keyboard-interactive
ok 24 - list matches comma-separated
ok 25 - not authenticated yet

Enter password: ok 26 - authenticated via: password
ok 27 - authenticated successfully
ok 28 - new channel isa Net::SSH2::Channel
< At which point the process gets killed>
-------------------------------------------

With the ppm that I built (and which is now available from the uwinnipeg rep), that doesn't happen:

-------------------------------------------
C:\_32\comp\Net-SSH2-0.18_5.10>perl t/Net-SSH2.t
1..72
ok 1 - use Net::SSH2;
ok 2 - new session isa Net::SSH2
ok 3 - error state clear
ok 4 - set banner
ok 5 - LIBSSH2_* constants
ok 6 - libSSH2 version 0.18 > 0.16
ok 7 - list version match
ok 8 - decimal version matches
ok 9 - banner is SSH-2.0-libssh2_0.18
ok 10 - poll indefinite
ok 11 - poll 1/4 second

To test the connection capabilities of Net::SSH2, we need a test site running
a secure shell server daemon.  Enter 'localhost' to use this host.

Select host [ENTER to skip]: 192.168.0.3

ok 12 - connect to 192.168.0.3
ok 13 - kex method: diffie-hellman-group-exchange-sha1
ok 14 - hostkey method: ssh-rsa
ok 15 - crypt_cs method: aes256-cbc
ok 16 - crypt_sc method: aes256-cbc
ok 17 - mac_cs method: hmac-sha1
ok 18 - mac_sc method: hmac-sha1
ok 19 - comp_cs method: none
ok 20 - comp_sc method: none
ok 21 - have MD5 hostkey hash
ok 22 - have SHA1 hostkey hash

Enter username: rob
ok 23 - authenticate: publickey,password,keyboard-interactive
ok 24 - list matches comma-separated
ok 25 - not authenticated yet

Enter password: ok 26 - authenticated via: password
ok 27 - authenticated successfully
ok 28 - new channel isa Net::SSH2::Channel
ok 29 - set blocking
ok 30 - not at EOF
ok 31 - normal extended data handling
ok 32 - merge extended data
ok 33 - empty setenv
ok 34 - set environment variables
ok 35 - verify session
ok 36 - set disconnect callback
ok 37 - SFTP session isa Net::SSH2::SFTP
ok 38 - verify session
ok 39 - create directory net_ssh2_4048
ok 40 - stat directory
ok 41 - type is directory
ok 42 - directory name matches
ok 43 - put t/Net-SSH2.t to remote
ok 44 # skip - IO::Scalar required
ok 45 # skip - IO::Scalar required
ok 46 - unlink non-existant file fails
ok 47 - got LIBSSH2_FX_NO_SUCH_FILE error
ok 48 - rename net_ssh2_4048/Net-SSH2.t -> net_ssh2_4048/Net-SSH2.t.renamed
ok 49 - stat net_ssh2_4048/Net-SSH2.t.renamed
ok 50 - stat filename matches
ok 51 - stat filesize matches
ok 52 - opened file isa Net::SSH2::File
ok 53 - compare stat and fstat
ok 54 - compare fstat % and %$
ok 55 - opened directory isa Net::SSH2::Dir
ok 56 - found net_ssh2_4048/Net-SSH2.t.renamed
ok 57 - opened file isa Net::SSH2::File
'ot ok 58 - read '\# THIS LINE WILL BE READ BY A TEST BELOW
''  Failed test 'read '\# THIS LINE WILL BE READ BY A TEST BELOW
#   at t/Net-SSH2.t line 192.
'          got: '# THIS LINE WILL BE READ BY A TEST BELOW
#     expected: '# THIS LINE WILL BE READ BY A TEST BELOW'
ok 59 - unlink net_ssh2_4048/Net-SSH2.t.renamed
ok 60 - remove directory net_ssh2_4048
ok 61 - close SFTP session
ok 62 - exec 'ls -d /'
not ok 63 - got poll response
#   Failed test 'got poll response'
#   at t/Net-SSH2.t line 205.
not ok 64 - got input event
#   Failed test 'got input event'
#   at t/Net-SSH2.t line 206.
not ok 65 - got result '/'
#   Failed test 'got result '/''
#   at t/Net-SSH2.t line 208.
#          got: undef
#     expected: '/'
ok 66 - no more lines
ok 67 # skip  - public key infrastructure not present
ok 68 # skip  - public key infrastructure not present
ok 69 # skip  - public key infrastructure not present
ok 70 # skip  - public key infrastructure not present
ok 71 - close channel
ok 72 - sent disconnect message
# Looks like you failed 4 tests of 72.
-------------------------------------------

As you can see, it's not perfect either :-)

I should point out that the attached test script is essentially the one that ships with the Net-SSH2-0.18 source, but it has been modified to cater for some Win32-specific issues.

How was your libssh2 dynamic lib built ? My ppm was built against a static MinGW-built libssh2. I suspect that the difference as regards test 29 comes down to a difference between the respective C libraries.

Cheers,
Rob

Attachment: Net-SSH2.t
Description: Binary data

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to