NuxiNL/cloudlibc

setvbuf::iolbf_pipe test fails on Linux

dsprenkels opened this issue · 2 comments

When I run the following command:

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 1
EOF

one of the test cases fails with the following error:

[passing tests omitted]
-> setvbuf::iolbf_pipe
Test failed
--
Statement: ASSERT_EQ(0, ioctl(fds[0], FIONREAD, &nbytes))
Expected:           0 ==          0 == (0)
Actual:            -1 == 0xffffffff == (ioctl(fds[0], FIONREAD, &nbytes))
Location:  src/libc/stdio/setvbuf_test.c:100
Errno:     52, Function not implemented
Aborted

Extra info:

# Linux version
vagrant@vagrant:~$ uname -a
Linux vagrant 4.7.0-cloudabi+ #1 SMP Fri Jul 21 12:03:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# CloudABI version
vagrant@vagrant:~$ apt-cache show x86-64-unknown-cloudabi-cloudlibc 
Package: x86-64-unknown-cloudabi-cloudlibc
Version: 0.78-1
Architecture: all
Maintainer: info@nuxi.nl
Description: cloudlibc for x86_64-unknown-cloudabi
Description-md5: 5b87b85f313f06f0c58f75cc46309a30
Homepage: https://github.com/NuxiNL/cloudlibc
Depends: x86-64-unknown-cloudabi-cloudabi, x86-64-unknown-cloudabi-compiler-rt
Filename: x86-64-unknown-cloudabi-cloudlibc_0.78-1_all.deb
Size: 1196348
SHA256: adecbabc32e77944d5c3c463fa73cf0d1b687a89fade4d3d0e91d6467a3ddca9

Package: x86-64-unknown-cloudabi-cloudlibc
Status: install ok installed
Installed-Size: 7719
Maintainer: info@nuxi.nl
Architecture: all
Version: 0.78-1
Depends: x86-64-unknown-cloudabi-cloudabi, x86-64-unknown-cloudabi-compiler-rt
Description: cloudlibc for x86_64-unknown-cloudabi
Description-md5: 5b87b85f313f06f0c58f75cc46309a30

Hi Daan!

I think we'd better mark this bug as closed: the problem is that the Linux kernel patchset still doesn't support polling entirely. This is a duplicate of bug #6.

The Linux kernel patchset is currently based on Capsicum-Linux. As there seems to be little progress in getting that upstreamed, my plan is to write a version of the Linux patchset on top of vanilla sources. Polling is something that should be addressed then.

Ok. Then I will try to get a FreeBSD box running instead. :)