aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2021-02-22 12:31:05 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2021-02-22 12:31:09 +0100
commit84af29337c3712a91220b5336078db1cd6553a3c (patch)
tree93f59899339a3ad5158fcc9dc8329e0aaca5b805 /contrib
parent34d70300631e775f1fe4f28ffadecfe6e2ce369b (diff)
parentccb7b6a97652b45f60e0ac680a239bc6058b9773 (diff)
Merge #21255: contrib: run test-symbol-check for RISC-V
ccb7b6a97652b45f60e0ac680a239bc6058b9773 contrib: run test-symbol check for RISCV (fanquake) Pull request description: Now that we are using Focal for gitian building (glibc 2.31), we can use a newer introduced symbol, and include RISC-V in this test. ACKs for top commit: laanwj: Code review re-ACK ccb7b6a97652b45f60e0ac680a239bc6058b9773 Tree-SHA512: 4ddaafc0b6cced49a504847ed8da02b0a514eca69014fdc2ad01068c6f8ddf9ad992525f47b2a182c3b4a5845f8dacfe5a7e4acf2f303a5dab6a70daa3b89509
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/devtools/test-symbol-check.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/contrib/devtools/test-symbol-check.py b/contrib/devtools/test-symbol-check.py
index 18ed7d61e0..ee7bfc9805 100755
--- a/contrib/devtools/test-symbol-check.py
+++ b/contrib/devtools/test-symbol-check.py
@@ -23,29 +23,26 @@ class TestSymbolChecks(unittest.TestCase):
executable = 'test1'
cc = 'gcc'
- # there's no way to do this test for RISC-V at the moment; bionic's libc is 2.27
- # and we allow all symbols from 2.27.
- if 'riscv' in get_machine(cc):
- self.skipTest("test not available for RISC-V")
-
- # memfd_create was introduced in GLIBC 2.27, so is newer than the upper limit of
- # all but RISC-V but still available on bionic
+ # renameat2 was introduced in GLIBC 2.28, so is newer than the upper limit
+ # of glibc for all platforms
with open(source, 'w', encoding="utf8") as f:
f.write('''
#define _GNU_SOURCE
- #include <sys/mman.h>
+ #include <stdio.h>
+ #include <linux/fs.h>
- int memfd_create(const char *name, unsigned int flags);
+ int renameat2(int olddirfd, const char *oldpath,
+ int newdirfd, const char *newpath, unsigned int flags);
int main()
{
- memfd_create("test", 0);
+ renameat2(0, "test", 0, "test_", RENAME_EXCHANGE);
return 0;
}
''')
self.assertEqual(call_symbol_check(cc, source, executable, []),
- (1, executable + ': symbol memfd_create from unsupported version GLIBC_2.27\n' +
+ (1, executable + ': symbol renameat2 from unsupported version GLIBC_2.28\n' +
executable + ': failed IMPORTED_SYMBOLS'))
# -lutil is part of the libc6 package so a safe bet that it's installed