[PATCH v4 4/4] tests: add check for decoding of netfilter subsystem

Dmitry V. Levin ldv at altlinux.org
Sun Mar 11 11:14:37 UTC 2018


On Sun, Mar 11, 2018 at 10:28:42AM +0800, Chen Jingpiao wrote:
> On 03/11 05:02, Dmitry V. Levin wrote:
> > On Sun, Mar 11, 2018 at 09:43:53AM +0800, Chen Jingpiao wrote:
> > > On 03/11 03:48, Dmitry V. Levin wrote:
> > [...]
> > > > In other words, NFNL_SUBSYS_COUNT provided by kernel headers is
> unreliable
> > > > and shouldn't be used, I think it has to be removed from
> > > > xlat/nl_netfilter_subsys_ids.in as well.
> > >
> > > I can not find an existing way to remove the condition from xlat/*.h.
> > > xlat/gen.sh only have print_xlat and cond_xlat to generate xlat array.
> > > Should I add a directive?
> >
> > Well, you can simply write
> >
> > #undef NFNL_SUBSYS_COUNT
> > #define NFNL_SUBSYS_COUNT       12
> > NFNL_SUBSYS_COUNT
> >
> > but NFNL_SUBSYS_COUNT is not a symbol with some constant value: it changes
> > with time, so what's the use of printing it in symbolic form?
> 
> If we want to print it well in symbolic form, we should use kernel headers'
> NFNL_SUBSYS_COUNT value, and move it to the first line.
> What do you think?

If NFNL_SUBSYS_COUNT is a subject to change in the kernel, why print it
in symbolic form?  For strace it's just an unrecognized number.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180311/d675d84b/attachment.bin>


More information about the Strace-devel mailing list