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

Add tests for data objects stuck in locked status, prevent nullptr dereference (4-2-stable) #2097

Merged
merged 7 commits into from
Feb 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting unspecified CMAKE_BUILD_TYPE to '${CMAKE_BUILD_TYPE}'")
endif()

IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(S3 libs3e4674774-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(S3 libs3c0e278d2-0)
string(REPLACE ";" ", " IRODS_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")

set(CMAKE_CXX_COMPILER ${IRODS_EXTERNALS_FULLPATH_CLANG}/bin/clang++)
Expand Down
54 changes: 38 additions & 16 deletions irods_consortium_continuous_integration_build_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,53 @@

import irods_python_ci_utilities

def update_local_package_repositories():
# Updating via dnf or yum actually upgrades packages, so don't do anything in those cases (for now).
dispatch_map = {
'Ubuntu': ['sudo', 'apt-get', 'update'],
'Centos': None,
'Centos linux': None,
'Almalinux': None,
'Opensuse ': None,
'Debian gnu_linux': ['sudo', 'apt-get', 'update']
}
try:
cmd = dispatch_map[irods_python_ci_utilities.get_distribution()]
if cmd:
irods_python_ci_utilities.subprocess_get_output(cmd, check_rc=True)
except KeyError:
irods_python_ci_utilities.raise_not_implemented_for_distribution()

def add_cmake_to_front_of_path():
cmake_path = '/opt/irods-externals/cmake3.11.4-0/bin'
os.environ['PATH'] = os.pathsep.join([cmake_path, os.environ['PATH']])

def install_building_dependencies(externals_directory):
externals_list = ['irods-externals-cmake3.11.4-0',
'irods-externals-avro1.9.0-0',
'irods-externals-boost1.67.0-0',
'irods-externals-clang-runtime6.0-0',
'irods-externals-clang6.0-0',
'irods-externals-cppzmq4.2.3-0',
'irods-externals-json3.7.3-0',
'irods-externals-libarchive3.3.2-1',
'irods-externals-libs3e4197a5e-0',
'irods-externals-zeromq4-14.1.6-0']
# The externals_list needs to include all dependencies, not the minimum set required for this plugin. If custom
# externals are being supplied via externals_directory, only the externals packages which exist in that directory
# will be installed.
externals_list = [
'irods-externals-avro1.9.0-0',
'irods-externals-boost1.67.0-0',
'irods-externals-catch22.3.0-0',
'irods-externals-clang-runtime6.0-0',
'irods-externals-clang6.0-0',
'irods-externals-cmake3.11.4-0',
'irods-externals-cppzmq4.2.3-0',
'irods-externals-fmt6.1.2-1',
'irods-externals-json3.7.3-0',
'irods-externals-libarchive3.3.2-1',
'irods-externals-libs3c0e278d2-0',
'irods-externals-nanodbc2.13.0-1',
'irods-externals-spdlog1.5.0-1',
'irods-externals-zeromq4-14.1.6-0'
]
if externals_directory == 'None' or externals_directory is None:
irods_python_ci_utilities.install_irods_core_dev_repository()
irods_python_ci_utilities.install_os_packages(externals_list)
else:
# Make sure the local package repositories are up to date so package dependencies can also be installed.
update_local_package_repositories()
package_suffix = irods_python_ci_utilities.get_package_suffix()
os_specific_directory = irods_python_ci_utilities.append_os_specific_directory(externals_directory)
externals = []
Expand All @@ -39,12 +66,7 @@ def install_building_dependencies(externals_directory):
install_os_specific_dependencies()

def install_os_specific_dependencies_apt():
if irods_python_ci_utilities.get_distribution() == 'Ubuntu': # cmake from externals requires newer libstdc++ on ub12
irods_python_ci_utilities.subprocess_get_output(['sudo', 'apt-get', 'update'], check_rc=True)
if irods_python_ci_utilities.get_distribution_version_major() == '12':
irods_python_ci_utilities.install_os_packages(['python-software-properties'])
irods_python_ci_utilities.subprocess_get_output(['sudo', 'add-apt-repository', '-y', 'ppa:ubuntu-toolchain-r/test'], check_rc=True)
irods_python_ci_utilities.install_os_packages(['libstdc++6'])
update_local_package_repositories()
irods_python_ci_utilities.install_os_packages(['make', 'libssl-dev', 'libxml2-dev', 'libcurl4-gnutls-dev', 'gcc'])

def install_os_specific_dependencies_yum():
Expand Down
7 changes: 6 additions & 1 deletion irods_consortium_continuous_integration_test_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import glob
import optparse
import os
import pwd
import random
import shutil
import stat
Expand All @@ -27,11 +28,15 @@ def download_and_start_minio_server():

root_username = ''.join(random.choice(string.ascii_letters) for i in list(range(10)))
root_password = ''.join(random.choice(string.ascii_letters) for i in list(range(10)))
keypair_path = '/var/lib/irods/minio.keypair'

with open('/var/lib/irods/minio.keypair', 'w') as f:
with open(keypair_path, 'w') as f:
f.write('%s\n' % root_username)
f.write('%s\n' % root_password)

irods_user_info = pwd.getpwnam('irods')
os.chown(keypair_path, irods_user_info.pw_uid, irods_user_info.pw_gid)

os.environ['MINIO_ROOT_USER'] = root_username
os.environ['MINIO_ROOT_PASSWORD'] = root_password

Expand Down
Loading