]> iEval git - linux-seccomp.git/blame_incremental - libseccomp/tests/28-sim-arch_x86.py
Bump version and update Changes
[linux-seccomp.git] / libseccomp / tests / 28-sim-arch_x86.py
... / ...
CommitLineData
1#!/usr/bin/env python
2
3#
4# Seccomp Library test program
5#
6# Copyright (c) 2015 Red Hat <pmoore@redhat.com>
7# Author: Paul Moore <paul@paul-moore.com>
8#
9# Adapted from 29-sim-arch_x86.c by Mathias Krause <minipli@googlemail.com>
10#
11
12#
13# This library is free software; you can redistribute it and/or modify it
14# under the terms of version 2.1 of the GNU Lesser General Public License as
15# published by the Free Software Foundation.
16#
17# This library is distributed in the hope that it will be useful, but WITHOUT
18# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
20# for more details.
21#
22# You should have received a copy of the GNU Lesser General Public License
23# along with this library; if not, see <http://www.gnu.org/licenses>.
24#
25
26import argparse
27import sys
28
29import util
30
31from seccomp import *
32
33def test(args):
34 f = SyscallFilter(ALLOW)
35 f.remove_arch(Arch())
36 # add x86-64 and x86 (in that order!) but explicitly leave out x32
37 f.add_arch(Arch("x86_64"))
38 f.add_arch(Arch("x86"))
39 f.add_rule(ERRNO(1), "close")
40 return f
41
42args = util.get_opt()
43ctx = test(args)
44util.filter_output(args, ctx)
45
46# kate: syntax python;
47# kate: indent-mode python; space-indent on; indent-width 4; mixedindent off;
This page took 0.021934 seconds and 4 git commands to generate.