Commit Graph

96 Commits

Author SHA1 Message Date
5d460ae383 seccomp: decode SECCOMP_GET_ACTION_AVAIL operation
* defs.h (seccomp_ret_action): New xlat prototype.
* seccomp.c (decode_seccomp_set_mode_strict): Remove.
(SYS_FUNC(seccomp)): Decode SECCOMP_GET_ACTION_AVAIL operation.
* NEWS: Mention this.
* tests/seccomp_get_action_avail.c: New file.
* tests/gen_tests.in (seccomp_get_action_avail): New entry.
* tests/pure_executables.list: Add seccomp_get_action_avail.
* tests/.gitignore: Likewise.
2017-11-02 00:21:57 +00:00
JingPiao Chen
489d8a9564 tests: check decoding of NFNL_SUBSYS_NFT_COMPAT netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nf_tables_compat.h.
* tests/nfnetlink_nft_compat.c: New file.
* tests/gen_tests.in (nfnetlink_nft_compat): New entry.
* tests/pure_executables.list: Add nfnetlink_nft_compat.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
b27bee724d tests: check decoding of NFNL_SUBSYS_NFTABLES netlink message types
* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nf_tables.h.
* tests/nfnetlink_nftables.c: New file.
* tests/gen_tests.in (nfnetlink_nftables): New entry.
* tests/pure_executables.list: Add nfnetlink_nftables.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
935e0629c5 tests: check decoding of NFNL_SUBSYS_CTHELPER netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_cthelper.h.
* tests/nfnetlink_cthelper.c: New file.
* tests/gen_tests.in (nfnetlink_cthelper): New entry.
* tests/pure_executables.list: Add nfnetlink_cthelper.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
130b1ade11 tests: check decoding of NFNL_SUBSYS_CTNETLINK_TIMEOUT netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_cttimeout.h.
* tests/nfnetlink_cttimeout.c: New file.
* tests/gen_tests.in (nfnetlink_cttimeout): New entry.
* tests/pure_executables.list: Add nfnetlink_cttimeout.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
fa94d0e5e0 tests: check decoding of NFNL_SUBSYS_ACCT netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_acct.h.
* tests/nfnetlink_acct.c: New file.
* tests/gen_tests.in (nfnetlink_acct): New entry.
* tests/pure_executables.list: Add nfnetlink_acct.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
f61c513898 tests: check decoding of NFNL_SUBSYS_IPSET netlink message types
* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/ipset/ip_set.h.
* tests/nfnetlink_ipset.c: New file.
* tests/gen_tests.in (nfnetlink_ipset): New entry.
* tests/pure_executables.list: Add nfnetlink_ipset.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
0d870031b3 tests: check decoding of NFNL_SUBSYS_OSF netlink message types
* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/xt_osf.h.
* tests/nfnetlink_osf.c: New file.
* tests/gen_tests.in (nfnetlink_osf): New entry.
* tests/pure_executables.list: Add nfnetlink_osf.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
ed593fef59 tests: check decoding of NFNL_SUBSYS_ULOG netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_log.h.
* tests/nfnetlink_ulog.c: New file.
* tests/gen_tests.in (nfnetlink_ulog): New entry.
* tests/pure_executables.list: Add nfnetlink_ulog.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
cd02efa8cf tests: check decoding of NFNL_SUBSYS_QUEUE netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_queue.h.
* tests/nfnetlink_queue.c: New file.
* tests/gen_tests.in (nfnetlink_queue): New entry.
* tests/pure_executables.list: Add nfnetlink_queue.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
9854baf382 tests: check decoding of NFNL_SUBSYS_CTNETLINK_EXP netlink message types
* tests/nfnetlink_ctnetlink_exp.c: New file.
* tests/gen_tests.in (nfnetlink_ctnetlink_exp): New entry.
* tests/pure_executables.list: Add nfnetlink_ctnetlink_exp.
* tests/.gitignore: Likewise.
2017-09-24 10:07:58 +00:00
JingPiao Chen
f2ee2a845e tests: check decoding of NFNL_SUBSYS_CTNETLINK netlink message types
* configure.ac (AC_CHECK_HEADERS): Add
linux/netfilter/nfnetlink_conntrack.h.
* tests/nfnetlink_ctnetlink.c: New file.
* tests/gen_tests.in (nfnetlink_ctnetlink): New entry.
* tests/pure_executables.list: Add nfnetlink_ctnetlink.
* tests/.gitignore: Likewise.
2017-09-24 10:07:57 +00:00
Eugene Syromyatnikov
10878b224a tests: add kcmp-y test
It is not very useful as of now, but it will allow tracking changes
in fd output once they are implemented.

