2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

13 Commits

Author SHA1 Message Date
Radostin Stoyanov
ede018176c make: remove checks for python 2 binary
This commit removes the checks for the Python 2 binary in the makefile
and makes sure that ZDTM tests always use python3. Since support for
Python 2 has been dropped, these checks are no longer needed.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2023-10-22 13:29:25 -07:00
Pavel Tikhomirov
b023f0ab5a vim: remove wrong 8-space tabs indent from python files
Probably all vim users can setup their desired indent in their vimrc by
themselfs.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
2021-09-03 10:31:00 -07:00
Alexander Mikhalitsyn
b9c8e957d8 crit-recode: skip (not try to parse) nftables raw image
We should ignore (not parse) images that has non-crtool format,
that images has no magic number (RAW_IMAGE_MAGIC equals 0).

nftables images has format compatible with `nft -f /proc/self/fd/0`
input format.

Reported-by: Mr Jenkins
Signed-off-by: Alexander Mikhalitsyn (Virtuozzo) <alexander@mihalicyn.com>
2020-03-27 19:36:20 +03:00
Andrei Vagin
5aa72e7237 py: Reformat everything into pep8 style
As discussed on the mailing list, current .py files formatting does not
conform to the world standard, so we should better reformat it. For this
the yapf tool is used. The command I used was

  yapf -i $(find -name *.py)

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2019-09-07 15:59:56 +03:00
Radostin Stoyanov
7ce23b2a74 python: Remove unused imports
Auto-detected with pylint.

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2018-10-30 19:28:01 +03:00
Andrei Vagin
33b6cff41f test: make crit-recode.py python2/python3 compatible
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:48 +03:00
Andrei Vagin
ece55818e3 test: import pycriu by its right name
Otherwise one library will be imported twice by two different names: py
and pycriu, because pycriu is used in the library.

https://github.com/checkpoint-restore/criu/issues/495
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-07-09 18:26:48 +03:00
Andrew Vagin
be663b002d test/crit-recode: skip images with zero size
Now we have many tests with the crfail flags. When criu dump fails,
criu may create image files, but doesn't fill them.

Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:12:26 +03:00
Andrew Vagin
877558fc8c test/crit-recode: skip rule-%d.img
These images are generated by the ip tool.

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:12:26 +03:00
Pavel Emelyanov
3bf5c88126 jenkins: Fix crit-recode's pycriu new module name
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-25 15:39:57 +03:00
Ivan Shapovalov
7f0643f9c3 treewide: specify 'python2' instead of 'python' in shebangs of python scripts
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-20 14:11:49 +03:00
Pavel Emelyanov
3606e755ce crit: Do not recode new netns-ct/-exp images
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-08 13:07:05 +03:00
Pavel Emelyanov
3825c3e5d4 crit: Speed up jenkins test ~60 times
Running crit tool 4 times per test (decode, encode, decode --pretty
and encode back again) is way too slow. The majority of time, as
it turned out, goes on python load and arguments parsing. The en-
and de-coding works pretty fast.

So doing re-code logic in one python script for ALL images is way
way faster -- ~1 hour vs ~1 minute on my box.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-12-11 16:36:05 +03:00