Commit Graph

1252 Commits

Author SHA1 Message Date
John Hood dc292dcdaa Test for spinning Mosh 2016-11-06 06:15:42 -05:00
John Hood 9c55198635 Fix off-by-one error on timeouts for input history echo updates 2016-11-06 06:15:42 -05:00
John Hood 3e414c46b3 Update send/ack timers on empty diff
The root problem here is that writes to the frame buffer may alter it,
but leave it with the same contents as before, and the diff between
the two states is the empty string.  With the dirty-rows,
smart-pointer changes to Framebuffer, it is easy to run into this
situation.  This got Network::TransportSender confused about timeouts,
and mosh-server would spin.

The theoretically correct fix would be to have operator==() exactly
correspond to diff(otherstate).empty().  I have partly implemented
this (and may yet finish) but it's not trivial to get right.

This is a much simpler fix that simply attempts to correctly update
timers when two framebuffers are different and an empty diff is
generated.
2016-11-06 06:15:41 -05:00
John Hood 9ffbeddbc8 Put spin debug under -vv flag, and add to mosh-client 2016-11-06 06:15:41 -05:00
John Hood f89f1da0b5 Log/limit pselect() with timeout of 0
This is not a fix for bad timeouts, but rather a band-aid
to keep Mosh from consuming large amounts of CPU time.
2016-11-06 06:15:41 -05:00
John Hood 45c521d632 Do not close stdin on ssh session.
This helps with #819.
2016-11-06 06:15:41 -05:00
John Hood 444eae1fc4 Add tests to run Mosh repeatedly. 2016-11-06 06:15:41 -05:00
John Hood 22f5d58144 Exit gracefully on pty write or ioctl failure.
Fixes #821, OS X abnormal exit on client input at mosh-server
shutdown.  On OpenIndiana, TIOCG[GS]WINSZ also fail in this situation.
2016-11-06 06:14:02 -05:00
John Hood 4bc9e5c6ab Handle printing to closed pipes better in tests.
Some systems do not deliver SIGPIPE to shell pipeline writers when the
downstream reader has exited.  So, also check for errors from
/bin/printf.  I fixed this for OpenBSD 6.0 but I think it will also
fix posh on Linux.
2016-11-06 06:09:49 -05:00
John Hood 795549aafb OpenIndiana pid_t is long int 2016-11-06 06:09:49 -05:00
John Hood dd9ee1c4b7 Remove unused include 2016-11-06 02:47:20 -05:00
Anders Kaseorg b76d1bd526 e2e-test: Add newline to “unknown test type argument” error
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
Anders Kaseorg 8a8f2b29ca Fix most shell hygiene issues found by shellcheck
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-04 03:15:03 -04:00
John Hood 3b21cd2425 make V=1
Resolves #786.
2016-10-31 00:53:50 -04:00
John Hood 723e7858bc Cleanup AppVeyor Git checkout more safely. 2016-10-29 21:13:53 -04:00
John Hood 9005ea6cf3 Use a table lookup for base64 decode 2016-10-29 20:50:33 -04:00
John Hood f728456898 Handle more warnings from protobuf on OS X compile 2016-10-29 20:48:48 -04:00
Jakub Wilk 42d686882f Fix typos 2016-10-09 16:04:42 +02:00
John Hood dcd7866d84 Try the Xcode 8 image. 2016-10-01 00:48:43 -04:00
John Hood b0facb55c4 Test carefully for clock_gettime() and CLOCK_MONOTONIC 2016-09-29 01:10:23 -04:00
John Hood f429fd38b0 Use old AppleCommonCrypto name for AES 2016-09-25 22:24:03 -04:00
John Hood 477729b315 tests: improve robustness
Replace some blind timeouts with actual synchronization.
Improve performance on some slow tests.
Tweak some of the remaining timeouts.

This still isn't good enough to get 'make -j9 check'
working reliably on Cygwin for me; I think some Cygwin/
Windows scheduling issues remain.
2016-09-20 06:25:43 -04:00
John Hood e494025b24 Work around "make distcheck" fail on OS X with protobuf 3.02. 2016-09-19 13:56:47 -04:00
John Hood e734d5e41a tests: Work around tmux display corruption bug on OpenBSD.
See https://github.com/tmux/tmux/issues/539
2016-09-19 13:23:16 -04:00
John Hood 46b30e6851 AppVeyor CI configuration using Cygwin.
This also serves nicely as documentation of the Cygwin build
requirements.
2016-09-19 13:23:16 -04:00
John Hood 1077db41b6 Support OpenBSD 6.0 pledge() syscall for sandboxing. 2016-09-19 13:23:16 -04:00
John Hood 5619dd47bb tests: fix incorrect usage of "trap ... SIGHUP"
Discovered with OpenBSD 6.0 /bin/sh
2016-09-19 13:23:16 -04:00
John Hood 39ea3d9512 Fix excess newlines on mosh startup/shutdown.
Fixes #788.

