Commit graph

26 commits

Author SHA1 Message Date
Andrey Vagin
439de67a4b test/rpc: don't use the shell_job option
It isn't required.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-25 16:00:37 +03:00
Andrey Vagin
5075f278f6 test/rpc: don't call criu_resp__free_unpacked for NULL
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-25 16:00:29 +03:00
Andrey Vagin
bba4000c40 test/rpc: import the errno module
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-25 16:00:20 +03:00
Andrey Vagin
31475ffa6d test/rpc: track changes of the criu binary
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-25 16:00:13 +03:00
Andrew Vagin
8086675625 test/rpc: compile test-c
Fixes: 94928cf85d ("test/rpc: include unistd.h")
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-12 10:25:58 +03:00
Andrew Vagin
94928cf85d test/rpc: include unistd.h
gcc -c test.c -I ./
test.c: In function ‘recv_resp’:
test.c:18:8: warning: implicit declaration of function ‘read’ [-Wimplicit-function-declaration]
  len = read(socket_fd, buf, MAX_MSG_SIZE);
        ^
test.c: In function ‘send_req’:
test.c:45:6: warning: implicit declaration of function ‘write’ [-Wimplicit-function-declaration]
  if (write(socket_fd, buf, len)  == -1) {
      ^
test.c: In function ‘main’:
test.c:165:2: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
  close(fd);

Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-08-10 16:38:35 +03:00
Andrew Vagin
07816f654b test/rpc: write all files into the build/ directory
Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-05-12 11:28:35 +03:00
Andrew Vagin
8869d3ccc8 test/rpc: don't use shell-job
We want to execute this test in Jenkins.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-05-08 16:57:28 +03:00
Andrew Vagin
a2a0e2f2ed test/rpc: don't use shell-job
We want to execute this test in Jenkins.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-04-27 17:51:41 +03:00
Andrew Vagin
fe0afaa787 test/rpc: unlink pidfile at the end
It's required to execute the test a few times

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-04-27 17:51:34 +03:00
Ruslan Kuprieiev
d1d4c018e0 test: rpc: run test as a non-root user
It is nice to have non-root user case covered with tests.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-01-27 16:08:14 +03:00
Ruslan Kuprieiev
4d705e7200 test: crit: enhance test process
Use mature technics to organize test process.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-01-27 16:07:49 +03:00
Ruslan Kuprieiev
fe6255c2c6 test:rpc: add generated files to gitignore
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-01-27 16:06:19 +03:00
Ruslan Kuprieiev
8cba5a16dd test: rpc: cr_errno, v3
Lets simulate some errors and check what
error will be returned by service.

v2, fix tests accordingly to new errorlist
v3, fix tests accordingly to new errorlist, again

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-12-22 17:38:46 +03:00
Ruslan Kuprieiev
3b2ab35bc8 test: rpc: test page-server
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-09-22 16:30:48 +04:00
Ruslan Kuprieiev
c3078e79ec make: test: rpc: don't forget to delete rpc_pb2.pyc
When performing "make clean" rpc_pb2.pyc should be deleted as well.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-08-06 09:36:00 +04:00
Andrew Vagin
876def9546 test: add a target to execute non-zdtm tests
make -C test other

Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-06-24 22:50:43 +04:00
Kir Kolyshkin
1fa0c0c058 test/*Makefile: add/append PHONY targets
...where they are missing.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2014-01-11 09:12:35 +04:00
Andrey Vagin
254342be4e test/rpc: fix test execution
* fix compilation from the test/rpc directory

$ make
make: *** No rule to make target `/rpc.proto', needed by `rpc.pb-c.c'. Stop.

* use absolute path for pidfile

$ bash run.sh
**************************************************
		Shutdown service server
**************************************************

cat: pidfile: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ...
or kill -l [sigspec]

Cc: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-11-08 16:46:05 +04:00
Ruslan Kuprieiev
1f8768dff1 test: rpc: fix log_level in test.c and add log_level to test.py
Hi!

Added "has_log_level = true" to test.c, so "log_level = 4" would have effect.
Also added log_level to test.py, for symmetry with test.c.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-10-14 13:21:22 +04:00
Ruslan Kuprieiev
f5cd8bfdc3 test: rpc: restore
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-10-02 20:17:08 +04:00
Ruslan Kuprieiev
398705d4cb rpc: rename criu_dump_req to criu_opts
Lets rename CriuDumpReq to CriuOpts, for the sake of readability and to
avoid coping code for restore mechanism, as CriuDumpReq and
CriuRestoreResp would have almost the same fields. Also, it would be
easier to introduce other types of requests.

Signed-off-by: Ruslan Kuprieiev <kurpuser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-10-02 16:04:11 +04:00
Ruslan Kuprieiev
3c0ea1c9ca test: rpc: test.py
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-24 11:36:17 +04:00
Ruslan Kuprieiev
6c718214df test: rpc: test.c
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-24 11:36:15 +04:00
Ruslan Kuprieiev
8a200fd651 test: rpc: run.sh
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-24 11:36:14 +04:00
Ruslan Kuprieiev
4a856a5b0f test: rpc: Makefile
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-09-24 11:36:13 +04:00