Code Monkey home page Code Monkey logo

Comments (6)

thom311 avatar thom311 commented on August 20, 2024

on your system unshare(CLONE_NEWUSER) fails with EINVAL.

what gives unshare -U true and strace unshare -U true

from libnl.

bdubbs avatar bdubbs commented on August 20, 2024

Indeed, I did not have CONFIG_USER_NS set in the kernel. The tests now only have six failures:

Running suite(s): main
Abstract addresses
Netlink attributes
Clone ematch tree
runs with NLTST_SEED_RAND=0
netns
...
79%: Checks: 29, Failures: 6, Errors: 0
tests/nl-test-util.c:389:F:Core:cache_and_clone:0: Assertion 'r == 0' failed: r == -10, 0 == 0
tests/nl-test-util.c:389:F:Core:test_create_iface:10: Assertion 'r == 0' failed: r == -10, 0 == 0
also for test_create_iface:11, 12, 13, 14.

What else am I missing?

It would help to have some documentation on the tests.

from libnl.

thom311 avatar thom311 commented on August 20, 2024

I think the test should be adjusted, so that it can gracefully skip if user-ns doesn't work.

from libnl.

thom311 avatar thom311 commented on August 20, 2024

anyway...

so, the test suite uses a network namespace to run. If you don't have the required permissions, the test suite fails. That's a known issue.

What probably makes sense, to gracefully handle the error and skip the tests in those case. Patch welcome. But that is not going to "fix" the tests, it will merely skip them automatically.

Closing this, because the problem is an unsupported usage (though, patches are welcome to better support it).

from libnl.

xry111 avatar xry111 commented on August 20, 2024

Besides the namespaces, if I read the code correctly it also requires some other kernel configuration items, like CONFIG_BRIDGE.

It would be better to document these requirements somewhere.

from libnl.

thom311 avatar thom311 commented on August 20, 2024

the unit tests are for developers of the library itself. They don't have proper documentation, but sure, maybe this could be explained somewhere (patch welcome).

In any case, if you build a kernel without CONFIG_BRIDGE, it seems you are the exception already. You are very welcome to just not run the unit tests (or send a patch to handle this better).

from libnl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.