Skip to content

Commit

Permalink
DAOS-12950 test: add ftest tag linter
Browse files Browse the repository at this point in the history
Features: NvmeObject

- Add ftest/tags.py utility
  - lint option for linting tags
  - list option to list tags associated with files
  - dump option to dump test and tag info for files
- Add infrastructure that can be extended for future tag work

Required-githooks: true

Signed-off-by: Dalton Bohning <[email protected]>
  • Loading branch information
daltonbohning committed Jan 19, 2024
1 parent be4402b commit 9c6f72f
Show file tree
Hide file tree
Showing 5 changed files with 467 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,12 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check DAOS logging macro use.
run: ./utils/cq/d_logging_check.py --github src

ftest-tags:
name: Ftest tag check
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check DAOS ftest tags.
run: \[ ! -x src/tests/ftest/tags.py \] || ./src/tests/ftest/tags.py lint
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
daos (2.5.100-14) unstable; urgency=medium
[ Dalton Bohning ]
* Add tags.py

-- Dalton Bohning <[email protected]> Fri, 19 Jan 2024 12:00:00 -0500

daos (2.5.100-13) unstable; urgency=medium
[ Brian J. Murrell ]
* Update for EL 8.8 and Leap 15.5
Expand Down
12 changes: 6 additions & 6 deletions src/tests/ftest/nvme/object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
(C) Copyright 2020-2023 Intel Corporation.
(C) Copyright 2020-2024 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
Expand Down Expand Up @@ -64,7 +64,7 @@ def container_read(container, array_size=None):
# read written objects and verify
container.read_objects()

def test_runner(self, namespace, record_size, array_size, thread_per_size=4):
def run_test(self, namespace, record_size, array_size, thread_per_size=4):
"""Perform simultaneous writes of varying record size to a container.
Args:
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_nvme_object_single_pool(self):
:avocado: tags=NvmeObject,test_nvme_object_single_pool
"""
# perform multiple object writes to a single pool
self.test_runner("/run/pool_1/*", self.record_size[:-1], 0, self.array_size)
self.run_test("/run/pool_1/*", self.record_size[:-1], 0, self.array_size)
report_errors(self, self.errors)

@avocado.fail_on(DaosApiError)
Expand All @@ -165,7 +165,7 @@ def test_nvme_object_multiple_pools(self):
:avocado: tags=NvmeObject,test_nvme_object_multiple_pools
"""
# thread to perform simultaneous object writes to multiple pools
runner_manager = ThreadManager(self.test_runner, self.get_remaining_time() - 30)
runner_manager = ThreadManager(self.run_test, self.get_remaining_time() - 30)
runner_manager.add(
namespace='/run/pool_1/*', record_size=self.record_size, array_size=self.array_size)
runner_manager.add(
Expand All @@ -178,6 +178,6 @@ def test_nvme_object_multiple_pools(self):
self.errors.append(result.result)
report_errors(self, self.errors)

# run the test_runner after cleaning up all the pools for large nvme_pool size
self.test_runner("/run/pool_3/*", self.record_size, self.array_size)
# run again after cleaning up all the pools for large nvme_pool size
self.run_test("/run/pool_3/*", self.record_size, self.array_size)
report_errors(self, self.errors)
Loading

0 comments on commit 9c6f72f

Please sign in to comment.