2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Adrian Reber
93dd984ca0 Run 'make indent' on all C files
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Adrian Reber <areber@redhat.com>
2021-09-03 10:31:00 -07:00
Kir Kolyshkin
10c619adb9 test/zdtm: pr_err / pr_perror fixes
1. Use pr_perror where errno needs to be shown.

2. Use pr_err in cases where errno is not set
   by the previous failed call.

3. Make sure pr_err's first argument do not have \n.

4. While at it, fix some error messages.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-09-03 10:31:00 -07:00
Kir Kolyshkin
b20694835d test/zdtm: don't use \n with fail()
Macro fail already appends \n to the message, so there's no need to do
it explicitly.

Brought to you by

	for f in $(git grep -l fail test/zdtm); do
		test -f $f || continue
		echo $f
		sed -i '\%^[[:space:]]*fail(.*\\n"%s/\\n"/"/' $f
	done

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-09-03 10:31:00 -07:00
Dmitry Safonov
6ab2bdd940 zdtm/socket-tcp-fin-wait1: Use array index fro TEST_MSG
Fixes the following compile-error:
>  CC        socket-tcp-fin-wait1.o
> socket-tcp-fin-wait1.c:144:26: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
>                 if (write(fd, TEST_MSG + 2, sizeof(TEST_MSG) - 2) != sizeof(TEST_MSG) - 2) {
>                               ~~~~~~~~~^~~
> socket-tcp-fin-wait1.c:144:26: note: use array indexing to silence this warning
>                 if (write(fd, TEST_MSG + 2, sizeof(TEST_MSG) - 2) != sizeof(TEST_MSG) - 2) {
>                                        ^
>                               &        [  ]
> 1 error generated.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-02-04 12:39:04 -08:00
Andrei Vagin
00413cb5a7 test: check ipv6 sockets which handle ipv4 connections
A server socket is created with AF_INET6, but a client
socket is create with AF_INET.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-11-23 20:23:14 +03:00
Andrei Vagin
673f18d05c zdtm: fix typo in socket-tcp-.*
CID 174774 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return 1;.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-02-01 18:41:30 +03:00
Andrey Vagin
7c07a7fb4b zdtm: add test cases on TCP_FIN_WAIT* states
TCP_FIN_WAIT1 our side has shutdown, waiting to complete
	  transmission of remaining buffered data

TCP_FIN_WAIT2 all buffered data sent, waiting for remote
	  to shutdown

travis-ci: success for series starting with [01/21] build: install libnet-dev
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2017-01-16 11:04:49 +03:00