Skip to content
Closed
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: 2 additions & 0 deletions ci/provisioning/post_provision_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ source ci/junit.sh
# the specific site.

: "${MLNX_VER_NUM:=3.0.0}"
: "${PYTHON_VERSION:=3.11}"

# This is tangled and needs a better fix as it has DISTRO being passed
# as EL_8 for EL_9, yet other places expect DISTRO to really be EL_8 and
Expand Down Expand Up @@ -141,6 +142,7 @@ if ! retry_cmd 2400 clush -B -S -l root -w "$NODESTRING" \
COVFN_DISABLED=\"${COVFN_DISABLED:-true}\"
DAOS_CI_INFO_DIR=\"${DAOS_CI_INFO_DIR:?DAOS_CI_INFO_DIR is missing. Can not continue with node(s) provisioning process}\"
CI_SCONS_ARGS=\"${CI_SCONS_ARGS:-}\"
PYTHON_VERSION=\"${PYTHON_VERSION}\"
$(cat ci/stacktrace.sh)
$(cat ci/junit.sh)
$(cat ci/provisioning/post_provision_config_common_functions.sh)
Expand Down
4 changes: 2 additions & 2 deletions ci/provisioning/post_provision_config_nodes_EL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ distro_custom() {

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
dnf -y install python39 python39-devel
dnf -y install python3.11 python3.11-devel
: "${PYTHON_VERSION:=}"
dnf -y install "python${PYTHON_VERSION}" "python${PYTHON_VERSION}-devel"
}

install_mofed() {
Expand Down
5 changes: 5 additions & 0 deletions ci/provisioning/post_provision_config_nodes_LEAP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ distro_custom() {
sed -e '/MODULEPATH=/s/$/:\/usr\/share\/modules/' \
/etc/profile.d/lmod.sh; \
fi

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
: "${PYTHON_VERSION:=}"
dnf -y install "python${PYTHON_VERSION//./}" "python${PYTHON_VERSION//./}-devel"
}
4 changes: 3 additions & 1 deletion ci/rpm/test_daos_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

. /etc/os-release

: "${PYTHON_VERSION:=3.11}"

YUM=dnf
case "$ID_LIKE" in
*rhel*)
Expand Down Expand Up @@ -102,7 +104,7 @@ sudo chown "$me:$me" /tmp/daos_sockets

FTEST=/usr/lib/daos/TESTING/ftest