This also works around issues with remote pty typeahead echo corrupting output
from mosh-server.
2016-09-19 13:23:16 -04:00
John Hood 70d48fbcc0 Add --no-ssh-pty option.
This eliminates issues with typeahead being echoed by the remote pty
and corrupting remote output from mosh-server to the mosh script, but
cannot be made default because older mosh-servers require a pty.
2016-09-19 13:23:15 -04:00
John Hood 8945efeb82 Allow server to bind an OS-selected UDP port with -p 0.
It looks like Mosh used to be able to do this but the capability was
lost when port ranges were added in 141ec23.
2016-09-19 13:23:15 -04:00
John Hood c599987ff8 Fix object sizing for PMTUD setsockopt() and recvmsg().
Also cleans up other setsockopt() calls, and buffer sizing/handling
for recvmsg().

These are minor errors and no actual misbehavior was observed.
Discovered while working Windows Subsystem for Linux compatibility
issues.
2016-09-19 13:23:15 -04:00
John Hood 4ad131a55d Fix lost MOSH CONNECT on FreeBSD 11
This moves all routine stdout/stderr output into the parent
server, and adds tcdrain(), even though this may be a
FreeBSD pty bug.
2016-09-18 01:53:36 -04:00
john hood b7d081056b Fix CPPFLAGS handling possibly causing curses detection failure
This is an old, old bug.
2016-09-18 01:52:50 -04:00
Andrew Chin c8aa151685 Travis-ci bot doesn't need to join #mosh to send notifications
If #mosh ever sets the +n channel mode, we'll need to remove the
`skip_join: true` part
2016-08-16 07:50:41 -04:00
Keith Winstein ddb5fd9d7a README.md: More http -> https for links 2016-08-12 00:13:22 -07:00
Keith Winstein a09381d161 http -> https links for mosh.org 2016-08-12 00:11:47 -07:00
Keith Winstein ca2750dd03 Update website location (mosh.mit.edu -> mosh.org) 2016-08-12 00:10:53 -07:00
Keith Winstein 11251ffa9e Add build-source-package.sh 2016-08-10 12:00:42 -07:00
Keith Winstein da7c87a822 Add test for nonce incrementing 2016-08-10 04:49:52 -07:00
Keith Winstein 68f91a0b43 mosh 1.2.6 2016-08-10 01:05:47 -07:00
John Hood 5f92a8a835 Bump version to 1.2.6.
Signed-off-by: John Hood <cgull@glup.org>
2016-07-30 21:36:55 -07:00
John Hood 8211b88420 Don't use user's .tmux.conf
It may contain configuration that breaks our testing.
2016-07-21 01:19:23 -04:00
John Hood ece4280401 Reduce IPv4 MTU to 1280.
Seems to fix #773.
2016-07-12 01:06:01 -04:00
John Hood af8ddd090e Add options to prefer v4 or v6 on connect; make prefer-inet the default.
Resolves #764, mostly.
2016-07-10 23:30:24 -04:00
John Hood 1b2ddc2e81 Make OS X mDNS/Bonjour .local IPv6 addresses work.
OS X advertises IPv6 link-local addresses for .local hostnames.
getaddrinfo() correctly reports interface identifiers for these, but we
were discarding them by using the socket peer host address instead.
2016-06-09 11:51:35 -04:00
Robin H. Johnson 274b5a4d14 bind-server: accept any value to option.
Rather than trying to validate, accept any option to the bind-server
option, and allow mosh-server to validate it, as noted by
https://github.com/mobile-shell/mosh/pull/670#issuecomment-135147605

Fixes: 669
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-06-09 00:31:49 -04:00
John Hood 05fe24d50d 1.2.5.95rc1 pre-release 2016-05-25 02:13:12 -04:00
John Hood adc3593808 bash-completion file is not a standalone script
Fixes a Lintian warning.
2016-05-25 02:13:12 -04:00
John Hood e167b2f9c0 Debian packaging fixes and updates. 2016-05-25 02:13:11 -04:00
John Hood e89c4fcb65 update .gitignores 2016-05-24 18:43:51 -04:00