Skip to content

Commit 18f05b2

Browse files
committed
Support CentOS 8 and 9 for release-testing
Supporting RHEL directly is a pain due to subscription requirements, and Fedora doesn't seem to have AMIs available anymore
1 parent f36191f commit 18f05b2

File tree

5 files changed

+44
-4
lines changed

5 files changed

+44
-4
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "CentOS Stream 8",
3+
"ami_owner": "125523088429",
4+
"ami_name_pattern": "CentOS Stream 8 *",
5+
"user": "centos",
6+
"staticlibs": false,
7+
"setup_commands": [
8+
"cloud-init status --wait",
9+
"sudo dnf config-manager --set-enabled powertools",
10+
"sudo dnf install -y epel-release epel-next-release",
11+
"sudo dnf update -y"
12+
],
13+
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel glibc-devel.i686 libstdc++-devel libstdc++-devel.i686 libstdc++-static libstdc++-static.i686 zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
14+
"install_test_deps": "sudo dnf install -y gtk3 dbus-glib xorg-x11-utils gnutls-devel libacl-devel openldap-devel tigervnc-server-minimal curl tar bzip2 libreoffice-writer",
15+
"exclude_tests": ["x86/pkeys.*"]
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "CentOS Stream 9",
3+
"ami_owner": "125523088429",
4+
"ami_name_pattern": "CentOS Stream 9 *",
5+
"user": "ec2-user",
6+
"staticlibs": false,
7+
"setup_commands": [
8+
"cloud-init status --wait",
9+
"sudo dnf config-manager --set-enabled crb",
10+
"sudo dnf install -y epel-release epel-next-release",
11+
"sudo dnf update -y"
12+
],
13+
"install_build_deps": "sudo dnf install -y rpm ccache cmake gcc gcc-c++ gdb glibc-devel glibc-devel.i686 libstdc++-devel libstdc++-devel.i686 libstdc++-static libstdc++-static.i686 zlib-devel git python3 python3-pexpect rpm-build ninja-build capnproto capnproto-libs capnproto-devel",
14+
"install_test_deps": "sudo dnf install -y gtk3 dbus-glib xorg-x11-utils gnutls-devel libacl-devel openldap-devel tigervnc-server-minimal curl tar bzip2 libreoffice-writer"
15+
}

release-process/rr-testing.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Requires variables and functions to be set. See test-system.py.
44
# $git_revision : git revision to check out, build and test
5+
# $staticlibs : TRUE or FALSE to build with static libs
56
# $build_dist : 1 if we should build dist packages, 0 otherwise
67
# $test_firefox : 1 to run firefox tests, 0 to skip
78
# $ctest_options : options to pass to ctest, e.g to exclude certain tests
@@ -29,7 +30,7 @@ git checkout $git_revision
2930
rm -rf ~/obj || true
3031
mkdir ~/obj
3132
cd ~/obj
32-
cmake -G Ninja -DCMAKE_BUILD_TYPE=RELEASE -Dstaticlibs=TRUE -Dstrip=TRUE ../rr
33+
cmake -G Ninja -DCMAKE_BUILD_TYPE=RELEASE -Dstaticlibs=$staticlibs -Dstrip=TRUE ../rr
3334
ninja
3435

3536
# Test deps are installed in parallel with our build.

release-process/test-system.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,15 @@ def wait_for_ssh(self):
7676
self.instance.wait_until_running()
7777
self.instance.reload()
7878
print('Started VM %s "%s" at %s'%(self.instance.id, self.distro_name, self.instance.public_ip_address), file=sys.stderr)
79-
for retries in range(30):
79+
for retries in range(60):
8080
result = subprocess.run(self.ssh_command() + ['true'], stdin=subprocess.DEVNULL, stderr=subprocess.PIPE)
8181
if result.returncode == 0:
8282
self.ssh_ready = True
83-
break
84-
if b'Connection refused' not in result.stderr:
83+
return
84+
if b'Connection refused' not in result.stderr and b'reset by peer' not in result.stderr:
8585
raise Exception('SSH connection failed:\n%s'%result.stderr.decode('utf-8'))
8686
time.sleep(1)
87+
raise Exception('Too many retries, cannot connect via SSH')
8788

8889
def ssh(self, cmd, input):
8990
"""Run `cmd` (command + args list) via SSH and wait for it to finish.
@@ -137,6 +138,10 @@ def config_script_function(config_key):
137138
raise ValueError('Invalid config entry %s: %s' % (config_key, entry))
138139
return ('function %s {\n%s\n}' % (config_key, '\n'.join(lines)))
139140

141+
if args.dist_files_dir and not distro_config.get('staticlibs', True):
142+
print('Dist builds must use staticlibs, aborting', file=sys.stderr)
143+
sys.exit(1)
144+
140145
vm = Ec2Vm(args.machine_type, args.architecture, distro_config, args.keypair_pem_file)
141146
success = False
142147
try:
@@ -148,6 +153,7 @@ def config_script_function(config_key):
148153
config_script_function('install_build_deps'),
149154
config_script_function('install_test_deps'),
150155
'git_revision=%s'%args.git_revision,
156+
'staticlibs=%s'%('TRUE' if distro_config.get('staticlibs', True) else 'FALSE'),
151157
'build_dist=%d'%(1 if args.dist_files_dir is not None else 0),
152158
'test_firefox=%d'%(1 if args.architecture == 'x86_64' else 0),
153159
'ctest_options="%s"'%' '.join('-E %s'%r for r in exclude_tests),

src/test/invalid_interpreter.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ void callback(__attribute__((unused)) uint64_t env, char* name, map_properties_t
2323

2424
int main(void) {
2525
page_size = sysconf(_SC_PAGESIZE);
26+
/* Trigger dl_runtime_resolve etc for mmap */
27+
mmap(NULL, page_size, PROT_NONE, MAP_ANONYMOUS, -1, 0);
2628
FILE* maps_file = fopen("/proc/self/maps", "r");
2729
iterate_maps(0, callback, maps_file);
2830
test_assert(n_to_unmap > 0);

0 commit comments

Comments
 (0)