* tests/gen_tests.in (kcmp-y): New test.
* tests/kcmp-y.c: New file, wrapper for kcmp.c
* tests/kcmp.c: Add opening of some files for which info may be printed
in the future.
* tests/pure_executables.list: Add kcmp-y.
* tests/.gitignore: Likewise.
2017-09-17 12:04:11 +00:00
Eugene Syromyatnikov
8cddc598da tests/kcmp: add more checks
Let's check all kcmp commands that they indeed do not print idx1/idx2.
Also, check that upper bits of pid arguments are ignored.

* tests/gen_tests.in (kcmp): Decrease -a argument's value from 27 to 22.
* tests/kcmp.c: Add checks for upper bits of pid1/pid2 and for all
kcmp types not tested before.
2017-09-17 12:04:11 +00:00
JingPiao Chen
d5c03ad80a tests: check decoding of MDBA_ROUTER_PORT netlink attribute
* tests/nlattr_mdba_router_port.c: New file.
* tests/gen_tests.in (nlattr_mdba_router_port): New entry.
* tests/pure_executables.list: Add nlattr_mdba_router_port.
* tests/.gitignore: Likewise.
2017-09-17 12:04:11 +00:00
JingPiao Chen
7efe8b38db tests: check decoding of MDBA_MDB_ENTRY_INFO netlink attributes
* tests/nlattr_mdba_mdb_entry.c: New file.
* tests/gen_tests.in (nlattr_mdba_mdb_entry): New entry.
* tests/pure_executables.list: Add nlattr_mdba_mdb_entry.
* tests/.gitignore: Likewise.
2017-09-17 12:04:11 +00:00
JingPiao Chen
16f073a05d tests: check decoding of TCA_STAB netlink attribute of tcmsg
* tests/test_nlattr.h (TEST_NESTED_NLATTR_ARRAY): New macro.
* tests/nlattr_tca_stab.c: New file.
* tests/gen_tests.in (nlattr_tca_stab): New entry.
* tests/pure_executables.list: Add nlattr_tca_stab.
* tests/.gitignore: Likewise.
2017-09-07 11:35:04 +00:00
JingPiao Chen
e1a1f800d8 tests: check decoding of TCA_STATS2 netlink attribute of tcmsg
* tests/nlattr_tc_stats.c: New file.
* tests/gen_tests.in (nlattr_tc_stats): New entry.
* tests/pure_executables.list: Add nlattr_tc_stats.
* tests/.gitignore: Likewise.
2017-09-07 11:35:04 +00:00
JingPiao Chen
8801aa382e tests: check decoding of IFLA_XDP netlink attribute of ifinfomsg
* tests/nlattr_ifla_xdp.c: New file.
* tests/gen_tests.in (nlattr_ifla_xdp): New entry.
* tests/pure_executables.list: Add nlattr_ifla_xdp.
* tests/.gitignore: Likewise.
2017-09-03 15:39:24 +00:00
JingPiao Chen
214c36b39d tests: check decoding of IFLA_PORT_SELF netlink attribute of ifinfomsg
* tests/nlattr_ifla_port.c: New file.
* tests/gen_tests.in (nlattr_ifla_port): New entry.
* tests/pure_executables.list: Add nlattr_ifla_port.
* tests/.gitignore: Likewise.
2017-09-03 15:39:24 +00:00
JingPiao Chen
bf1a463c79 tests: check decoding of IFLA_PROTINFO netlink attribute of ifinfomsg
* tests/nlattr_ifla_brport.c: New file.
* tests/gen_tests.in (nlattr_ifla_brport): New entry.
* tests/pure_executables.list: Add nlattr_ifla_brport.
* tests/.gitignore: Likewise.
* tests/test_nlattr.h (TEST_NESTED_NLATTR_OBJECT): New macro.
2017-09-01 08:41:08 +00:00
JingPiao Chen
c7946d380f tests: check decoding of NETLINK_ROUTE rtgenmsg attributes
* tests/nlattr_rtgenmsg.c: New file.
* tests/gen_tests.in (nlattr_rtgenmsg): New entry.
* tests/pure_executables.list: Add nlattr_rtgenmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
4c1e85025f tests: check decoding of NETLINK_ROUTE br_port_msg attributes
* tests/nlattr_br_port_msg.c: New file.
* tests/gen_tests.in (nlattr_br_port_msg): New entry.
* tests/pure_executables.list: Add nlattr_br_port_msg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
ef4feccbad tests: check decoding of NETLINK_ROUTE netconfmsg attributes
* tests/nlattr_netconfmsg.c: New file.
* tests/gen_tests.in (nlattr_netconfmsg): New entry.
* tests/pure_executables.list: Add nlattr_netconfmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
3d27e43d82 tests: check decoding of NETLINK_ROUTE dcbmsg attributes
* tests/nlattr_dcbmsg.c: New file.
* tests/gen_tests.in (nlattr_dcbmsg): New entry.
* tests/pure_executables.list: Add nlattr_dcbmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
a93b5fa242 tests: check decoding of NETLINK_ROUTE ifaddrlblmsg attributes
* tests/nlattr_ifaddrlblmsg.c: New file.
* tests/gen_tests.in (nlattr_ifaddrlblmsg): New entry.
* tests/pure_executables.list: Add nlattr_ifaddrlblmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
2795dde450 tests: check decoding of NETLINK_ROUTE tcamsg attributes
* tests/nlattr_tcamsg.c: New file.
* tests/gen_tests.in (nlattr_tcamsg): New entry.
* tests/pure_executables.list: Add nlattr_tcamsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
7506c69c3a tests: check decoding of NETLINK_ROUTE tcmsg attributes
* tests/nlattr_tcmsg.c: New file.
* tests/gen_tests.in (nlattr_tcmsg): New entry.
* tests/pure_executables.list: Add nlattr_tcmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
72f13278be tests: check decoding of NETLINK_ROUTE ndtmsg attributes
* tests/nlattr_ndtmsg.c: New file.
* tests/gen_tests.in (nlattr_ndtmsg): New entry.
* tests/pure_executables.list: Add nlattr_ndtmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
daf21282d1 tests: check decoding of NETLINK_ROUTE ndmsg attributes
* tests/nlattr_ndmsg.c: New file.
* tests/gen_tests.in (nlattr_ndmsg): New entry.
* tests/pure_executables.list: Add nlattr_ndmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
848cbc422b tests: check decoding of NETLINK_ROUTE fib_rule_hdr attributes
* tests/nlattr_fib_rule_hdr.c: New file.
* tests/gen_tests.in (nlattr_fib_rule_hdr): New entry.
* tests/pure_executables.list: Add nlattr_fib_rule_hdr.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
747cdf790d tests: check decoding of NETLINK_ROUTE rtmsg attributes
* tests/nlattr_rtmsg.c: New file.
* tests/gen_tests.in (nlattr_rtmsg): New entry.
* tests/pure_executables.list: Add nlattr_rtmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
ea9d07f0bf tests: check decoding of NETLINK_ROUTE ifaddrmsg attributes
* tests/nlattr_ifaddrmsg.c: New file.
* tests/gen_tests.in (nlattr_ifaddrmsg): New entry.
* tests/pure_executables.list: Add nlattr_ifaddrmsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
cbe8ddd2db tests: check decoding of NETLINK_ROUTE ifinfomsg attributes
* tests/nlattr_ifinfomsg.c: New file.
* tests/gen_tests.in (nlattr_ifinfomsg): New entry.
* tests/pure_executables.list: Add nlattr_ifinfomsg.
* tests/.gitignore: Likewise.
2017-08-15 22:34:46 +00:00
JingPiao Chen
474031e41b tests: check decoding of NETLINK_KOBJECT_UEVENT messages
* tests/netlink_kobject_uevent.c: New file.
* tests/gen_tests.in (netlink_kobject_uevent): New entry.
* tests/pure_executables.list: Add netlink_kobject_uevent.
* tests/.gitignore: Likewise.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
2017-08-08 16:36:59 +00:00
92ac75f6f4 tests: enhance test coverage of printstrn and umoven
* tests/printstrn-umoven.c: New file.
* tests/printstrn-umoven-peekdata.c: Likewise.
* tests/printstrn-umoven-undumpable.c: Likewise.
* tests/printstrn-umoven-legacy.test: New test.
* tests/Makefile.am (MISC_TESTS): Add printstrn-umoven-legacy.test.
* tests/gen_tests.in (printstrn-umoven, printstrn-umoven-peekdata,
printstrn-umoven-undumpable): New entries.
* tests/pure_executables.list: Add printstrn-umoven,
printstrn-umoven-peekdata, and printstrn-umoven-undumpable.
* tests/.gitignore: Likewise.
2017-08-02 00:45:47 +00:00
336691583e tests: enhance test coverage of printpath and umovestr
* tests/init.sh (TIMEOUT_DURATION): Raise from 300 to 600.
* tests/printpath-umovestr.c: New file.
* tests/printpath-umovestr-peekdata.c: Likewise.
* tests/printpath-umovestr-undumpable.c: Likewise.
* tests/printpath-umovestr-legacy.test: New test.
* tests/Makefile.am (MISC_TESTS): Add printpath-umovestr-legacy.test.
* tests/gen_tests.in (printpath-umovestr, printpath-umovestr-peekdata,
printpath-umovestr-undumpable): New entries.
* tests/pure_executables.list: Add printpath-umovestr,
printpath-umovestr-peekdata, and printpath-umovestr-undumpable.
* tests/.gitignore: Likewise.
2017-08-01 20:59:48 +00:00
a1e8d312ed tests: enhance test coverage of bpf syscall parser
* configure.ac: Update union bpf_attr member checks.
* tests/bpf.c: Rewrite.
* tests/bpf-v.c: New file.
* tests/gen_tests.in (bpf-v): New entry.
* tests/pure_executables.list: Add bpf-v.
* tests/.gitignore: Likewise.
2017-07-26 10:28:25 +00:00
JingPiao Chen
53a56aa0d8 tests: check decoding of NETLINK_CRYPTO crypto_user_alg attributes
* tests/nlattr_crypto_user_alg.c: New file.
* tests/gen_tests.in (nlattr_crypto_user_alg): New entry.
* tests/pure_executables.list: Add nlattr_crypto_user_alg.
* tests/.gitignore: Likewise.
2017-07-24 11:18:43 +00:00
JingPiao Chen
a950e13865 tests: check decoding of nlmsgerr attributes
* tests/nlattr_nlmsgerr.c: New file.
* tests/gen_tests.in (nlattr_nlmsgerr): New entry.
* tests/pure_executables.list: Add nlattr_nlmsgerr.
* tests/.gitignore: Likewise.
2017-07-19 09:25:58 +00:00
JingPiao Chen
854a12954f tests: check decoding of NETLINK_CRYPTO message types
* configure.ac (AC_CHECK_HEADERS): Add linux/cryptouser.h.
* tests/netlink_crypto.c: New file.
* tests/gen_tests.in (netlink_crypto): New entry.
* tests/pure_executables.list: Add netlink_crypto.
* tests/.gitignore: Likewise.
2017-07-12 21:08:03 +00:00
JingPiao Chen
9f40073dc1 tests: check decoding of nlattr_inet_diag_req_v2 attributes
* tests/nlattr_inet_diag_req_v2.c: New file.
* tests/gen_tests.in (nlattr_inet_diag_req_v2): New entry.
* tests/pure_executables.list: Add nlattr_inet_diag_req_v2.
* tests/.gitignore: Likewise.
2017-07-11 22:24:03 +00:00
JingPiao Chen
de79458f09 tests: check decoding of nlattr_inet_diag_req_compat attributes
* tests/nlattr_inet_diag_req_compat.c: New file.
* tests/gen_tests.in (nlattr_inet_diag_req_compat): New entry.
* tests/pure_executables.list: Add nlattr_inet_diag_req_compat.
* tests/.gitignore: Likewise.
2017-07-11 22:24:03 +00:00
JingPiao Chen
03a08d8357 tests: check decoding of netlink smc_diag_msg attributes
* tests/nlattr_smc_diag_msg.c: New file.
* tests/gen_tests.in (nlattr_smc_diag_msg): New entry.
* tests/pure_executables.list: Add nlattr_smc_diag_msg.
* tests/.gitignore: Likewise.
2017-07-10 01:15:57 +00:00
b53552b2d8 tests: check decoding of MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP
* tests/group_req.c: New file.
* tests/gen_tests.in (group_req): New entry.
* tests/pure_executables.list: Add group_req.
* tests/.gitignore: Likewise.
2017-07-09 18:43:34 +00:00
JingPiao Chen
a0470d7848 tests: check decoding of packet_diag_msg attributes
* tests/netlink_sock_diag-v.sh: New file.
* tests/Makefile.am (EXTRA_DIST): Add it.
* tests/nlattr_packet_diag_msg.c: New file.
* tests/gen_tests.in (nlattr_packet_diag_msg): New entry.
* tests/pure_executables.list: Add nlattr_packet_diag_msg.
* tests/.gitignore: Likewise.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
2017-07-09 00:21:02 +00:00
dd95f5ae69 tests: check decoding of SO_PEERCRED socket option
* tests/so_peercred.c: New file.
* tests/gen_tests.in (so_peercred): New entry.
* tests/pure_executables.list: Add so_peercred.
* tests/.gitignore: Likewise.
2017-07-08 19:27:26 +00:00
004a776777 tests: check decoding of socket filters
* tests/sock_filter-v.c: New file.
* tests/gen_tests.in (sock_filter-v): New entry.
* tests/pure_executables.list: Add sock_filter-v.
* tests/.gitignore: Likewise.
2017-07-08 14:57:44 +00:00
e19354d350 tests: check decoding of SO_LINGER socket option
* tests/so_linger.c: New file.
* tests/gen_tests.in (so_linger): New entry.
* tests/pure_executables.list: Add so_linger.
* tests/.gitignore: Likewise.
2017-07-08 14:57:44 +00:00
JingPiao Chen
d4b9472d5f tests: check decoding of netlink unix_diag_msg attributes
* tests/nlattr_unix_diag_msg.c: New file.
* tests/gen_tests.in (nlattr_unix_diag_msg): New entry.
* tests/pure_executables.list: Add nlattr_unix_diag_msg.
* tests/.gitignore: Likewise.
2017-07-01 00:05:39 +00:00