From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Wed, 6 May 2020 14:17:04 +0200 Subject: [LTP] [PATCH v4 1/2] pty04: Use guarded buffers for transmission In-Reply-To: <1139985312.11485617.1588766778300.JavaMail.zimbra@redhat.com> References: <20200505101625.25020-1-rpalethorpe@suse.com> <20200505133746.GB21884@dell5510> <87d07isaka.fsf@our.domain.is.not.set> <877dxpsb4n.fsf@our.domain.is.not.set> <1106041841.11477901.1588762195733.JavaMail.zimbra@redhat.com> <1352538726.11479675.1588763647954.JavaMail.zimbra@redhat.com> <20200506113817.GA5409@dell5510> <1139985312.11485617.1588766778300.JavaMail.zimbra@redhat.com> Message-ID: <20200506121704.GA8586@dell5510> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Jan, > > > -#if defined(HAVE_LINUX_IF_PACKET_H) && defined(HAVE_LINUX_IF_ETHER_H) > > > +#include > > Shouldn't we also check for 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 > > > #include > > > @@ -373,6 +376,6 @@ static struct tst_test test = { > > > #else > > > -TST_TEST_TCONF("Need and "); > > > +TST_TEST_TCONF("Need and 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. This is just a separate question to this fix (thank you for finding a solution). Kind regards, Petr