[LTP] [PATCH v4 1/2] pty04: Use guarded buffers for transmission

Jan Stancek jstancek@redhat.com
Wed May 6 14:20:44 CEST 2020



----- Original Message -----
> Hi Jan,
> 
> > > > -#if defined(HAVE_LINUX_IF_PACKET_H) && defined(HAVE_LINUX_IF_ETHER_H)
> > > > +#include <linux/version.h>
> > > Shouldn't we also check for <linux/version.h> with autotools? Or are
> > > kernel
> > > headers mandatory for LTP build?
> 
> > We already include this header in some syscalls tests, so I assumed it
> > won't be an issue.
> 
> OK, no problem.
> 
> > > > +
> > > > +#if defined(HAVE_LINUX_IF_PACKET_H) && defined(HAVE_LINUX_IF_ETHER_H)
> > > > \
> > > > +       && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
> 
> > > >  #include <linux/if_packet.h>
> > > >  #include <linux/if_ether.h>
> > > > @@ -373,6 +376,6 @@ static struct tst_test test = {
> 
> > > >  #else
> 
> > > > -TST_TEST_TCONF("Need <linux/if_packet.h> and <linux/if_ether.h>");
> > > > +TST_TEST_TCONF("Need <linux/if_packet.h> and <linux/if_ether.h> and
> > > > 4.10+");
> 
> > > +1.
> 
> > > BTW, why this tests requires 4.10 for runtime?
> 
> > It's for compilation. struct can_frame fields it's using were introduced in
> > 4.10.
> 
> Do you mean a2f11835994e ("can.h: make padding given by gcc explicit") from
> v4.2-rc1? + there is no change for include/uapi/linux/can.h in 4.10.

You're right, I didn't sort the tags correctly.



More information about the ltp mailing list