Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DAOS-15645 test: create cont with daos instead of API
Browse files Browse the repository at this point in the history
Use "daos container create" instead of the API to create containers.
Misc updates

Skip-unit-tests: true
Skip-fault-injection-test: true

Required-githooks: true

Signed-off-by: Dalton Bohning <[email protected]>
daltonbohning committed Dec 6, 2024
1 parent fba944d commit b7e0754
Showing 32 changed files with 33 additions and 99 deletions.
15 changes: 6 additions & 9 deletions src/tests/ftest/checksum/csum_basic.py
Original file line number Diff line number Diff line change
@@ -33,25 +33,22 @@ def test_single_object_with_checksum(self):
:avocado: tags=checksum
:avocado: tags=CsumContainerValidation,test_single_object_with_checksum
"""
no_of_dkeys = self.params.get("no_of_dkeys", '/run/dkeys/*')[0]
no_of_akeys = self.params.get("no_of_akeys", '/run/akeys/*')[0]
no_of_dkeys = self.params.get("no_of_dkeys", '/run/dkeys/*')
no_of_akeys = self.params.get("no_of_akeys", '/run/akeys/*')
record_length = self.params.get("length", '/run/record/*')

pool = add_pool(self, connect=False)
pool.connect(2)

enable_checksum = self.params.get("enable_checksum", '/run/container/*')
container = add_container(self, pool, create=False)
container.input_params.enable_chksum = enable_checksum
container.create()
container = add_container(self, pool)
container.open()

obj = DaosObj(self.context, container.container)
obj.create(objcls=1)
obj.open()
ioreq = IORequest(self.context, container.container, obj, objtype=4)

self.d_log.info("Writing the Single Dataset")
self.log_step("Write single dataset")
record_index = 0
for dkey in range(no_of_dkeys):
for akey in range(no_of_akeys):
@@ -66,7 +63,7 @@ def test_single_object_with_checksum(self):
if record_index == len(record_length):
record_index = 0

self.d_log.info("Single Dataset Verification -- Started")
self.log_step("Verify single dataset")
record_index = 0
for dkey in range(no_of_dkeys):
for akey in range(no_of_akeys):
@@ -79,7 +76,7 @@ def test_single_object_with_checksum(self):
"ERROR:Data mismatch for dkey={}, akey={}: indata={}, "
"val={}".format(
dkey, akey, indata, val.value.decode('utf-8')))
self.d_log.error(message)
self.log.error(message)
self.fail(message)
record_index = record_index + 1
if record_index == len(record_length):
27 changes: 13 additions & 14 deletions src/tests/ftest/checksum/csum_basic.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# change host names to your reserved nodes, the
# required quantity is indicated by the placeholders
hosts:
test_servers: 1
test_clients: 1

timeout: 100

server_config:
name: daos_server
engines_per_host: 1
@@ -16,21 +16,20 @@ server_config:
class: ram
scm_mount: /mnt/daos
system_ram_reserved: 1

pool:
scm_size: 3000000000
svcn: 1
container: !mux
control_method: API
properties:
enable_checksum: true
dkeys: !mux
single:
no_of_dkeys:
- 50
akeys: !mux
single:
no_of_akeys:
- 10

container:
properties: cksum:crc16,cksum_size:16384

dkeys:
no_of_dkeys: 50

akeys:
no_of_akeys: 10

record: !mux
1Byte:
length:
26 changes: 13 additions & 13 deletions src/tests/ftest/container/api_basic_attribute.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''
(C) Copyright 2018-2023 Intel Corporation.
(C) Copyright 2018-2024 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
'''
@@ -165,8 +165,8 @@ def test_basic_attribute_sync(self):
if set_exp_result == 'FAIL':
self.fail("set_attr() was expected to fail but it worked!")
except DaosApiError as error:
print(error)
print(traceback.format_exc())
self.log.error(error)
self.log.error(traceback.format_exc())
if self.expected_result == "PASS":
self.fail(
"set_attr was supposed to work, but failed! name-value = {}".format(
@@ -176,8 +176,8 @@ def test_basic_attribute_sync(self):
try:
size, buf = self.container.container.list_attr()
except DaosApiError as excep:
print(excep)
print(traceback.format_exc())
self.log.error(excep)
self.log.error(traceback.format_exc())
self.fail("list_attr failed!")

if self.expected_result == 'PASS':
@@ -195,8 +195,8 @@ def test_basic_attribute_sync(self):
if self.expected_result == 'FAIL':
self.fail("get_attr() was expected to fail but it worked!")
except (DaosApiError, DaosTestError) as excep:
print(excep)
print(traceback.format_exc())
self.log.error(excep)
self.log.error(traceback.format_exc())
if self.expected_result == 'PASS':
msg = "get_attr was supposed to work, but failed! attr_name = {}".format(
self.attr_name)
@@ -238,8 +238,8 @@ def test_basic_attribute_async(self):
ret_code=callback_handler.ret_code, expected_result=set_exp_result,
method_name="set_attr")
except DaosApiError as error:
print(error)
print(traceback.format_exc())
self.log.error(error)
self.log.error(traceback.format_exc())
if self.expected_result == "PASS":
self.fail(
"set_attr was supposed to work, but failed! name-value = {}".format(
@@ -256,8 +256,8 @@ def test_basic_attribute_async(self):
if ret_code != 0:
self.fail("Unexpected RC after list_attr! {}".format(ret_code))
except DaosApiError as excep:
print(excep)
print(traceback.format_exc())
self.log.error(excep)
self.log.error(traceback.format_exc())
self.fail("list_attr failed!")

if self.expected_result == 'PASS':
@@ -281,8 +281,8 @@ def test_basic_attribute_async(self):
ret_code=callback_handler.ret_code, expected_result=self.expected_result,
method_name="get_attr")
except DaosApiError as excep:
print(excep)
print(traceback.format_exc())
self.log.error(excep)
self.log.error(traceback.format_exc())
if self.expected_result == 'PASS':
msg = "get_attr was supposed to work, but failed! attr_name = {}".format(
self.attr_name)
3 changes: 0 additions & 3 deletions src/tests/ftest/container/api_basic_attribute.yaml
Original file line number Diff line number Diff line change
@@ -56,6 +56,3 @@ attrtests:
value:
- NULL
- FAIL

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/container/basic_snapshot.yaml
Original file line number Diff line number Diff line change
@@ -33,6 +33,3 @@ object_class: !mux
obj_class: OC_RP_2G1
OC_RP_2G2:
obj_class: OC_RP_2G2

container:
control_method: API
1 change: 0 additions & 1 deletion src/tests/ftest/container/boundary.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ pool:
label: pool
set_logmasks: False
container:
control_method: API
akey_size: 5
dkey_size: 5
data_size: 256
3 changes: 0 additions & 3 deletions src/tests/ftest/container/destroy.yaml
Original file line number Diff line number Diff line change
@@ -21,9 +21,6 @@ server_config:
pool:
scm_size: 1G

container:
control_method: API

destroy_variants:
destroy_uuid: !mux
good_uid:
3 changes: 0 additions & 3 deletions src/tests/ftest/container/query_attribute.yaml
Original file line number Diff line number Diff line change
@@ -15,6 +15,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1G

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/container/snapshot.yaml
Original file line number Diff line number Diff line change
@@ -35,6 +35,3 @@ object_class: !mux
obj_class: OC_SX
OC_RP_2GX:
obj_class: OC_RP_2GX

container:
control_method: API
1 change: 0 additions & 1 deletion src/tests/ftest/control/dmg_system_cleanup.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ server_config:
pool:
scm_size: 1GB
container:
control_method: API
akey_size: 5
dkey_size: 5
data_size: 32
2 changes: 0 additions & 2 deletions src/tests/ftest/datamover/obj_small.yaml
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1G
container:
control_method: API
dcp:
client_processes:
np: 3
2 changes: 0 additions & 2 deletions src/tests/ftest/datamover/serial_small.yaml
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1G
container:
control_method: API
dserialize:
client_processes:
np: 3
3 changes: 0 additions & 3 deletions src/tests/ftest/dtx/basic.yaml
Original file line number Diff line number Diff line change
@@ -30,6 +30,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1073741824

container:
control_method: API
1 change: 0 additions & 1 deletion src/tests/ftest/erasurecode/offline_rebuild_single.yaml
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ pool:
pool_query_timeout: 30
container:
type: POSIX
control_method: API
single_data_set:
# [object_qty, record_qty, dkey, akey, data_size]
- [1, 1, 1, 1, 4194304]
1 change: 0 additions & 1 deletion src/tests/ftest/erasurecode/online_rebuild_single.yaml
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ pool:
properties: rd_fac:2
container:
type: POSIX
control_method: API
single_data_set:
# [object_qty, record_qty, dkey, akey, data_size]
- [1, 1, 1, 1, 4194304]
3 changes: 0 additions & 3 deletions src/tests/ftest/erasurecode/rank_failure.yaml
Original file line number Diff line number Diff line change
@@ -35,6 +35,3 @@ gen_io_conf:
record_size: "1000"
obj_num: "3"
obj_class: "EC_8P2GX"

container:
control_method: API
1 change: 0 additions & 1 deletion src/tests/ftest/nvme/object.yaml
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@ pool_3:
scm_size: 4GB
nvme_size: 350GB
container:
control_method: API
object_qty: 10
record_size:
- 1
3 changes: 0 additions & 3 deletions src/tests/ftest/object/create_many_dkeys.yaml
Original file line number Diff line number Diff line change
@@ -19,6 +19,3 @@ pool:
scm_size: 3G
dkeys:
number_of_dkeys: 1000000

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/object/fetch_bad_param.yaml
Original file line number Diff line number Diff line change
@@ -16,6 +16,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1073741824

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/object/integrity.yaml
Original file line number Diff line number Diff line change
@@ -46,6 +46,3 @@ record: !mux
- 32
- 512
- 1024

container:
control_method: APi
3 changes: 0 additions & 3 deletions src/tests/ftest/object/open_bad_param.yaml
Original file line number Diff line number Diff line change
@@ -14,6 +14,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1073741824

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/object/punch_test.yaml
Original file line number Diff line number Diff line change
@@ -15,6 +15,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1073741824

container:
control_method: API
3 changes: 0 additions & 3 deletions src/tests/ftest/object/update_bad_param.yaml
Original file line number Diff line number Diff line change
@@ -14,6 +14,3 @@ server_config:
system_ram_reserved: 1
pool:
scm_size: 1073741824

container:
control_method: API
4 changes: 1 addition & 3 deletions src/tests/ftest/osa/dmg_negative_test.yaml
Original file line number Diff line number Diff line change
@@ -38,9 +38,7 @@ pool:
nvme_size: 54000000000
svcn: 4
container:
control_method: API
properties:
enable_checksum: true
properties: cksum:crc16,cksum_size:16384
test_sequence:
dmg_cmd_test:
# Rank list, target_list, Pass/Fail Condition
1 change: 0 additions & 1 deletion src/tests/ftest/pool/evict.yaml
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ pool:
scm_size: 1G

container:
control_method: API
akey_size: 5
dkey_size: 5
data_size: 32
1 change: 0 additions & 1 deletion src/tests/ftest/rebuild/basic.yaml
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@ pool:
pool_query_timeout: 30
properties: rd_fac:2
container:
control_method: API
akey_size: 5
dkey_size: 5
debug: true
1 change: 0 additions & 1 deletion src/tests/ftest/rebuild/cascading_failures.yaml
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ pool:
pool_query_timeout: 30
properties: rd_fac:2
container:
control_method: API
akey_size: 5
dkey_size: 5
data_size: 5
1 change: 0 additions & 1 deletion src/tests/ftest/rebuild/delete_objects.yaml
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ pool:
pool_query_timeout: 30
properties: rd_fac:2
container:
control_method: API
akey_size: 5
dkey_size: 5
sizes: !mux
1 change: 0 additions & 1 deletion src/tests/ftest/rebuild/read_array.yaml
Original file line number Diff line number Diff line change
@@ -23,7 +23,6 @@ pool:
pool_query_timeout: 30
properties: rd_fac:2
container:
control_method: API
object_qty: 10
record_qty: 10
akey_size: 5
3 changes: 0 additions & 3 deletions src/tests/ftest/recovery/ddb.yaml
Original file line number Diff line number Diff line change
@@ -24,6 +24,3 @@ setup:

pool:
scm_size: 1G

container:
control_method: API
1 change: 0 additions & 1 deletion src/tests/ftest/server/metadata.yaml
Original file line number Diff line number Diff line change
@@ -53,7 +53,6 @@ pool:
# properties: svc_ops_entry_age:300
# properties: svc_ops_entry_age:600
container:
control_method: API
silent: true
ior:
clientslots:
3 changes: 0 additions & 3 deletions src/tests/ftest/telemetry/dkey_akey_enum_punch.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,3 @@ server_config:

pool:
scm_size: 1G

container:
control_method: API

0 comments on commit b7e0754

Please sign in to comment.