python3 -m venv venv
"python${PYTHON_VERSION}" -m venv venv
# shellcheck disable=SC1091
source venv/bin/activate
pip install --upgrade pip
Expand Down
542 changes: 535 additions & 7 deletions requirements-ftest.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/tests/ftest/cart/ctl/ctl_five_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -27,7 +28,7 @@ def test_cart_ctl_five_node(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as error:
self.print("Exception in launching server : {}".format(error))
self.log.info("Exception in launching server : %s", error)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand Down
3 changes: 2 additions & 1 deletion src/tests/ftest/cart/ctl/ctl_one_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -27,7 +28,7 @@ def test_cart_ctl_one_node(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as error:
self.print("Exception in launching server : {}".format(error))
self.log.info("Exception in launching server : %s", error)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand Down
35 changes: 18 additions & 17 deletions src/tests/ftest/cart/iv/iv_one_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -88,18 +89,18 @@ class CartIvOneNodeTest(CartTest):
def _verify_action(self, action):
"""Verify the action."""
if (('operation' not in action) or ('rank' not in action) or ('key' not in action)):
self.print("Error happened during action check")
self.log.info("Error happened during action check")
raise ValueError(
"Each action must contain an operation, rank, and key")

if len(action['key']) != 2:
self.print("Error key should be tuple of (rank, idx)")
self.log.info("Error key should be tuple of (rank, idx)")
raise ValueError("key should be a tuple of (rank, idx)")

def _verify_fetch_operation(self, action):
"""Verify the fetch operation."""
if (('return_code' not in action) or ('expected_value' not in action)):
self.print("Error: fetch operation was malformed")
self.log.info("Error: fetch operation was malformed")
raise ValueError("Fetch operation malformed")

def _iv_test_actions(self, cmd, actions):
Expand Down Expand Up @@ -135,7 +136,7 @@ def _iv_test_actions(self, cmd, actions):
log_path)
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -153,11 +154,11 @@ def _iv_test_actions(self, cmd, actions):
# codecs.open(log_file, "w", "unicode").write('')

# DEBUGGING: dump contents of JSON file to screen
with open(log_path, 'r') as file:
print(file.read())
with open(log_path, 'r', encoding='utf-8') as file:
self.log.info(file.read())

# Read the result into test_result and remove the temp file
with open(log_path, 'r') as log_file:
with open(log_path, 'r', encoding='utf-8') as log_file:
test_result = json.load(log_file)

os.close(log_fd)
Expand Down Expand Up @@ -197,7 +198,7 @@ def _iv_test_actions(self, cmd, actions):

clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -214,7 +215,7 @@ def _iv_test_actions(self, cmd, actions):
command = "{!s} -s '{!s}'".format(command, "none")
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -234,7 +235,7 @@ def _iv_test_actions(self, cmd, actions):
.format(command, 0)
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -246,7 +247,7 @@ def _iv_test_actions(self, cmd, actions):
command = " {!s} -o '{!s}' -r '{!s}' ".format(command, operation, rank)
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -268,7 +269,7 @@ def test_cart_iv_one_node(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as error:
self.print("Exception in launching server : {}".format(error))
self.log.info("Exception in launching server : %s", error)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand Down Expand Up @@ -481,7 +482,7 @@ def test_cart_iv_one_node(self):
except ValueError as exception:
failed = True
traceback.print_stack()
self.print("TEST FAILED: %s" % str(exception))
self.log.info("TEST FAILED: %s", exception)

# Shutdown Servers

Expand All @@ -493,25 +494,25 @@ def test_cart_iv_one_node(self):
# Request each server shut down gracefully
for rank in reversed(list(range(1, int(srv_ppn) * num_servers))):
clicmdt = clicmd + " -o shutdown -r " + str(rank)
self.print("\nClient cmd : {}\n".format(clicmdt))
self.log.info("Client cmd : %s", clicmdt)
try:
subprocess.call(shlex.split(clicmdt))
# pylint: disable=broad-except
except Exception as error:
failed = True
self.print("Exception in launching client : {}".format(error))
self.log.info("Exception in launching client : %s", error)

time.sleep(1)

# Shutdown rank 0 separately
clicmd += " -o shutdown -r 0"
self.print("\nClient cmd : {}\n".format(clicmd))
self.log.info("Client cmd : %s", clicmd)
try:
subprocess.call(shlex.split(clicmd))
# pylint: disable=broad-except
except Exception as error:
failed = True
self.print("Exception in launching client : {}".format(error))
self.log.info("Exception in launching client : %s", error)

# wait for servers to finish shutting down
time.sleep(2)
Expand Down
25 changes: 13 additions & 12 deletions src/tests/ftest/cart/iv/iv_two_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -74,18 +75,18 @@ class CartIvTwoNodeTest(CartTest):
def _verify_action(self, action):
"""Verify the action."""
if (('operation' not in action) or ('rank' not in action) or ('key' not in action)):
self.print("Error happened during action check")
self.log.info("Error happened during action check")
raise ValueError(
"Each action must contain an operation, rank, and key")

if len(action['key']) != 2:
self.print("Error key should be tuple of (rank, idx)")
self.log.info("Error key should be tuple of (rank, idx)")
raise ValueError("key should be a tuple of (rank, idx)")

def _verify_fetch_operation(self, action):
"""Verify fetch operation."""
if (('return_code' not in action) or ('expected_value' not in action)):
self.print("Error: fetch operation was malformed")
self.log.info("Error: fetch operation was malformed")
raise ValueError("Fetch operation malformed")

def _iv_test_actions(self, cmd, actions):
Expand Down Expand Up @@ -118,7 +119,7 @@ def _iv_test_actions(self, cmd, actions):
log_path)
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand Down Expand Up @@ -161,7 +162,7 @@ def _iv_test_actions(self, cmd, actions):
action['value'])
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -174,7 +175,7 @@ def _iv_test_actions(self, cmd, actions):
command, operation, rank, key_rank, key_idx)
clicmd += command

