Skip to content

Commit

Permalink
Updated CI tests from source to Fedora 38
Browse files Browse the repository at this point in the history
  • Loading branch information
Madeeks committed Oct 3, 2023
1 parent a2b256d commit 5f69921
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ rocky9:
- sarus-build-images
- sarus-build-from-scratch-and-test

fedora36:
fedora38:
extends: .from_source
script:
- . ./CI/utility_docker_functions.bash Release gcc.cmake $(pwd) $HOST_CACHES_PATH fedora:36 fedora:36
- . ./CI/utility_docker_functions.bash Release gcc.cmake $(pwd) $HOST_CACHES_PATH fedora:38 fedora:38
- sarus-build-images
- sarus-build-from-scratch-and-test

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- MPI Hook: dependency libraries and symlinks added by the hook in the container are now mounted or created in a dedicated directory.
Previously, the hook made mounts and created multiple duplicate links in several system directories. More details [here] (https://sarus.readthedocs.io/en/stable/config/mpi-hook.html#hook-configuration)
- Updated recommended runc version to 1.1.9
- Updated CI tests from source on Fedora (36 -> 38)

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions CI/Dockerfile.fedora:36 → CI/Dockerfile.fedora:38
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
# Docker Image used to build Sarus from its source,
# but with cached dependencies already in this image.
#
FROM fedora:36
FROM fedora:38

COPY ./installation/ /tmp/
RUN /tmp/install_sudo.sh fedora:36
RUN /tmp/install_packages_fedora:36.sh
RUN /tmp/install_sudo.sh fedora:38
RUN /tmp/install_packages_fedora:38.sh
RUN bash -i -c "/tmp/install_dep_runc.bash"
RUN bash -i -c "/tmp/install_dep_umoci.bash"
RUN pip3 install -r /tmp/requirements_tests.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ex
# Install packages
sudo dnf install -y gcc g++ glibc-static libstdc++-static git make cmake autoconf \
diffutils findutils wget which procps squashfs-tools zlib-devel zlib-static \
boost-devel skopeo tini-static \
boost-devel skopeo runc tini-static \
python3 python3-pip python3-setuptools
sudo dnf clean all
sudo rm -rf /var/cache/dnf
Expand Down
1 change: 1 addition & 0 deletions CI/src/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

ALPINE_IMAGE = "quay.io/ethcscs/alpine:3.14"
UBUNTU_IMAGE = "quay.io/ethcscs/ubuntu:20.04"
FEDORA_IMAGE = "quay.io/ethcscs/fedora:38"

sarus_json_filename = os.environ["CMAKE_INSTALL_PREFIX"] + "/etc/sarus.json"
sarus_json_backup = sarus_json_filename+".bak"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM fedora:36
FROM fedora:38

COPY libdummy.so /usr/lib/libdummy.so

Expand Down
8 changes: 4 additions & 4 deletions CI/src/integration_tests/test_glibc_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def tearDownClass(cls):
def _pull_docker_images(cls):
util.pull_image_if_necessary(is_centralized_repository=False, image=util.ALPINE_IMAGE) # no glibc
util.pull_image_if_necessary(is_centralized_repository=False, image="quay.io/ethcscs/centos:6") # glibc 2.12
util.pull_image_if_necessary(is_centralized_repository=False, image="quay.io/ethcscs/fedora:36") # assumption: glibc >= host's glibc
util.pull_image_if_necessary(is_centralized_repository=False, image="quay.io/ethcscs/fedora:38") # assumption: glibc >= host's glibc
# based on fedora - assumption: glibc >= host's glibc
util.pull_image_if_necessary(is_centralized_repository=False, image="quay.io/ethcscs/sarus-integration-tests:nonexisting_ldcache_entry_f36")
util.pull_image_if_necessary(is_centralized_repository=False, image="quay.io/ethcscs/sarus-integration-tests:nonexisting_ldcache_entry_f38")

@classmethod
def _enable_hook(cls):
Expand Down Expand Up @@ -155,13 +155,13 @@ def test_container_without_glibc(self):

def test_no_injection_in_container_with_recent_glibc(self):
self._glibc_command_line_option = True
self._container_image = "quay.io/ethcscs/fedora:36"
self._container_image = "quay.io/ethcscs/fedora:38"
hashes = self._get_hashes_of_host_libs_in_container()
assert not hashes

def test_no_injection_in_container_with_recent_glibc_and_nonexisting_ldcache_entry(self):
self._glibc_command_line_option = True
self._container_image = "quay.io/ethcscs/sarus-integration-tests:nonexisting_ldcache_entry_f36"
self._container_image = "quay.io/ethcscs/sarus-integration-tests:nonexisting_ldcache_entry_f38"
hashes = self._get_hashes_of_host_libs_in_container()
assert not hashes

Expand Down
4 changes: 2 additions & 2 deletions CI/src/integration_tests/test_seccomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def tearDownClass(cls):
def _pull_docker_images(cls):
images = [util.ALPINE_IMAGE,
util.UBUNTU_IMAGE,
"quay.io/ethcscs/fedora:34"]
util.FEDORA_IMAGE]
for image in images:
util.pull_image_if_necessary(is_centralized_repository=False, image=image)

Expand Down Expand Up @@ -70,7 +70,7 @@ def test_deny_chdir(self):
container_args,
"/tmp: Operation not permitted")
self._assert_sarus_raises_error_containing_text(sarus_options,
"quay.io/ethcscs/fedora:34",
util.FEDORA_IMAGE,
container_args,
"/tmp: Operation not permitted")
container_args = ["sh", "-c", "cd /tmp"]
Expand Down
4 changes: 2 additions & 2 deletions doc/install/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ instructions for such dependencies.
:start-after: set -ex
:end-before: # DOCS: END

.. group-tab:: Fedora 36
.. group-tab:: Fedora 38

.. literalinclude:: ../../CI/installation/install_packages_fedora:36.sh
.. literalinclude:: ../../CI/installation/install_packages_fedora:38.sh
:language: bash
:start-after: set -ex
:end-before: # DOCS: END
Expand Down
1 change: 1 addition & 0 deletions src/hooks/ssh/SshHook.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <memory>
#include <unordered_set>
#include <sys/types.h>
#include <cstdint>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>

Expand Down

0 comments on commit 5f69921

Please sign in to comment.