[LTP] [PATCH 2/3] tst_device.h: Use lapi/syscalls.h instead of <sys/syscall.h>

Jan Stancek jstancek@redhat.com
Mon Jan 20 11:56:59 CET 2020



----- Original Message -----
> >  #include <unistd.h>
> > -#include <sys/syscall.h>
> > +#include "lapi/syscalls.h"
> Hm, maybe this fix wasn't a good idea.
> It effectively uses lapi/syscalls.h everywhere instead of <sys/syscall.h>.
> Not sure if this is what we want.

We already include lapi/syscalls.h at several places, so I wouldn't expect
this to be as bad.

> 
> Example of the error is #634 [1], which is caused by __NR_socketcall being -1
> instead of not defined (socketcall is not defined on some archs, e.g. x86-64
> and ARM).
> We can fix the condition

Tests using tst_syscall or ltp_syscall should be fine, since those check
for ENOSYS.

>, but it will lead to numerous not obvious errors, so
> I
> suggest to revert this (and thus get LTP broken on very old distros).
> 

Cyril, any thoughts?



More information about the ltp mailing list