Skip to content

Commit

Permalink
Fix Intel case
Browse files Browse the repository at this point in the history
- x86_64 glibc is supported
- 32bit (x86 or armv7hf) glibc is not
- musl is not (yet), for all cpu archs

Add better negative tests to cover those base cases.
  • Loading branch information
lloeki committed Oct 31, 2024
1 parent d361376 commit ab0c7de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib-injection/requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"native_deps": {
"glibc": [
{
"arch": "x86",
"arch": "x64",
"supported": true,
"min": "2.27",
"description": "libffi needs memfd_create"
Expand All @@ -18,7 +18,7 @@
],
"musl": [
{
"arch": "x86",
"arch": "x64",
"supported": false,
"description": "no musl build"
},
Expand Down
2 changes: 1 addition & 1 deletion lib-injection/test_allow.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
{"name": "✅ 2.27 glibc x86" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86" , "libc": "glibc:2.27"}},
{"name": "✅ 2.27 glibc x86" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64" , "libc": "glibc:2.27"}},
{"name": "✅ 2.27 glibc arm64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.27"}}
]
10 changes: 9 additions & 1 deletion lib-injection/test_block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{"name": "❌ 2.26 glibc x86" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86" , "libc": "glibc:2.26"}},
{"name": "❌ musl x86" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86" , "libc": "musl:"}},
{"name": "❌ musl arm" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm" , "libc": "musl:"}},
{"name": "❌ musl x64" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64" , "libc": "musl:"}},
{"name": "❌ musl arm64" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64" , "libc": "musl:"}},

{"name": "❌ 2.27 glibc x86" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x86" , "libc": "glibc:2.27"}},
{"name": "❌ 2.27 glibc arm" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm" , "libc": "glibc:2.27"}},

{"name": "❌ 2.26 glibc x64" ,"filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "x64" , "libc": "glibc:2.26"}},
{"name": "❌ 2.26 glibc arm64","filepath": "/some/path", "args": [], "envars": [], "host": {"os": "linux", "arch": "arm64", "libc": "glibc:2.26"}}
]

0 comments on commit ab0c7de

Please sign in to comment.