Skip to content

Commit

Permalink
Merge branch 'master' into dinghwah/DAOS-15937-mdtest
Browse files Browse the repository at this point in the history
Skip-unit-tests: true
Skip-fault-injection-test: true
Skip-func-hw-test-medium-md-on-ssd: false
Test-tag: test_metadata_dup_rpc
Test-repeat: 10
Doc-only: false
Required-githooks: true
Signed-off-by: Ding Ho <[email protected]>
  • Loading branch information
dinghwah committed Aug 27, 2024
2 parents 5490200 + fcd1952 commit e428682
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 30 deletions.
5 changes: 3 additions & 2 deletions src/cart/crt_hg.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,8 @@ crt_get_info_string(bool primary, crt_provider_t provider, int iface_idx,
start_port = crt_provider_ctx0_port_get(primary, provider);
domain_str = crt_provider_domain_str_get(primary, provider, iface_idx);

D_ASSERTF(provider_str != NULL, "String for provider=%d not found\n", provider);

/* CXI provider uses domain names for info string */
if (provider == CRT_PROV_OFI_CXI)
iface_str = NULL;
Expand All @@ -690,8 +692,7 @@ crt_get_info_string(bool primary, crt_provider_t provider, int iface_idx,
D_GOTO(out, rc);
}

if (provider_str)
size += strlen(provider_str);
size = strlen(provider_str);
if (domain_str)
size += strlen(domain_str);
if (iface_str)
Expand Down
14 changes: 2 additions & 12 deletions src/client/dfuse/il/int_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -2522,15 +2522,9 @@ dfuse_fputs(char *__str, FILE *stream)
if (drop_reference_if_disabled(entry))
goto do_real_fn;

D_ERROR("Unsupported function\n");

entry->fd_err = ENOTSUP;

DISABLE_STREAM(entry, stream);
vector_decref(&fd_table, entry);

errno = ENOTSUP;
return EOF;

do_real_fn:
return __real_fputs(__str, stream);
}
Expand All @@ -2553,13 +2547,9 @@ dfuse_fputws(const wchar_t *ws, FILE *stream)
if (drop_reference_if_disabled(entry))
goto do_real_fn;

entry->fd_err = ENOTSUP;

DISABLE_STREAM(entry, stream);
vector_decref(&fd_table, entry);

errno = ENOTSUP;
return -1;

do_real_fn:
return __real_fputws(ws, stream);
}
Expand Down
4 changes: 2 additions & 2 deletions src/engine/server_iv.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ ivc_on_get(crt_iv_namespace_t ivns, crt_iv_key_t *iv_key,
struct ds_iv_class *class;
struct ds_iv_key key;
struct iv_priv_entry *priv_entry;
void *entry_priv_val;
void *entry_priv_val = NULL;
bool alloc_entry = false;
int rc;

Expand Down Expand Up @@ -978,7 +978,7 @@ ds_iv_done(crt_iv_namespace_t ivns, uint32_t class_id,
iv_value->sg_iovs[0].iov_len);
}

ABT_future_set(cb_info->future, &rc);
ABT_future_set(cb_info->future, NULL);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion src/object/tests/srv_checksum_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ fetch_with_hole7(void **state)
.layout = {
{.data = "ABCDEFGHIJKLM", .sel = {1, 2}, .ful = {1, 13} },
{.data = "", .sel = {3, 7}, .ful = {3, 7}, .is_hole = true},
{.data = "HIJKLM", .sel = {8, 13}, .ful = {1, 13} },
{.data = "HIJKLM", .sel = {8, 13}, .ful = {8, 13} },
{.data = NULL}
}
});
Expand Down
6 changes: 2 additions & 4 deletions src/pool/srv_iv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,7 @@ pool_iv_update(struct ds_iv_ns *ns, int class_id, uuid_t key_uuid,
}

