From a5e5bfbc152d97ef1e4313fa4d8710af49aec839 Mon Sep 17 00:00:00 2001
From: Piotr Balcer <piotr.balcer@intel.com>
Date: Mon, 24 Aug 2020 10:42:49 +0200
Subject: [PATCH] test: add copy-on-write option to obj reorder test
Without this option, the consistency checking function
can mask issues.
---
src/test/obj_reorder_basic/obj_reorder_basic.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/test/obj_reorder_basic/obj_reorder_basic.c b/src/test/obj_reorder_basic/obj_reorder_basic.c
index d2ef37e70..d08b12b2b 100644
--- a/src/test/obj_reorder_basic/obj_reorder_basic.c
+++ b/src/test/obj_reorder_basic/obj_reorder_basic.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2018, Intel Corporation
+ * Copyright 2018-2020, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -99,10 +99,16 @@ main(int argc, char *argv[])
if (argc != 3 || strchr("wc", argv[1][0]) == 0 || argv[1][1] != '\0')
UT_FATAL("usage: %s w|c file", argv[0]);
+ char opt = argv[1][0];
+ if (opt == 'c') {
+ int y = 1;
+ pmemobj_ctl_set(NULL, "copy_on_write.at_open", &y);
+ }
+
PMEMobjpool *pop = pmemobj_open(argv[2], LAYOUT_NAME);
UT_ASSERT(pop != NULL);
- char opt = argv[1][0];
+
VALGRIND_EMIT_LOG("PMREORDER_MARKER_WRITE.BEGIN");
switch (opt) {
case 'w':
--
GitLab