diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2023-05-10 19:58:37 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2023-05-10 18:08:00 +0000 |
commit | 206c58a9ab53e47cf85227a7c2ee6c6ef7f0c0d5 (patch) | |
tree | a839f64b108707c82186abdbe7770560802252fd /tests/nlattr_tcamsg-Xverbose.c | |
parent | 4f1fad56cba89009d8aaf63d24b34279d912b333 (diff) | |
download | strace-206c58a9ab53e47cf85227a7c2ee6c6ef7f0c0d5.tar.gz |
rtnl_tc_action: fix tcamsg attribute decoder
It used the wrong attribute table initially.
An example of an actual usage:
tc actions add action simple sdata "foobar" index 1
* src/xlat/rtnl_tca_root_attrs.in: New file.
* src/xlat/rtnl_tca_root_flags.in: Likewise.
* src/rtnl_tc_action.c: Include "xlat/rtnl_tca_root_flags.h"
and "xlat/rtnl_tca_root_attrs.h".
(tcamsg_nla_decoders): Rename to...
(tca_act_nla_decoders): ...this.
(decode_tca_action, decode_tca_root_act_tab, decode_tca_root_act_flags,
decode_tca_msecs): New functions.
(tcamsg_nla_decoders): New decoder table.
(decode_tcamsg): Use rtnl_tca_root_attrs and "TCA_ROOT_???" as xlat
and dflt arguments in the decode_nlattr call. respectively.
* tests/.gitignore: Add nlattr_tcamsg-Xabbrev, nlattr_tcamsg-Xraw,
and nlattr_tcamsg-Xverbose.
* tests/pure_executables.list: Likewise.
* tests/gen_tests.in (nlattr_tcamsg-Xabbrev, nlattr_tcamsg-Xraw,
nlattr_tcamsg-Xverbose): New tests.
* tests/nlattr_tcamsg-Xabbrev.c: New file.
* tests/nlattr_tcamsg-Xraw.c: Likewise.
* tests/nlattr_tcamsg-Xverbose.c: Likewise.
* tests/nlattr_tcamsg.c: Update the expected output.
Diffstat (limited to 'tests/nlattr_tcamsg-Xverbose.c')
-rw-r--r-- | tests/nlattr_tcamsg-Xverbose.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/nlattr_tcamsg-Xverbose.c b/tests/nlattr_tcamsg-Xverbose.c new file mode 100644 index 000000000..85f262ad7 --- /dev/null +++ b/tests/nlattr_tcamsg-Xverbose.c @@ -0,0 +1,2 @@ +#define XLAT_VERBOSE 1 +#include "nlattr_tcamsg.c" |