Commit Graph

11 Commits

Author SHA1 Message Date
Enji Cooper
eb1c509ffd Fix warnings with gcc 5.0
reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
2016-01-16 02:15:13 +00:00
Enji Cooper
b74bcac4bd - Don't use /tmp because it's outside ATF's prescribed sandbox
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-04-11 03:18:14 +00:00
Ed Maste
50185946a4 Add a sendfile regression test for transmit length > file size.
This test identified the issue fixed in FreeBSD-SA-13:11.sendfile.

Sponsored by:	The FreeBSD Foundation
Approved by:	re (glebius)
2013-09-10 13:51:19 +00:00
Pawel Jakub Dawidek
76423e6e3c Allow to specify path to a file we want to test with sendfile(2).
This allows to specify selected file system and not only /tmp/.
2010-12-11 16:06:52 +00:00
Rebecca Cran
8dd83f1e16 Update the sendfile regression test so that it outputs results in the
TAP format.
Add a checksum to verify that the data hasn't been corrupted between
being read from disk and being received.

Approved by:	rrs (mentor)
2010-02-24 23:00:16 +00:00
Maxim Konovalov
4225b7d6fa o Correct a comment: a test file size is a four pages not three. 2008-09-10 09:32:25 +00:00
Pawel Jakub Dawidek
d77f4f6a6f Test sending 0 bytes. 2007-04-20 19:01:42 +00:00
Pawel Jakub Dawidek
4b7e26d006 Fix length calculation. 2007-04-20 19:00:43 +00:00
Dag-Erling Smørgrav
f7754b09e2 Valid error codes for err() and errx() are 1..255.
The correct format specifier for ssize_t is %zd.
2007-04-19 07:59:30 +00:00
Pawel Jakub Dawidek
ed3d9b6e75 Add more tests to verify last sendfile(2) breakage: test sending more
than a page size and nbytes=0.
2007-04-19 06:01:08 +00:00
Robert Watson
0fb57f87a3 Add a basic regression test for sendfile() over TCP, which sends varying
lengths of headers and data and makes sure it receives about the right
number of bytes.
2006-05-25 09:50:14 +00:00