History log of /external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d6d11d08678aac1ed2c370ea8e42e5f45aea07be 09-Mar-2015 Cyril Hrubis <chrubis@suse.cz> Introduce tst_parse_opts()

The pattern that was used in all testcases is:

const char *msg;

msg = parse_opts(...);
if (msg)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);

This change simplifies the steps to just calling:

tst_parse_opts(...);

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
aabb8340f63ed31afe995fd97795e542dc68b93c 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Include usctest.h in test.h

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
605fa3362fd7cef0baa2131be32cf44661783d3e 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Get rid of TEST_CLEANUP

Special thanks to Coccinelle for making this easy job.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
526fdf8d8ea3b43b73de7cc25eb754f12702c8d2 04-Dec-2014 Cyril Hrubis <chrubis@suse.cz> Change tst_resm() followed by tst_exit() to tst_brkm()

Created with coccinelle patch:

@@
expression list L;
expression C != {TINFO, TPASS};
@@
- tst_resm
+ tst_brkm
(C,
+ NULL,
L);
- tst_exit();

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
0b9589f3f9c0345b29cfcf7da5a1253c708303eb 27-May-2014 Cyril Hrubis <chrubis@suse.cz> testcases: Constify char *msg variable.

The parse_opts() now returns const char * instead of char * this commit
fixes all warnings caused by the change.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
840aa557b026c08b8d8b975e62175dfd6157ef3b 06-Nov-2013 Helge Deller <deller@gmx.de> sendfile08: fix buf comparison

The sendfile08 testcase uses the sendfile() syscall
to write the strings "hello" and "world" to a file descriptor
and then reads them back in through another file descriptor.

The length of the strings written are determined by strlen(),
so that in total 10 bytes are written.

When reading the strings back in, again 10 bytes are read, but
the problem is, that those are read back into a *local* string
buffer array (buf[]) which hasn't been initialized.

Afterwards,
strcmp(buf, "helloworld")
is called to compare input and output.
This strcmp() is wrong, because basically "helloworld\0"
(with the trailing string zero terminator) is compared to
"helloworld" (likely without a trailing zero in the buf[] array).

So, if buf[] hasn't been initialized, it's not guaranteed
that the byte in buf[10] equals to '\0'.

This problem was found on hppa64-linux-gnu architecture, most
likely, because it's a stack-grows-up architecture.

Fix this by using strncmp().

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
3ca2875346af8e46ce81f4071e57f6f62c2fbad8 26-Jun-2013 Wanlong Gao <gaowanlong@cn.fujitsu.com> sendfile08: disable this test on kernel less than 2.6.33

After kernel commit cc56f7d, sendfile(2) can support any file refered
"out_fd" instead of only socket.
Since this test for general file refered "out_fd", so we disable this
test on the kernel less than 2.6.33.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Reviewed-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
354ebb48db8e66a853a58379a4808d5dcd1ceac3 07-Dec-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> cleanup code indent

Cleanup the code indent using:

find . -name *.c -exec Lindent {} \;

It's really a big change, but can fix almost all of
the indent problem in C code, although we can't
ensure all of the changes are right, but the error
changes are really few.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
4548c6cf9bcdd96d8303caa4130ab638b61f8a30 19-Oct-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> Update FSF address

find . -type f -exec sed -i 's/675 Mass Ave, Cambridge, MA 02139, USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;
find . -type f -exec sed -i 's/59 Temple Place, Suite 330, Boston, MA 02111-1307 USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA/g' {} \;

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c
65248a93180f1c77b39931dcaa1506cb3aa96299 11-Jan-2012 Eryu Guan <eguan@redhat.com> syscalls/sendfile08: new test case for sendfile(2) syscall

A bug in the splice code had caused the file position on the write side
of the sendfile system call to be incorrectly set to the read side file
position. This can result in the data being written to an incorrect offset.

This is a regression test for kernel commit
2cb4b05e7647891b46b91c07c9a60304803d1688

Signed-off-by: Eryu Guan <eguan@redhat.com>
/external/ltp/testcases/kernel/syscalls/sendfile/sendfile08.c