self.print("\nClient cmd : %s\n" % clicmd)
self.log.info("Client cmd : %s", clicmd)
cli_rtn = subprocess.call(shlex.split(clicmd))

if cli_rtn != 0:
Expand All @@ -197,7 +198,7 @@ def test_cart_iv_two_node(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as error:
self.print("Exception in launching server : {}".format(error))
self.log.info("Exception in launching server : %s", error)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand Down Expand Up @@ -237,7 +238,7 @@ def test_cart_iv_two_node(self):
self._iv_test_actions(clicmd, actions)
except ValueError as exception:
failed = True
self.print("TEST FAILED: {}".format(exception))
self.log.info("TEST FAILED: %s", exception)

# Shutdown Servers
num_servers = 2
Expand All @@ -248,25 +249,25 @@ def test_cart_iv_two_node(self):
# Request each server shut down gracefully
for rank in reversed(list(range(1, int(srv_ppn) * num_servers))):
clicmdt = clicmd + " -o shutdown -r " + str(rank)
self.print("\nClient cmd : {}\n".format(clicmdt))
self.log.info("Client cmd : %s", clicmdt)
try:
subprocess.call(shlex.split(clicmdt))
# pylint: disable=broad-except
except Exception as error:
failed = True
self.print("Exception in launching client : {}".format(error))
self.log.info("Exception in launching client : %s", error)

time.sleep(1)

# Shutdown rank 0 separately
clicmd += " -o shutdown -r 0"
self.print("\nClient cmd : {}\n".format(clicmd))
self.log.info("Client cmd : %s", clicmd)
try:
subprocess.call(shlex.split(clicmd))
# pylint: disable=broad-except
except Exception as error:
failed = True
self.print("Exception in launching client : {}".format(error))
self.log.info("Exception in launching client : %s", error)

# Give some time for completion before forcing servers shut down
time.sleep(2)
Expand Down
9 changes: 5 additions & 4 deletions src/tests/ftest/cart/no_pmix/multictx_one_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand All @@ -25,14 +26,14 @@ def test_cart_no_pmix(self):
"""
cmd = self.params.get("tst_bin", '/run/tests/*/')

self.print("\nTest cmd : {}\n".format(cmd))
self.log.info("Test cmd : %s", cmd)

with subprocess.Popen([cmd], stdout=subprocess.PIPE) as proc:

rc = self.wait_process(proc, 30)
if rc != 0:
self.print("Error waiting for process.")
self.print("returning {}".format(rc))
self.log.info("Error waiting for process.")
self.log.info("returning %s", rc)
self.fail("Test failed.\n")

self.print("Finished waiting for {}".format(proc))
self.log.info("Finished waiting for %s", proc)
3 changes: 2 additions & 1 deletion src/tests/ftest/cart/rpc/multisend_one_node.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -28,7 +29,7 @@ def test_cart_multisend(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as my_except:
self.print("Exception in launching server : {}".format(my_except))
self.log.info("Exception in launching server : %s", my_except)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand Down
11 changes: 5 additions & 6 deletions src/tests/ftest/cart/rpc/swim_notification.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2025 Hewlett Packard Enterprise Development LP

SPDX-License-Identifier: BSD-2-Clause-Patent
'''
Expand Down Expand Up @@ -29,7 +30,7 @@ def test_cart_rpc(self):
srv_rtn = self.launch_cmd_bg(srvcmd)
# pylint: disable=broad-except
except Exception as error:
self.print("Exception in launching server : {}".format(error))
self.log.info("Exception in launching server : %s", error)
self.fail("Test failed.\n")

# Verify the server is still running.
Expand All @@ -51,8 +52,6 @@ def test_cart_rpc(self):

# Verify the server(s) exited gracefully
if not self.check_files(glob_pat, count=3, retries=4):
self.print("Didn't find completion file(s): '{}'. "
"This indicates not all CaRT binaries exited "
"gracefully. "
"Marking test pass while DAOS-7892 remains "
"unresolved.\n".format(glob_pat))
self.log.info("Didn't find completion file(s): '%s'.", glob_pat)
self.log.info("This indicates not all CaRT binaries exited gracefully.")
self.log.info("Marking test pass while DAOS-7892 remains unresolved.")
Loading
Loading