Add more information to traffic suite timeout failures

In particular, have the resulting badmatch contain the starting and
ending time. There are still sporadic failures on slow hosts.
Lighten up on suite timetraps

Due to sporadic timeouts one some (slow) hosts.
Add gen_tcp suite

This is initially to identify the source of some flakiness on Windows.
Minor traffic suite fix

Point was to test that Session-Id was not undefined. Instead, test case
send_error just returned false.
Add examples testcase to help identify timetrap failures

There are still enslave/1 failures on some hosts despite a 2 minute
timetrap.
Teach c:ls/1 to show non-directory files

In an email to erlang-questions, Bengt Kleberg wrote:

    When I use c:ls/1 it reminds me so much of Unix "ls" that I
    expect c:ls("filename") to work. The resulting error surprises
    me every time (not the same day).

While teaching c:ls/1 to show non-directory files, update the
error handling to make use of the POSIX error codes from
file:list_dir/1 and file:format_error/1 (which had not been
invented when the c module was first implemented).

Suggested-by: Bengt Kleberg
Test-suite-by: Bengt Kleberg
Merge branch 'anders/diameter/timetraps/OTP-10914' into maint

* anders/diameter/timetraps/OTP-10914:
  Add examples testcase to help identify timetrap failures
  Minor traffic suite fix
  Add gen_tcp suite
  Lighten up on suite timetraps
  Add more information to traffic suite timeout failures
Merge branch 'bjorn/stdlib/improve-ls/OTP-11108' into maint

* bjorn/stdlib/improve-ls/OTP-11108:
  Teach c:ls/1 to show non-directory files
Small fix to to_erl

Dear all,

we've stumbled across a small problem.

One of our devices does not like 'to_erl' to be run over a serial port.
When to_erl is started, we see "Attaching to /tm<0xFF>" being printed
and the device then refuses to accept any input. Occasionally, we have
seen a linux kernel error message "serial8250: too much work for irq16"
simultaneously. After some debugging we found out that cause is a call
to tcsetattr() by to_erl, immediately preceeded by some printf().

The UART in our device doesn't like hardware parameters to be changed
while output is concurrently active. In fact, the GNU libc manual also
mentions that it might be dangerous to change UART hardware parameters
when a transmission is ongoing.

The patch attached to this e-mail changes the behaviour of to_erl to use
TCSADRAIN instead of TCSANOW when changing terminal parameters. This
makes the serial driver wait for the output queues to be empty before
applying the terminal parameter change.

Kind regards,

--
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: stefan.zegenhagen@arcutronix.com
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

>From 1f84b4ebd46da83e317cb15a37ef7d12206687df Mon Sep 17 00:00:00 2001
From: Stefan Zegenhagen <stefan.zegenhagen@arcutronix.com>
Date: Wed, 29 May 2013 16:22:34 +0200
Subject: [PATCH] Fix changing terminal parameters in to_erl

to_erl is changing quite a number of terminal parameters that might
affect the underlying serial port hardware. The UART, however, may
dislike this parameter change when output is concurrently active, so use
TCSADRAIN instead of TCSANOW for changing the terminal parameters.
Merge branch 'dg/win_icon' into pu
Merge branch 'rc/break-out-asserts' into pu
Merge branch 'ao/fix_mnesia_block_table_exception' into pu
Merge branch 'sze/ssh_cli_handles' into pu
Merge branch 'sze/edlin_understand_keys' into pu
Merge branch 'sze/limit_max_length_int_shell' into pu
Merge branch 'yi/fix_eunit_io_protocol' into pu
Merge branch 'nox/fix-fname-inlining' into pu
Merge branch 'nox/igor-funs' into pu
Merge branch 'sze/to_erl' into pu