int
ds_pool_iv_map_update(struct ds_pool *pool, struct pool_buf *buf,
uint32_t map_ver)
ds_pool_iv_map_update(struct ds_pool *pool, struct pool_buf *buf, uint32_t map_ver)
{
struct pool_iv_entry *iv_entry;
uint32_t iv_entry_size;
Expand All @@ -1240,8 +1239,7 @@ ds_pool_iv_map_update(struct ds_pool *pool, struct pool_buf *buf,
return -DER_NOMEM;

crt_group_rank(pool->sp_group, &iv_entry->piv_map.piv_master_rank);
iv_entry->piv_map.piv_pool_map_ver =
buf == NULL ? 0 : pool->sp_map_version;
iv_entry->piv_map.piv_pool_map_ver = buf == NULL ? 0 : map_ver;
if (buf != NULL)
memcpy(&iv_entry->piv_map.piv_pool_buf, buf,
pool_buf_size(buf->pb_nr));
Expand Down
2 changes: 1 addition & 1 deletion src/rsvc/srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ bcast_create(crt_opcode_t opc, bool filter_invert, d_rank_list_t *filter_ranks,
NULL /* co_bulk_hdl */, NULL /* priv */,
filter_invert ?
CRT_RPC_FLAG_FILTER_INVERT : 0,
crt_tree_topo(CRT_TREE_FLAT, 0), rpc);
crt_tree_topo(CRT_TREE_KNOMIAL, 2), rpc);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/tests/ftest/util/launch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,8 @@ def update_test_yaml(self, logger, scm_size, scm_mount, extra_yaml, multiplier,
if new_yaml_file:
if verbose > 0:
# Optionally display a diff of the yaml file
if not run_local(logger, f"diff -y {test.yaml_file} {new_yaml_file}").passed:
raise RunException(f"Error diff'ing {test.yaml_file}")
# diff returns rc=1 if the files are different, so ignore errors
run_local(logger, f"diff -y {test.yaml_file} {new_yaml_file}")
test.yaml_file = new_yaml_file

# Display the modified yaml file variants with debug
Expand Down
29 changes: 29 additions & 0 deletions src/tests/suite/daos_extend_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ extend_dkeys(void **state)
int j;
int rc;

print_message("BEGIN %s\n", __FUNCTION__);

if (!test_runable(arg, 3))
return;

Expand Down Expand Up @@ -73,6 +75,8 @@ extend_akeys(void **state)
int j;
int rc;

print_message("BEGIN %s\n", __FUNCTION__);

if (!test_runable(arg, 3))
return;

Expand Down Expand Up @@ -113,6 +117,8 @@ extend_indexes(void **state)
int k;
int rc;

print_message("BEGIN %s\n", __FUNCTION__);

if (!test_runable(arg, 3))
return;

Expand Down Expand Up @@ -155,6 +161,8 @@ extend_large_rec(void **state)
int j;
int rc;

print_message("BEGIN %s\n", __FUNCTION__);

if (!test_runable(arg, 3))
return;

Expand Down Expand Up @@ -192,6 +200,8 @@ extend_objects(void **state)
daos_obj_id_t oids[OBJ_NR];
int i;

print_message("BEGIN %s\n", __FUNCTION__);

if (!test_runable(arg, 3))
return;

Expand Down Expand Up @@ -250,6 +260,8 @@ extend_read_check(dfs_t *dfs_mt, dfs_obj_t *dir)

buf = malloc(buf_size);
verify_buf = malloc(buf_size);
print_message("%s(): allocations buf_size=" DF_U64 ", buf=%p, verify_buf=%p\n",
__FUNCTION__, buf_size, buf, verify_buf);
assert_non_null(buf);
assert_non_null(verify_buf);
d_iov_set(&iov, buf, buf_size);
Expand All @@ -266,18 +278,23 @@ extend_read_check(dfs_t *dfs_mt, dfs_obj_t *dir)
sprintf(filename, "file%d", i);
rc = dfs_open(dfs_mt, dir, filename, S_IFREG | S_IWUSR | S_IRUSR,
O_RDWR, OC_EC_2P1GX, 1048576, NULL, &obj);
print_message("%s(): dfs_open(filename=%s) rc=%d\n", __FUNCTION__, filename, rc);
assert_int_equal(rc, 0);

memset(verify_buf, 'a' + i, buf_size);
rc = dfs_read(dfs_mt, obj, &sgl, 0, &read_size, NULL);
print_message("%s(): dfs_read() read_size=" DF_U64 ", rc=%d\n", __FUNCTION__,
read_size, rc);
assert_int_equal(rc, 0);
assert_int_equal((int)read_size, buf_size);
assert_memory_equal(buf, verify_buf, read_size);
rc = dfs_release(obj);
print_message("%s(): dfs_release() rc=%d\n", __FUNCTION__, rc);
assert_int_equal(rc, 0);
}
free(buf);
free(verify_buf);
print_message("%s(): done, freed buf and verify_buf\n", __FUNCTION__);
}

static void
Expand Down Expand Up @@ -509,6 +526,7 @@ dfs_extend_punch_kill(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_PUNCH, extend_cb_internal, true);
}

Expand All @@ -517,6 +535,7 @@ dfs_extend_punch_extend(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_PUNCH, extend_cb_internal, false);
}

Expand All @@ -525,6 +544,7 @@ dfs_extend_stat_kill(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_STAT, extend_cb_internal, true);
}

Expand All @@ -533,6 +553,7 @@ dfs_extend_stat_extend(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_STAT, extend_cb_internal, false);
}

Expand All @@ -541,6 +562,7 @@ dfs_extend_enumerate_kill(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_ENUMERATE, extend_cb_internal, true);
}

Expand All @@ -549,6 +571,7 @@ dfs_extend_enumerate_extend(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_ENUMERATE, extend_cb_internal, false);
}

Expand All @@ -557,6 +580,7 @@ dfs_extend_fetch_kill(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_FETCH, extend_cb_internal, true);
}

Expand All @@ -565,6 +589,7 @@ dfs_extend_fetch_extend(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_FETCH, extend_cb_internal, false);
}

Expand All @@ -573,6 +598,7 @@ dfs_extend_write_kill(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_UPDATE, extend_cb_internal, true);
}

Expand All @@ -581,6 +607,7 @@ dfs_extend_write_extend(void **state)
{
FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);
dfs_extend_internal(state, EXTEND_UPDATE, extend_cb_internal, false);
}

Expand All @@ -598,6 +625,8 @@ dfs_extend_fail_retry(void **state)

FAULT_INJECTION_REQUIRED();

print_message("BEGIN %s\n", __FUNCTION__);

attr.da_props = daos_prop_alloc(1);
assert_non_null(attr.da_props);
attr.da_props->dpp_entries[0].dpe_type = DAOS_PROP_CO_REDUN_LVL;
Expand Down
Loading

0 comments on commit e428682

Please sign in to comment.