Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
janekmi committed Sep 27, 2024
1 parent 9d94b0c commit 1845598
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test/daos_dtx/00_harmonize_VOS_pool_path.patch
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ index 618f9feddd..7452ba2a34 100644
+ char uuid_str2[] = "591d19e4-69fe-11ef-b13d-a4bf0165c389";

memset(tcx, 0, sizeof(*tcx));
+
+
+ uuid_parse(uuid_str, tcx->tc_po_uuid);
+ // uuid_generate_time_safe(tcx->tc_po_uuid);
+ // uuid_unparse(tcx->tc_po_uuid, uuid_str);
Expand Down
21 changes: 21 additions & 0 deletions src/test/daos_dtx/08_cmocka_filter_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/src/dtx/tests/dtx_tests.c b/src/dtx/tests/dtx_tests.c
index b06a2f4ea8..7236a2bda0 100644
--- a/src/dtx/tests/dtx_tests.c
+++ b/src/dtx/tests/dtx_tests.c
@@ -61,6 +61,7 @@ int
main(int argc, char **argv)
{
int rc = 0;
+ char filter[1024];
int nr_failed = 0;
int opt = 0;
int index = 0;
@@ -107,8 +108,6 @@ main(int argc, char **argv)
#if CMOCKA_FILTER_SUPPORTED == 1 /** requires cmocka 1.1.5 */
{
/** Add wildcards for easier filtering */
- char filter[sizeof(optarg) + 2];
-
sprintf(filter, "*%s*", optarg);
cmocka_set_test_filter(filter);
printf("Test filter: %s\n", filter);
2 changes: 2 additions & 0 deletions src/test/daos_dtx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ in the respective teardown.
- introduces a basic DTX life-cycle UT
- `07_disable_ABT_init.patch` which:
- prevents ABT from screwing with Valgrind
- `08_cmocka_filter_fix.patch` which:
- fix cmocka's filter (invalid size calculation)
4 changes: 2 additions & 2 deletions src/test/daos_dtx/TESTS.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class DTX_TESTS(t.Test):

def run(self, ctx):
cmd = ['dtx_tests', '-S', ctx.testdir]
ctx.exec(*cmd, '-e', 'DTX400.a', cmd_requires_cwd=False)
ctx.exec(*cmd, '-e', 'DTX400.b', cmd_requires_cwd=False)
ctx.exec(*cmd, '-f', 'DTX400.a', cmd_requires_cwd=False)
ctx.exec(*cmd, '-f', 'DTX400.b', cmd_requires_cwd=False)


@t.require_valgrind_enabled('memcheck')
Expand Down

0 comments on commit 1845598

Please sign in to comment.