Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for NFT_MSG_MAX fails on my Linux machine #1080

Closed
tbu- opened this issue Sep 13, 2018 · 5 comments
Closed

Test for NFT_MSG_MAX fails on my Linux machine #1080

tbu- opened this issue Sep 13, 2018 · 5 comments

Comments

@tbu-
Copy link
Contributor

tbu- commented Sep 13, 2018

RUNNING ALL TESTS
bad ucontext_t size: rust: 936 (0x3a8) != c 968 (0x3c8)
bad NFT_MSG_MAX value at byte 0: rust: 22 (0x16) != c 25 (0x19)

glibc 0.28
Linux 4.18.6.arch1
Arch Linux

NFT_MSG_MAX, from /usr/include/linux/netfilter/nf_tables.h:

enum nf_tables_msg_types {
        NFT_MSG_NEWTABLE,
        NFT_MSG_GETTABLE,
        NFT_MSG_DELTABLE,
        NFT_MSG_NEWCHAIN,
        NFT_MSG_GETCHAIN,
        NFT_MSG_DELCHAIN,
        NFT_MSG_NEWRULE,
        NFT_MSG_GETRULE,
        NFT_MSG_DELRULE,
        NFT_MSG_NEWSET,
        NFT_MSG_GETSET,
        NFT_MSG_DELSET,
        NFT_MSG_NEWSETELEM,
        NFT_MSG_GETSETELEM,
        NFT_MSG_DELSETELEM,
        NFT_MSG_NEWGEN,
        NFT_MSG_GETGEN,
        NFT_MSG_TRACE,
        NFT_MSG_NEWOBJ,
        NFT_MSG_GETOBJ,
        NFT_MSG_DELOBJ,
        NFT_MSG_GETOBJ_RESET,
        NFT_MSG_NEWFLOWTABLE,
        NFT_MSG_GETFLOWTABLE,
        NFT_MSG_DELFLOWTABLE,
        NFT_MSG_MAX,
};

It seems like

        NFT_MSG_NEWFLOWTABLE,
        NFT_MSG_GETFLOWTABLE,
        NFT_MSG_DELFLOWTABLE,

were added and thus NFT_MSG_MAX increased. Linux doesn't consider this a breaking change. I'd assume that more messages might be added in the future, so just adjusting the constant in libc as a breaking change doesn't seem to be useful.

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 22, 2018

This is expected, the values of constants change across different kernel versions, and libc contains static values of constants.

@gnzlbg gnzlbg added C-bug Category: bug C-bug-outdated-constant and removed C-bug Category: bug labels Nov 22, 2018
karcherm added a commit to karcherm/libc that referenced this issue Dec 25, 2018
This commit removes special cases for sparc64 which caused test failures on a sparc64
system (Debian, glibc 2.28). With these changes, the ABI tests pass except for the
known test failure from rust-lang#1080
bors added a commit that referenced this issue Dec 26, 2018
Adjust for newer glibc on sparc64

This commit removes special cases for sparc64 which caused test failures on a sparc64
system (Debian, glibc 2.28). With these changes, the ABI tests pass except for the
known test failure from #1080
@pusateri
Copy link
Contributor

Same issue on Ubuntu 18.10 cosmic

$ uname -a
Linux virt 4.18.0-13-generic #14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
PASSED 58 tests
     Running /home/pusateri/Projects/libc/target/debug/deps/main-b7d3c13f1915adf3
RUNNING ALL TESTS
bad ucontext_t size: rust: 936 (0x3a8) != c 968 (0x3c8)
bad NFT_MSG_MAX value at byte 0: rust: 22 (0x16) != c 25 (0x19)

@gnzlbg
Copy link
Contributor

gnzlbg commented Dec 28, 2018

As mentioned, this is expected behavior, that version of Linux is not supported by libc.

The path forward here is to upgrade the version of Linux that libc supports on CI, and then update the constants to match that version.

@gnzlbg
Copy link
Contributor

gnzlbg commented May 24, 2019

Fixed on master.

@gnzlbg gnzlbg closed this as completed May 24, 2019
@tbu-
Copy link
Contributor Author

tbu- commented May 26, 2019

Fixed by 4497a78.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants