NuxiNL / cloudlibc

CloudABI's standard C library
BSD 2-Clause "Simplified" License
295 stars 17 forks source link

poll test fails on linux: Errno: 52, Function not implemented #6

Open dckc opened 7 years ago

dckc commented 7 years ago

Is this a known limitation?

I first ran into this when using python:

  File "selectors.py", line 376, in select
OSError: [Errno 52] Function not implemented

Then I confirmed it using cloudlibc-unittests:

$ cloudabi-run /usr/x86_64-unknown-cloudabi/bin/cloudlibc-unittests << EOF
> %TAG ! tag:nuxi.nl,2015:cloudabi/
> ---
> tmpdir: !file
>   path: tmp-unittest
> logfile: !fd stdout
> nthreads: !!int 8
> EOF
-> argdata_serialize::seq
-> mblen::euro
-> fgetpos::eoverflow
-> fputws::success
-> wcsncpy::example1
-> mbstowcs::zero
-> malloc::zero
-> poll::file
-> twalk::empty
-> ntohl::example
-> strndup::null
Test failed
--
Statement: ASSERT_EQ(1, poll(&pfd, 1, -1))
Expected:           1 ==        0x1 == (1)
Actual:            -1 == 0xffffffff == (poll(&pfd, 1, -1))
Location:  src/libc/poll/poll_test.c:168
Errno:     52, Function not implemented

$ uname -a
Linux pav 4.7.0-cloudabi+ #1 SMP Sat Apr 8 10:56:21 CDT 2017 x86_64 x86_64 x86_64 GNU/Linux

$ (cd ~/projects/linux-cloudabi/; git log -n1)
commit 477884e20e3c68d3524a42864900a5d3bbb0e1b4
Author: Ed Schouten <ed@nuxi.nl>
Date:   Sun Feb 26 22:02:46 2017 +0100

    Add missing cloudabi_vdso.lds linker script.

    Reported by: Dan Connolly