[RFC 3/4] Add test for --decode-fds=eventfd

Dmitry V. Levin ldv at strace.io
Mon Apr 29 21:35:25 UTC 2024


On Tue, Apr 30, 2024 at 12:45:20AM +0530, Sahil wrote:
> Hi,
> 
> Thank you for the feedback.
> 
> On Monday, April 29, 2024 4:41:06 PM IST Dmitry V. Levin wrote:
> > On Mon, Apr 29, 2024 at 09:01:46AM +0530, Sahil Siddiq wrote:
> > [...]
> > > +    struct pollfd fds[1];
> > > +    fds[0].fd = efd2;
> > > +    fds[0].events = POLLIN;
> > > +
> > > +    int ret = poll(fds, 1, -1);
> > > +    if (ret == -1)
> > > +        perror_msg_and_fail("eventfd");
> > > +
> > > +    printf("poll([{fd=%d<eventfd-count:%"PRIu64">, events=POLLIN}], 1, -1) = %d ([{fd=%d, revents=POLLIN}])\n",
> > > +               efd2, efd_counter, ret, fd2);
> > 
> > The use of poll is problematic as this system call is not implemented on
> > recently introduced architectures.
> 
> Oh, I wasn't aware of this. Could you give me an example of a recently
> introduced architecture? Is openRISC an example of such an architecture?
> How do I get the list of architectures in which a syscall hasn't been
> implemented?

It's implemented on the following architectures:

strace$ git grep -l '"poll"' src/linux/
src/linux/alpha/syscallent.h
src/linux/arm/syscallent.h
src/linux/avr32/syscallent.h
src/linux/bfin/syscallent.h
src/linux/hppa/syscallent.h
src/linux/i386/syscallent.h
src/linux/ia64/syscallent.h
src/linux/m68k/syscallent.h
src/linux/microblaze/syscallent.h
src/linux/mips/syscallent-n32.h
src/linux/mips/syscallent-n64.h
src/linux/mips/syscallent-o32.h
src/linux/powerpc/syscallent.h
src/linux/powerpc64/syscallent.h
src/linux/s390/syscallent.h
src/linux/s390x/syscallent.h
src/linux/sh/syscallent.h
src/linux/sh64/syscallent.h
src/linux/sparc/syscallent.h
src/linux/sparc64/syscallent.h
src/linux/x32/syscallent.h
src/linux/x86_64/syscallent.h
src/linux/xtensa/syscallent.h

As you can see, src/linux/64/ and src/linux/32/ are not mentioned,
so it's not implemented on the following architectures:

strace$ git grep -l '/\(32\|64\)/syscallent\.h' src/linux/
src/linux/aarch64/syscallent.h
src/linux/arc/syscallent.h
src/linux/csky/syscallent.h
src/linux/loongarch64/syscallent.h
src/linux/metag/syscallent.h
src/linux/nios2/syscallent.h
src/linux/or1k/syscallent.h
src/linux/riscv64/syscallent.h
src/linux/tile/syscallent.h
src/linux/tile/syscallent1.h


-- 
ldv


More information about the Strace-devel mailing list