repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_has_auto_flush_win/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * mocks_windows.h -- redefinitions of EnumSystemFirmwareTables and * GetSystemFirmwareTable * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmem * files, when compiled f...
988
33.103448
73
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_has_auto_flush_win/mocks_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2019, Intel Corporation */ /* * mocks_windows.c -- mocked functions used in auto_flush_windows.c */ #include "util.h" #include "unittest.h" #include "set.h" #include "pmemcommon.h" #include "auto_flush_windows.h" #include "pmem_has_auto_flush_win.h" #inclu...
2,173
28.378378
68
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_has_auto_flush_win/pmem_has_auto_flush_win.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2019, Intel Corporation */ /* * pmem_has_auto_flush_win.c -- unit test for pmem_has_auto_flush_win() * * usage: pmem_has_auto_flush_win <option> * options: * n - is nfit available or not (y or n) * type: number of platform capabilities structure * c...
1,305
21.517241
71
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_alloc/obj_tx_alloc.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_tx_alloc.c -- unit test for pmemobj_tx_alloc and pmemobj_tx_zalloc */ #include <assert.h> #include <sys/param.h> #include <string.h> #include "unittest.h" #include "libpmemobj.h" #include "util.h" #include "valgrind_inter...
20,667
21.862832
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/blk_pool/blk_pool.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * blk_pool.c -- unit test for pmemblk_create() and pmemblk_open() * * usage: blk_pool op path bsize [poolsize mode] * * op can be: * c - create * o - open * f - do fault injection * * "poolsize" and "mode" argument...
2,377
20.423423
75
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_memcpy/pmem_memcpy.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * pmem_memcpy.c -- unit test for doing a memcpy * * usage: pmem_memcpy file destoff srcoff length * */ #include "unittest.h" #include "util_pmem.h" #include "file.h" #include "memcpy_common.h" static void * pmem_memcpy_pers...
4,249
23.853801
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_heap_interrupt/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * mocks_windows.h -- redefinitions of memops functions * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmemobj * files, when compiled for the purpose of obj_heap_interrup...
578
27.95
73
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_pmalloc_mt/obj_pmalloc_mt.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_pmalloc_mt.c -- multithreaded test of allocator */ #include <stdint.h> #include "file.h" #include "obj.h" #include "pmalloc.h" #include "sys_util.h" #include "unittest.h" #define MAX_THREADS 32 #define MAX_OPS_PER_THREAD...
9,123
21.09201
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_alignment/obj_ctl_alignment.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2020, Intel Corporation */ /* * obj_ctl_alignment.c -- tests for the alloc class alignment */ #include "unittest.h" #define LAYOUT "obj_ctl_alignment" static PMEMobjpool *pop; static void test_fail(void) { struct pobj_alloc_class_desc ac; ac.header_typ...
2,055
23.47619
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_list/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * mocks_windows.h -- redefinitions of obj list functions * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmemobj * files, when compiled for the purpose of obj_list test. ...
1,933
26.628571
74
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_list/obj_list.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2018, Intel Corporation */ /* * obj_list.h -- unit tests for list module */ #include <stddef.h> #include <sys/param.h> #include "list.h" #include "obj.h" #include "lane.h" #include "unittest.h" #include "util.h" /* offset to "in band" item */ #define OOB_...
2,314
21.475728
59
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_list/obj_list_mocks.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_list_mocks.c -- mocks for redo/lane/heap/obj modules */ #include <inttypes.h> #include "valgrind_internal.h" #include "obj_list.h" #include "set.h" /* * pmem_drain_nop -- no operation for drain on non-pmem memory */ st...
8,765
22.691892
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_list/obj_list_mocks_palloc.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_list_mocks_palloc.c -- mocks for palloc/pmalloc modules */ #include "obj_list.h" /* * pmalloc -- pmalloc mock * * Allocates the memory using linear allocator. * Prints the id of allocated struct oob_item for tracking...
6,050
26.756881
77
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/blk_rw_mt/blk_rw_mt.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
4,260
25.302469
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_stats/obj_ctl_stats.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2020, Intel Corporation */ /* * obj_ctl_stats.c -- tests for the libpmemobj statistics module */ #include "unittest.h" int main(int argc, char *argv[]) { START(argc, argv, "obj_ctl_stats"); if (argc != 2) UT_FATAL("usage: %s file-name", argv[0]); co...
3,299
25.829268
72
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/util_poolset_foreach/util_poolset_foreach.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * util_poolset_foreach.c -- unit test for util_poolset_foreach_part() * * usage: util_poolset_foreach file... */ #include "unittest.h" #include "set.h" #include "pmemcommon.h" #include <errno.h> #define LOG_PREFIX "ut" #defi...
1,293
20.213115
70
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_map_prot/pmem2_map_prot.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_map_prot.c -- pmem2_map_prot unit tests */ #include <stdbool.h> #include <signal.h> #include <setjmp.h> #include "config.h" #include "source.h" #include "map.h" #include "out.h" #include "pmem2.h" #include "unittest.h" #inc...
13,698
22.537801
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_layout/obj_layout.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * obj_layout.c -- unit test for layout * * This test should be modified after every layout change. It's here to prevent * any accidental layout changes. */ #include "util.h" #include "unittest.h" #include "sync.h" #include "...
8,411
35.103004
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_add_range_direct/obj_tx_add_range_direct.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_tx_add_range_direct.c -- unit test for pmemobj_tx_add_range_direct */ #include <string.h> #include <stddef.h> #include "tx.h" #include "unittest.h" #include "util.h" #include "valgrind_internal.h" #define LAYOUT_NAME "tx...
20,975
22.177901
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_many_size_allocs/obj_many_size_allocs.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2018, Intel Corporation */ /* * obj_many_size_allocs.c -- allocation of many objects with different sizes * */ #include <stddef.h> #include "unittest.h" #include "heap.h" #define LAYOUT_NAME "many_size_allocs" #define TEST_ALLOC_SIZE 2048 #define LAZY_L...
2,837
20.179104
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_integration/pmem2_integration.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019-2020, Intel Corporation */ /* * pmem2_integration.c -- pmem2 integration tests */ #include "libpmem2.h" #include "unittest.h" #include "rand.h" #include "ut_pmem2.h" #include "ut_pmem2_setup_integration.h" #define N_GRANULARITIES 3 /* BYTE, CACHE_LINE, PAG...
22,113
23.736018
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_alloc_class_config/obj_ctl_alloc_class_config.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017, Intel Corporation */ /* * obj_ctl_alloc_class_config.c -- tests for the ctl alloc class config */ #include "unittest.h" #define LAYOUT "obj_ctl_alloc_class_config" int main(int argc, char *argv[]) { START(argc, argv, "obj_ctl_alloc_class_config"); if ...
1,242
22.45283
71
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_action/obj_action.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2019, Intel Corporation */ /* * obj_action.c -- test the action API */ #include <stdlib.h> #include "unittest.h" #define LAYOUT_NAME "obj_action" struct macro_reserve_s { PMEMoid oid; uint64_t value; }; TOID_DECLARE(struct macro_reserve_s, 1); struct ...
8,548
23.286932
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_source_size/pmem2_source_size.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019-2020, Intel Corporation */ /* * pmem2_source_size.c -- pmem2_source_size unittests */ #include <stdint.h> #include "fault_injection.h" #include "unittest.h" #include "ut_pmem2.h" #include "ut_fh.h" #include "config.h" #include "out.h" typedef void (*test_...
3,326
20.191083
75
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/ex_linkedlist/ex_linkedlist.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * ex_linkedlist.c - test of linkedlist example */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "pmemobj_list.h" #include "unittest.h" #define ELEMENT_NO 10 #define PRINT_RES(res, str...
6,919
22.862069
77
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_persist_count/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * mocks_windows.h -- redefinitions of pmem functions * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmemobj * files, when compiled for the purpose of obj_persist_count t...
1,130
34.34375
73
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_persist_count/obj_persist_count.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_persist_count.c -- counting number of persists */ #define _GNU_SOURCE #include "obj.h" #include "pmalloc.h" #include "unittest.h" struct ops_counter { unsigned n_cl_stores; unsigned n_drain; unsigned n_pmem_persist; ...
10,962
22.832609
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmem_proto/rpmem_proto.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmem_proto.c -- unit test for rpmem_proto header * * The purpose of this test is to make sure the structures which describe * rpmem protocol messages does not have any padding. */ #include "unittest.h" #include "librpmem...
5,733
41.474074
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/compat_incompat_features/pool_open.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2018, Intel Corporation */ /* * pool_open.c -- a tool for verifying that an obj/blk/log pool opens correctly * * usage: pool_open <path> <obj|blk|log> <layout> */ #include "unittest.h" int main(int argc, char *argv[]) { START(argc, argv, "compat_incompat...
1,237
23.27451
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/util_poolset/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * mocks_windows.h -- redefinitions of libc functions used in util_poolset * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmem * files, when compiled for the purpose of u...
730
25.107143
74
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/util_poolset/util_poolset.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * util_poolset.c -- unit test for util_pool_create() / util_pool_open() * * usage: util_poolset cmd minlen hdrsize [mockopts] setfile ... */ #include <stdbool.h> #include "unittest.h" #include "pmemcommon.h" #include "set.h" ...
5,390
23.843318
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_user_data/obj_tx_user_data.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019-2020, Intel Corporation */ /* * obj_tx_user_data.c -- unit test for pmemobj_tx_(get/set)_user_data */ #include "unittest.h" #define LAYOUT_NAME "tx_user_data" #define USER_DATA_V1 (void *) 123456789ULL #define USER_DATA_V2 (void *) 987654321ULL /* * do_t...
1,948
20.655556
77
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_memset/pmem_memset.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * pmem_memset.c -- unit test for doing a memset * * usage: pmem_memset file offset length */ #include "unittest.h" #include "util_pmem.h" #include "file.h" #include "memset_common.h" typedef void *pmem_memset_fn(void *pmemde...
2,428
22.355769
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_fragmentation/obj_fragmentation.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * obj_fragmentation.c -- measures average heap fragmentation * * A pretty simplistic test that measures internal fragmentation of the * allocator for the given size. */ #include <stdlib.h> #include "unittest.h" #define LAYO...
1,607
23.738462
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_recovery/obj_recovery.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_recovery.c -- unit test for pool recovery */ #include "unittest.h" #include "valgrind_internal.h" #if VG_PMEMCHECK_ENABLED #define VALGRIND_PMEMCHECK_END_TX VALGRIND_PMC_END_TX #else #define VALGRIND_PMEMCHECK_END_TX #endi...
4,244
20.994819
61
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_perror/pmem2_perror.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_perror.c -- pmem2_perror unittests */ #include "libpmem2.h" #include "unittest.h" #include "out.h" #include "config.h" #include "source.h" /* * test_fail_pmem2_func_simple - simply check print message when func * from pme...
4,205
21.253968
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_mem_ext/pmem2_mem_ext.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_mem_ext.c -- test for low level functions from libpmem2 */ #include "unittest.h" #include "file.h" #include "ut_pmem2.h" #include "valgrind_internal.h" typedef void *(*memmove_fn)(void *pmemdest, const void *src, size_t len...
3,349
22.426573
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_util/rpmemd_util_test.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017-2018, Intel Corporation */ /* * rpmemd_util_test.c -- unit tests for rpmemd_util module */ #include "unittest.h" #include "rpmem_common.h" #include "rpmemd_log.h" #include "rpmemd_util.h" #include "util.h" /* structure to store results */ struct result { ...
3,027
20.027778
70
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_defrag/obj_defrag.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019, Intel Corporation */ /* * obj_defrag.c -- unit test for pmemobj_defrag */ #include "unittest.h" #include <limits.h> #define OBJECT_SIZE 100 static void defrag_basic(PMEMobjpool *pop) { int ret; PMEMoid oid1; PMEMoid oid2; PMEMoid oid3; ret = pmemobj...
4,429
22.817204
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_deep_flush/pmem2_deep_flush.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_deep_flush.c -- unit test for pmem_deep_flush() * * usage: pmem2_deep_flush file deep_persist_size offset * * pmem2_deep_flush depending on the mapping granularity is performed using one * of the following paths: * - pag...
8,865
22.270341
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_direct/obj_direct.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_direct.c -- unit test for pmemobj_direct() */ #include "obj.h" #include "obj_direct.h" #include "sys_util.h" #include "unittest.h" #define MAX_PATH_LEN 255 #define LAYOUT_NAME "direct" static os_mutex_t lock1; static os_...
3,476
22.653061
66
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_memcheck/obj_memcheck.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2018, Intel Corporation */ #include "unittest.h" #include "valgrind_internal.h" /* * Layout definition */ POBJ_LAYOUT_BEGIN(mc); POBJ_LAYOUT_ROOT(mc, struct root); POBJ_LAYOUT_TOID(mc, struct struct1); POBJ_LAYOUT_END(mc); struct struct1 { int fld; int d...
3,591
20.769697
70
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_defrag_advanced/obj_defrag_advanced.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * obj_defrag_advanced.c -- test for libpmemobj defragmentation feature */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <stddef.h> #include <unistd.h> #include <stdlib.h> #include "rand.h" #include "vgraph.h" #i...
12,707
21.452297
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_defrag_advanced/pgraph.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pgraph.c -- persistent graph representation */ #include <inttypes.h> #include "unittest.h" #include "vgraph.h" #include "pgraph.h" #define PATTERN 'g' /* * pnode_size -- return the entire of node size */ static size_t pnode_...
6,058
23.934156
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_defrag_advanced/vgraph.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * vgraph.c -- volatile graph representation */ #include <stdlib.h> #include <stdio.h> #include "rand.h" #include "unittest.h" #include "vgraph.h" /* * rand_range -- generate pseudo-random number from given interval [min, max] */...
2,894
21.099237
77
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_defrag_advanced/vgraph.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * vgraph.h -- volatile graph representation */ #ifndef OBJ_DEFRAG_ADV_VGRAPH #define OBJ_DEFRAG_ADV_VGRAPH #include "rand.h" struct vgraph_params { unsigned max_nodes; /* max # of nodes per graph */ unsigned max_edges; /* max # ...
1,158
23.145833
72
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_mem/obj_mem.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * obj_mem.c -- simple test for pmemobj_memcpy, pmemobj_memmove and * pmemobj_memset that verifies nothing blows up on pmemobj side. * Real consistency tests are for libpmem. */ #include "unittest.h" static unsigned Flags[] = { 0...
1,644
22.84058
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_valgr_simple/pmem_valgr_simple.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2016, Intel Corporation */ /* * pmem_valgr_simple.c -- simple unit test using pmemcheck * * usage: pmem_valgr_simple file */ #include "unittest.h" int main(int argc, char *argv[]) { size_t mapped_len; char *dest; int is_pmem; START(argc, argv, "pmem...
1,240
21.160714
63
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/libpmempool_check_version/libpmempool_check_version.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019, Intel Corporation */ /* * libpmempool_check_version -- a unittest for libpmempool_check_version. * */ #include "unittest.h" #include "libpmempool.h" int main(int argc, char *argv[]) { START(argc, argv, "libpmempool_check_version"); UT_ASSERTne(pmempoo...
897
22.631579
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/win_mmap_dtor/win_mmap_dtor.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * win_mmap_dtor.c -- unit test for windows mmap destructor */ #include "unittest.h" #include "os.h" #include "win_mmap.h" #define KILOBYTE (1 << 10) #define MEGABYTE (1 << 20) unsigned long long Mmap_align; int main(int argc, cha...
1,778
22.72
69
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_map_file_win/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * mocks_windows.h -- redefinitions of libc functions * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmem * files, when compiled for the purpose of pmem_map_file test. *...
608
28
72
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_map_file_win/mocks_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2017, Intel Corporation */ /* * mocks_windows.c -- mocked functions used in pmem_map_file.c * (Windows-specific) */ #include "unittest.h" #define MAX_LEN (4 * 1024 * 1024) /* * posix_fallocate -- interpose on libc posix_fallocate() *...
868
21.868421
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_locks/obj_tx_locks.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_tx_locks.c -- unit test for transaction locks */ #include "unittest.h" #define LAYOUT_NAME "direct" #define NUM_LOCKS 2 #define NUM_THREADS 10 #define TEST_VALUE_A 5 #define TEST_VALUE_B 10 #define TEST_VALUE_C 15 #defi...
6,164
21.918216
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/blk_recovery/blk_recovery.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2019, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
4,164
26.766667
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/out_err_mt/out_err_mt.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * out_err_mt.c -- unit test for error messages */ #include <sys/types.h> #include <stdarg.h> #include <errno.h> #include "unittest.h" #include "valgrind_internal.h" #include "util.h" #define NUM_THREADS 16 static void print_e...
3,840
22.278788
70
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/libpmempool_api/libpmempool_test.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016, Intel Corporation */ /* * libpmempool_test -- test of libpmempool. * */ #include <stddef.h> #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <getopt.h> #include "unittest.h" /* * Exact copy of the struct pmempool_check_args from libp...
3,753
22.31677
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/blk_nblock/blk_nblock.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2017, Intel Corporation */ /* * blk_nblock.c -- unit test for pmemblk_nblock() * * usage: blk_nblock bsize:file... * */ #include "unittest.h" int main(int argc, char *argv[]) { START(argc, argv, "blk_nblock"); if (argc < 2) UT_FATAL("usage: %s bsiz...
1,358
22.431034
62
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_invalid/obj_tx_invalid.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * obj_tx_invalid.c -- tests which transactional functions are available in * which transaction stages */ #include <stddef.h> #include "file.h" #include "unittest.h" /* * Layout definition */ POBJ_LAYOUT_BEGIN(tx_invalid); ...
11,213
23.809735
75
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_has_auto_flush/mocks_posix.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * mocks_posix.c -- mocked functions used in pmem_has_auto_flush.c */ #include <fts.h> #include "fs.h" #include "unittest.h" #define BUS_DEVICE_PATH "/sys/bus/nd/devices" /* * open -- open mock */ FUNC_MOCK(open, int, const char *...
1,627
22.257143
66
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_badblock_mocks/mocks_ndctl.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * mocks_ndctl.c -- mocked ndctl functions used * indirectly in pmem2_badblock_mocks.c */ #include <sys/stat.h> #include <ndctl/libndctl.h> #include "unittest.h" #include "pmem2_badblock_mocks.h" #define RESOURCE_...
5,900
22.050781
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_badblock_mocks/pmem2_badblock_mocks.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_badblock_mocks.h -- definitions for pmem2_badblock_mocks test */ #include "extent.h" /* fd bits 6-8: type of device */ #define FD_REG_FILE (1 << 6) /* regular file */ #define FD_CHR_DEV (2 << 6) /* character device */ #defi...
1,290
31.275
71
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_badblock_mocks/mocks_pmem2.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * mocks_pmem2.c -- mocked pmem2 functions used * indirectly in pmem2_badblock_mocks.c */ #include <ndctl/libndctl.h> #include "unittest.h" #include "out.h" #include "extent.h" #include "source.h" #include "pmem2_ut...
1,279
20.694915
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_badblock_mocks/pmem2_badblock_mocks.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_badblock_mocks.c -- unit test for pmem2_badblock_*() */ #include <ndctl/libndctl.h> #include "unittest.h" #include "out.h" #include "source.h" #include "badblocks.h" #include "pmem2_badblock_mocks.h" #define BAD_BLOCKS_NUM...
8,239
22.815029
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_api/pmem2_api.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_api.c -- PMEM2_API_[START|END] unittests */ #include "unittest.h" #include "ut_pmem2.h" #include "ut_pmem2_setup_integration.h" /* * map_valid -- return valid mapped pmem2_map and validate mapped memory length */ static s...
2,130
22.94382
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_obc/rpmemd_obc_test_open.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_obc_test_open.c -- test cases for open request message */ #include "rpmemd_obc_test_common.h" /* * Number of cases for checking open request message. Must be kept in sync * with client_bad_msg_open function. */ #de...
4,105
21.56044
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_obc/rpmemd_obc_test_create.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_obc_test_create.c -- test cases for create request message */ #include "rpmemd_obc_test_common.h" /* * Number of cases for checking create request message. Must be kept in sync * with client_bad_msg_create function....
4,165
22.016575
78
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_obc/rpmemd_obc_test_set_attr.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017, Intel Corporation */ /* * rpmemd_obc_test_set_attr.c -- test cases for set attributes request message */ #include "rpmemd_obc_test_common.h" /* * client_msg_set_attr_noresp -- send set attributes request message and don't * expect a response */ static ...
2,255
22.5
78
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_obc/rpmemd_obc_test_close.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016, Intel Corporation */ /* * rpmemd_obc_test_close.c -- test cases for close request message */ #include "rpmemd_obc_test_common.h" /* * client_msg_close_noresp -- send close request message and don't expect a * response */ static void client_msg_close_no...
1,791
21.683544
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmemd_obc/rpmemd_obc_test_common.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2018, Intel Corporation */ /* * rpmemd_obc_test_common.h -- common declarations for rpmemd_obc test */ #include "unittest.h" #include "librpmem.h" #include "rpmem_proto.h" #include "rpmem_common.h" #include "rpmem_ssh.h" #include "rpmem_util.h" #include "r...
3,791
23
70
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/ctl_prefault/ctl_prefault.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * ctl_prefault.c -- tests for the ctl entry points: prefault */ #include <stdlib.h> #include <string.h> #include <sys/resource.h> #include "unittest.h" #define OBJ_STR "obj" #define BLK_STR "blk" #define LOG_STR "log" #define BSIZ...
4,326
20.527363
71
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_memcpy/memcpy_common.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * memcpy_common.c -- common part for tests doing a persistent memcpy */ #include "unittest.h" #include "memcpy_common.h" #include "valgrind_internal.h" /* * do_memcpy: Worker function for memcpy * * Always work within the b...
2,491
27.643678
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_memcpy/memcpy_common.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * memcpy_common.h -- header file for common memcpy utilities */ #ifndef MEMCPY_COMMON_H #define MEMCPY_COMMON_H 1 #include "unittest.h" #include "file.h" typedef void *(*memcpy_fn)(void *pmemdest, const void *src, size_t len, uns...
611
23.48
73
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_memcpy/pmem2_memcpy.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_memcpy.c -- test for doing a memcpy from libpmem2 * * usage: pmem2_memcpy file destoff srcoff length * */ #include "unittest.h" #include "file.h" #include "ut_pmem2.h" #include "memcpy_common.h" /* * do_memcpy_variants ...
2,527
22.849057
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/util_is_zeroed/util_is_zeroed.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * util_is_zeroed.c -- unit test for util_is_zeroed */ #include "unittest.h" #include "util.h" int main(int argc, char *argv[]) { START(argc, argv, "util_is_zeroed"); util_init(); char bigbuf[3000]; memset(bigbuf + 0, 0x11,...
1,196
20.763636
53
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_map_file/mocks_windows.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2017, Intel Corporation */ /* * mocks_windows.h -- redefinitions of libc functions * * This file is Windows-specific. * * This file should be included (i.e. using Forced Include) by libpmem * files, when compiled for the purpose of pmem_map_file test. *...
608
28
72
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_map_file/mocks_windows.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2017, Intel Corporation */ /* * mocks_windows.c -- mocked functions used in pmem_map_file.c * (Windows-specific) */ #include "unittest.h" #define MAX_LEN (4 * 1024 * 1024) /* * posix_fallocate -- interpose on libc posix_fallocate() *...
868
21.868421
73
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_heap/obj_heap.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_heap.c -- unit test for heap * * operations are: 't', 'b', 'r', 'c', 'h', 'a', 'n', 's' * t: do test_heap, test_recycler * b: do fault_injection in function container_new_ravl * r: do fault_injection in function recycl...
16,917
25.027692
72
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_movnt_align/movnt_align_common.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * movnt_align_common.c -- common part for tests doing a persistent movnt align */ #include "unittest.h" #include "movnt_align_common.h" char *Src; char *Dst; char *Scratch; /* * check_memmove -- invoke check function with pm...
1,830
21.060241
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_movnt_align/pmem2_movnt_align.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * pmem2_movnt_align.c -- test for functions with non-temporal stores * * usage: pmem2_movnt_align file [C|F|B|S] * * C - pmem2_memcpy() * B - pmem2_memmove() in backward direction * F - pmem2_memmove() in forward direction * S ...
5,283
24.042654
69
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_movnt_align/movnt_align_common.h
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2020, Intel Corporation */ /* * movnt_align_common.h -- header file for common movnt_align test utilities */ #ifndef MOVNT_ALIGN_COMMON_H #define MOVNT_ALIGN_COMMON_H 1 #include "unittest.h" #include "file.h" #define N_BYTES (Ut_pagesize * 2) extern char *Src;...
989
26.5
80
h
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_memmove/pmem_memmove.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * pmem_memmove.c -- unit test for doing a memmove * * usage: * pmem_memmove file b:length [d:{offset}] [s:offset] [o:{1|2} S:{overlap}] * */ #include "unittest.h" #include "util_pmem.h" #include "file.h" #include "memmove_c...
5,226
22.334821
75
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_heap_size/obj_ctl_heap_size.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2017, Intel Corporation */ /* * obj_ctl_heap_size.c -- tests for the ctl entry points: heap.size.* */ #include "unittest.h" #define LAYOUT "obj_ctl_heap_size" #define CUSTOM_GRANULARITY ((1 << 20) * 10) #define OBJ_SIZE 1024 int main(int argc, char *argv[]) { ...
1,500
21.402985
69
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_basic_integration/obj_basic_integration.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_basic_integration.c -- Basic integration tests * */ #include <stddef.h> #include "unittest.h" #include "obj.h" #define TEST_STR "abcdefgh" #define TEST_STR_LEN 8 #define TEST_VALUE 5 /* * Layout definition */ POBJ_L...
17,784
25.154412
68
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_pmemcheck/obj_pmemcheck.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ #include "unittest.h" #include "valgrind_internal.h" struct foo { PMEMmutex bar; }; static void test_mutex_pmem_mapping_register(PMEMobjpool *pop) { PMEMoid foo; int ret = pmemobj_alloc(pop, &foo, sizeof(struct foo), 0, NULL, NULL); ...
1,127
21.56
71
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmreorder_simple/pmreorder_simple.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * pmreorder_simple.c -- a simple unit test for store reordering * * usage: pmreorder_simple g|b|c|m file * g - write data in a consistent manner * b - write data in a possibly inconsistent manner * c - check data consistency * m...
3,335
24.082707
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/remote_obj_basic/remote_obj_basic.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016, Intel Corporation */ /* * remote_obj_basic.c -- unit test for remote tests support * * usage: remote_obj_basic <create|open> <poolset-file> */ #include "unittest.h" #define LAYOUT_NAME "remote_obj_basic" int main(int argc, char *argv[]) { PMEMobjpool ...
1,019
20.25
62
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_debug/obj_ctl_debug.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * obj_ctl_debug.c -- tests for the ctl debug namesapce entry points */ #include "unittest.h" #include "../../libpmemobj/obj.h" #define LAYOUT "obj_ctl_debug" #define BUFFER_SIZE 128 #define ALLOC_PATTERN 0xAC static void test_allo...
1,452
20.367647
68
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_list_macro/obj_list_macro.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_list_macro.c -- unit tests for list module */ #include <stddef.h> #include "libpmemobj.h" #include "unittest.h" TOID_DECLARE(struct item, 0); TOID_DECLARE(struct list, 1); struct item { int id; POBJ_LIST_ENTRY(struct...
9,625
21.756501
68
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_critnib_mt/obj_critnib_mt.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2020, Intel Corporation */ /* * obj_critnib_mt.c -- multithreaded unit test for critnib */ #include <errno.h> #include "critnib.h" #include "rand.h" #include "os_thread.h" #include "unittest.h" #include "util.h" #include "valgrind_internal.h" #define NITE...
5,467
20.527559
72
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_ctl_arenas/obj_ctl_arenas.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019-2020, Intel Corporation */ /* * obj_ctl_arenas.c -- tests for the ctl entry points * usage: * obj_ctl_arenas <file> n - test for heap.narenas.total * * obj_ctl_arenas <file> s - test for heap.arena.[idx].size * and heap.thread.arena_id (RW) * * obj_ctl...
11,314
23.651416
66
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/win_poolset_unmap/win_poolset_unmap.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018, Intel Corporation */ /* * win_poolset_unmap.c -- test for windows mmap destructor. * * It checks whether all mappings are properly unmpapped and memory is properly * unreserved when auto growing pool is used. */ #include "unittest.h" #include "os.h" #in...
2,117
25.810127
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem2_compat/pmem2_compat.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2019, Intel Corporation */ /* * pmem2_compat.c -- compatibility test for libpmem vs libpmem2 */ #include "unittest.h" int main(int argc, char *argv[]) { UT_COMPILE_ERROR_ON(PMEM_F_MEM_NODRAIN != PMEM2_F_MEM_NODRAIN); UT_COMPILE_ERROR_ON(PMEM_F_MEM_NONTEMPORAL...
606
26.590909
72
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_strdup/obj_tx_strdup.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2020, Intel Corporation */ /* * obj_tx_strdup.c -- unit test for pmemobj_tx_strdup */ #include <sys/param.h> #include <string.h> #include <wchar.h> #include "unittest.h" #define LAYOUT_NAME "tx_strdup" TOID_DECLARE(char, 0); TOID_DECLARE(wchar_t, 1); enu...
11,087
24.315068
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_realloc/obj_tx_realloc.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_tx_realloc.c -- unit test for pmemobj_tx_realloc and pmemobj_tx_zrealloc */ #include <sys/param.h> #include <string.h> #include "unittest.h" #include "util.h" #define LAYOUT_NAME "tx_realloc" #define TEST_VALUE_1 1 #def...
12,874
25.767152
80
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_tx_lock/obj_tx_lock.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2020, Intel Corporation */ /* * obj_tx_lock.c -- unit test for pmemobj_tx_lock() */ #include "unittest.h" #include "libpmemobj.h" #include "obj.h" #define LAYOUT_NAME "obj_tx_lock" #define NUM_LOCKS 2 struct transaction_data { PMEMmutex mutexes[NUM_LOCKS...
7,003
24.75
76
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_memops/obj_memops.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2018-2020, Intel Corporation */ /* * obj_memops.c -- basic memory operations tests * */ #include <stddef.h> #include "obj.h" #include "memops.h" #include "ulog.h" #include "unittest.h" #define TEST_ENTRIES 256 #define TEST_VALUES TEST_ENTRIES enum fail_types...
15,904
23.319572
79
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/obj_strdup/obj_strdup.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2015-2019, Intel Corporation */ /* * obj_strdup.c -- unit test for pmemobj_strdup */ #include <sys/param.h> #include <string.h> #include <wchar.h> #include "unittest.h" #include "libpmemobj.h" #define LAYOUT_NAME "strdup" TOID_DECLARE(char, 0); TOID_DECLARE(wc...
5,017
26.571429
77
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/pmem_is_pmem/pmem_is_pmem.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2014-2020, Intel Corporation */ /* * Copyright (c) 2016, Microsoft Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * ...
3,216
30.23301
74
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/rpmem_obc_int/rpmem_obc_int.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * rpmem_obc_int.c -- integration test for rpmem_obc and rpmemd_obc modules */ #include "unittest.h" #include "pmemcommon.h" #include "librpmem.h" #include "rpmem.h" #include "rpmem_proto.h" #include "rpmem_common.h" #include "...
8,537
20.780612
75
c
null
NearPMSW-main/nearpm/shadow/pmdkArrSwap-sd/src/test/mmap_fixed/mmap_fixed.c
// SPDX-License-Identifier: BSD-3-Clause /* Copyright 2016-2019, Intel Corporation */ /* * mmap_fixed.c -- test memory mapping with MAP_FIXED for various lengths * * This test is intended to be used for testing Windows implementation * of memory mapping routines - mmap(), munmap(), msync() and mprotect(). * Those...
2,522
26.129032
79
c