[CRIU] [PATCH 1/1] zdtm: Add checkskip scripts for OFD locks
Andrei Vagin
avagin at virtuozzo.com
Sat Jan 14 17:04:13 PST 2017
On Sun, Jan 15, 2017 at 02:50:22AM +0300, Pavel Begunkov wrote:
> This is needed in cases when kernel doesn't support OFD locks.
> (OFD locks were added in 2014).
>
> Signed-off-by: Pavel Begunkov <asml.silence at gmail.com>
> Signed-off-by: Eugene Batalov <eabatalov89 at gmail.com>
> ---
> test/zdtm/static/file_locks06.checkskip | 15 +++++++++++++++
> test/zdtm/static/file_locks07.checkskip | 1 +
> test/zdtm/static/file_locks08.checkskip | 1 +
> 3 files changed, 17 insertions(+)
> create mode 100755 test/zdtm/static/file_locks06.checkskip
> create mode 120000 test/zdtm/static/file_locks07.checkskip
> create mode 120000 test/zdtm/static/file_locks08.checkskip
>
> diff --git a/test/zdtm/static/file_locks06.checkskip b/test/zdtm/static/file_locks06.checkskip
> new file mode 100755
> index 0000000..6ae1c8c
> --- /dev/null
> +++ b/test/zdtm/static/file_locks06.checkskip
> @@ -0,0 +1,15 @@
> +#!/usr/bin/env python2
> +import fcntl
> +import tempfile
> +import struct
> +
> +F_OFD_SETLK = 37
> +
> +try:
> + with tempfile.TemporaryFile() as fd:
> + flock = struct.pack('hhllhh', fcntl.F_RDLCK, 0, 0, 0, 0, 0)
> + fcntl.fcntl(fd.fileno(), F_OFD_SETLK, flock)
> +except:
Pls, specify exceptions which you are going to handle here and print a
message
> + exit(1)
> +
> +exit(0)
> diff --git a/test/zdtm/static/file_locks07.checkskip b/test/zdtm/static/file_locks07.checkskip
> new file mode 120000
> index 0000000..c347a78
> --- /dev/null
> +++ b/test/zdtm/static/file_locks07.checkskip
> @@ -0,0 +1 @@
> +./zdtm/static/file_locks06.checkskip
> \ No newline at end of file
> diff --git a/test/zdtm/static/file_locks08.checkskip b/test/zdtm/static/file_locks08.checkskip
> new file mode 120000
> index 0000000..c347a78
> --- /dev/null
> +++ b/test/zdtm/static/file_locks08.checkskip
> @@ -0,0 +1 @@
> +./zdtm/static/file_locks06.checkskip
> \ No newline at end of file
> --
> 2.10.0
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list