Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Test failures with net-sftp #16

Open
graaff opened this Issue · 2 comments

3 participants

@graaff

When trying the tests from current master with ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] I'm getting a number of test failures. With ruby 1.8 I'm also seeing failures but the test suite appears to hang altogether. I'm seeing similar failures with the released 2.0.5.

  1) Failure:
test_from_buffer_should_correctly_parse_buffer_and_return_attribute_object(Protocol::V04::TestAttributes) [/home/graaff/playground/github-clones/net-sftp/test/protocol/04/test_attributes.rb:15]:
<9> expected but was
<5>.

  2) Failure:
test_from_buffer_should_correctly_parse_buffer_with_attribute_subset_and_return_attribute_object(Protocol::V04::TestAttributes) [/home/graaff/playground/github-clones/net-sftp/test/protocol/04/test_attributes.rb:47]:
<1> expected but was
<5>.

  3) Failure:
test_parse_name_packet_should_use_correct_name_class(Protocol::V04::TestBase) [/home/graaff/playground/github-clones/net-sftp/test/protocol/04/test_base.rb:25]:
<493> expected but was
<16777217>.

  4) Failure:
test_parse_name_packet_should_use_correct_name_class(Protocol::V05::TestBase) [/home/graaff/playground/github-clones/net-sftp/test/protocol/04/test_base.rb:25]:
<493> expected but was
<16777217>.

  5) Failure:
test_from_buffer_should_correctly_parse_buffer_and_return_attribute_object(Protocol::V06::TestAttributes) [/home/graaff/playground/github-clones/net-sftp/test/protocol/06/test_attributes.rb:9]:
<9> expected but was
<5>.

  6) Failure:
test_from_buffer_should_correctly_parse_buffer_with_attribute_subset_and_return_attribute_object(Protocol::V06::TestAttributes) [/home/graaff/playground/github-clones/net-sftp/test/protocol/06/test_attributes.rb:51]:
<1> expected but was
<5>.

  7) Failure:
test_parse_name_packet_should_use_correct_name_class(Protocol::V06::TestBase) [/home/graaff/playground/github-clones/net-sftp/test/protocol/04/test_base.rb:25]:
<493> expected but was
<16777217>.

  8) Error:
test_upload_directory_should_mirror_directory_structure_remotely(UploadTest):
RuntimeError: expected string "\x00\x00\x00\x1C\x0E\x00\x00\x00\x00\x00\x00\x00\x0F/path/to/remote\x00\x00\x00\x00" but got "\x00\x00\x00&\x03\x00\x00\x00\x00\x00\x00\x00\x15/path/to/remote/file1\x00\x00\x00\x1A\x00\x00\x00\x00"
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:46:in `block in process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:36:in `each'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:36:in `process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/script.rb:153:in `process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/extensions.rb:79:in `test_enqueue_packet'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/transport/session.rb:225:in `enqueue_message'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/connection/session.rb:368:in `send_message'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/connection/channel.rb:493:in `enqueue_pending_output'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/extensions.rb:105:in `send_data_for_test'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:814:in `send_packet'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/protocol/base.rb:45:in `send_request'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/protocol/01/base.rb:90:in `open'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:830:in `request'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:182:in `open'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:300:in `open_file'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:271:in `process_next_entry'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:173:in `initialize'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:98:in `new'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:98:in `upload'
    /home/graaff/playground/github-clones/net-sftp/test/test_upload.rb:113:in `block in test_upload_directory_should_mirror_directory_structure_remotely'
    /home/graaff/playground/github-clones/net-sftp/test/common.rb:56:in `block in assert_scripted_command'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test.rb:84:in `assert_scripted'
    /home/graaff/playground/github-clones/net-sftp/test/common.rb:54:in `assert_scripted_command'
    /home/graaff/playground/github-clones/net-sftp/test/test_upload.rb:112:in `test_upload_directory_should_mirror_directory_structure_remotely'
    /usr/lib64/ruby/gems/1.9.1/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_230_to_2101.rb:28:in `run'

  9) Error:
test_upload_directory_with_handler_should_report_progress(UploadTest):
RuntimeError: expected string "\x00\x00\x00\x1C\x0E\x00\x00\x00\x00\x00\x00\x00\x0F/path/to/remote\x00\x00\x00\x00" but got "\x00\x00\x00&\x03\x00\x00\x00\x00\x00\x00\x00\x15/path/to/remote/file1\x00\x00\x00\x1A\x00\x00\x00\x00"
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:46:in `block in process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:36:in `each'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/local_packet.rb:36:in `process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/script.rb:153:in `process'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/extensions.rb:79:in `test_enqueue_packet'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/transport/session.rb:225:in `enqueue_message'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/connection/session.rb:368:in `send_message'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/connection/channel.rb:493:in `enqueue_pending_output'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test/extensions.rb:105:in `send_data_for_test'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:814:in `send_packet'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/protocol/base.rb:45:in `send_request'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/protocol/01/base.rb:90:in `open'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:830:in `request'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:182:in `open'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:300:in `open_file'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:271:in `process_next_entry'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/operations/upload.rb:173:in `initialize'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:98:in `new'
    /home/graaff/playground/github-clones/net-sftp/lib/net/sftp/session.rb:98:in `upload'
    /home/graaff/playground/github-clones/net-sftp/test/test_upload.rb:121:in `block in test_upload_directory_with_handler_should_report_progress'
    /home/graaff/playground/github-clones/net-sftp/test/common.rb:56:in `block in assert_scripted_command'
    /usr/lib64/ruby/gems/1.9.1/gems/net-ssh-2.4.0/lib/net/ssh/test.rb:84:in `assert_scripted'
    /home/graaff/playground/github-clones/net-sftp/test/common.rb:54:in `assert_scripted_command'
    /home/graaff/playground/github-clones/net-sftp/test/test_upload.rb:120:in `test_upload_directory_with_handler_should_report_progress'
    /usr/lib64/ruby/gems/1.9.1/gems/mocha-0.12.3/lib/mocha/integration/mini_test/version_230_to_2101.rb:28:in `run'

419 tests, 1026 assertions, 7 failures, 2 errors, 0 skips
@kachick

It reprodued 2 errors for me too.

  • test_upload_directory_should_mirror_directory_structure_remotely(UploadTest):
  • test_upload_directory_with_handler_should_report_progress(UploadTest):

My Environments

  • Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
  • ruby 2.0.0dev (2013-01-11 trunk 38783) [x86_64-darwin11.4.2]
  • ruby 1.9.3p332 (2012-11-15 revision 37660) [x86_64-darwin11.4.2]
  • echoe (4.6.3)
  • mocha (0.13.1)
  • net-ssh (2.6.3)
  • test-unit (2.5.3)
@delano
Collaborator

graff, thanks for the original report. kachick, thanks for the confirmation. I can reproduce the same two more recent errors on Linux and OS X:

  • test_upload_directory_should_mirror_directory_structure_remotely(UploadTest)
  • test_upload_directory_with_handler_should_report_progress(UploadTest)

  • ruby 1.9.3p194 (2012-04-20) [x86_64-darwin12.0.0]

    • Darwin m-mtl-dev-delano-01.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
  • ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]

    • Linux bs3-dev-03 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I tracked the errors down to patch #12. I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.