On Tue, May 03, 2016 at 08:23:43PM +0100, Dr. David Alan Gilbert wrote:
[...]
> > > --- /dev/null
> > > +++ b/xlat/uffd_register_ioctl_flags.in
> > > @@ -0,0 +1,5 @@
> > > +#val_type uint64_t
> > > +1<< _UFFDIO_WAKE
> > > +1<< _UFFDIO_COPY
> > > +1<< _UFFDIO_ZEROPAGE
> > > +
> > 
> > gen.sh doesn't handle space characters after 1<< properly (yet).
> > git am complains about empty line at EOF.
> 
> Fixed. Hmm, I've removed the spaces, but the output I'm getting is:
> [pid  9644] ioctl(20, UFFDIO_REGISTER{range={start=0x7ff674200000, 
> len=0x40000}, mode=UFFDIO_REGISTER_MODE_MISSING, 
> ioctls=_UFFDIO_WAKE|_UFFDIO_COPY|_UFFDIO_ZEROPAGE}) = 0
> 
> shouldn't I be seeing 1ull<<_UFFDIO_WAKE | 1ull << _UFFDIO_COPY etc?

We have just a few users of this feature, and these users seem to be OK
with the current behaviour, which means we probably need another syntax
for this case.

I'd also consider another representation of "ioctls" field, e.g.
ioctls=1<<(_UFFDIO_WAKE|_UFFDIO_COPY|_UFFDIO_ZEROPAGE)

> So the thing that I'm left with is the tests;  the cases I'm most worried 
> about
> are how to handle the return data from the kernel in the case where the flags
> the kernel returns varies on kernel versions.
> Is the right thing for the test to do the decode manually and then
> print what it expects strace to print?

One way is to decode flags in the test, I've recently added printflags
and printxval to libtests exactly for this purpose.

Another way is to output a regexp for egrep match instead of expected
output for exact diff match.


-- 
ldv

Attachment: pgp3XRww2B4EO.pgp
Description: PGP signature

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to