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/checkpointing/pmdk-checkpoint1/src/libpmemobj/pmemops.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
#ifndef LIBPMEMOBJ_PMEMOPS_H
#define LIBPMEMOBJ_PMEMOPS_H 1
#include <stddef.h>
#include <stdint.h>
#include "util.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*persist_fn)(void *base, const void *, size_t, unsigned);
ty... | 2,672 | 22.866071 | 80 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/libpmemobj/sync.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* sync.h -- internal to obj synchronization API
*/
#ifndef LIBPMEMOBJ_SYNC_H
#define LIBPMEMOBJ_SYNC_H 1
#include <errno.h>
#include <stdint.h>
#include "libpmemobj.h"
#include "out.h"
#include "os_thread.h"
#ifdef __cpluspl... | 2,504 | 21.168142 | 79 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/libpmemobj/sync.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2018, Intel Corporation */
/*
* sync.c -- persistent memory resident synchronization primitives
*/
#include <inttypes.h>
#include "obj.h"
#include "out.h"
#include "util.h"
#include "sync.h"
#include "sys_util.h"
#include "util.h"
#include "valgrind_intern... | 16,501 | 24.664075 | 80 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/libpmemobj/lane.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* lane.h -- internal definitions for lanes
*/
#ifndef LIBPMEMOBJ_LANE_H
#define LIBPMEMOBJ_LANE_H 1
#include <stdint.h>
#include "ulog.h"
#include "libpmemobj.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Distance between ... | 4,652 | 30.02 | 80 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/libpmemobj/ulog.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* ulog.h -- unified log public interface
*/
#ifndef LIBPMEMOBJ_ULOG_H
#define LIBPMEMOBJ_ULOG_H 1
#include <stddef.h>
#include <stdint.h>
#include <time.h>
#include "vec.h"
#include "pmemops.h"
#include<x86intrin.h>
////cmd... | 6,600 | 32.170854 | 104 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/libpmemobj/lane.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* lane.c -- lane implementation
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <inttypes.h>
#include <errno.h>
#include <limits.h>
#include <sched.h>
#include "libpmemobj.h"
#include "critnib.h"
#include "lane.h"
... | 12,994 | 21.678883 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_obc/rpmem_obc_test_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* rpmem_obc_test_common.h -- common declarations for rpmem_obc test
*/
#include "unittest.h"
#include "out.h"
#include "librpmem.h"
#include "rpmem.h"
#include "rpmem_proto.h"
#include "rpmem_common.h"
#include "rpmem_util.h"
... | 2,951 | 26.082569 | 71 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_obc/rpmem_obc_test_create.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* rpmem_obc_test_create.c -- test cases for rpmem_obc_create function
*/
#include "rpmem_obc_test_common.h"
static const struct rpmem_msg_create_resp CREATE_RESP = {
.hdr = {
.type = RPMEM_MSG_TYPE_CREATE_RESP,
.size = si... | 6,642 | 20.498382 | 80 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_obc/rpmem_obc_test.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2017, Intel Corporation */
/*
* rpmem_obc_test.c -- unit test for rpmem_obc module
*/
#include "rpmem_obc_test_common.h"
#include "pmemcommon.h"
/*
* test_cases -- available test cases
*/
static struct test_case test_cases[] = {
TEST_CASE(client_enotcon... | 1,388 | 20.369231 | 59 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_obc/rpmem_obc_test_open.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* rpmem_obc_test_open.c -- test cases for rpmem_obj_open function
*/
#include "rpmem_obc_test_common.h"
static const struct rpmem_msg_open_resp OPEN_RESP = {
.hdr = {
.type = RPMEM_MSG_TYPE_OPEN_RESP,
.size = sizeof(struc... | 7,427 | 21.306306 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmemd_db/rpmemd_db_test.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* rpmemd_db_test.c -- unit test for pool set database
*
* usage: rpmemd_db <log-file> <root_dir> <pool_desc_1> <pool_desc_2>
*/
#include "file.h"
#include "unittest.h"
#include "librpmem.h"
#include "rpmemd_db.h"
#include "rp... | 15,339 | 22.636364 | 72 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_granularity/pmem2_granularity.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* pmem2_granularity.c -- test for graunlarity functionality
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"
#include "source.h"
#include "pmem2_granularity.h"
#include "unittest.h"
#include "u... | 7,665 | 23.106918 | 74 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_granularity/mocks_posix.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* mocks_posix.c -- mocked functions used in auto_flush_linux.c
*/
#include <fts.h>
#include "map.h"
#include "../common/mmap.h"
#include "fs.h"
#include "unittest.h"
#define BUS_DEVICE_PATH "/sys/bus/nd/devices"
/*
* mmap - mock m... | 2,302 | 23.5 | 63 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_granularity/mocks_dax_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* mocks_dax_windows.c -- mocked function required to control
* FILE_DAX_VOLUME value reported by the OS APIs
*/
#include "unittest.h"
FUNC_MOCK_DLLIMPORT(GetVolumeInformationByHandleW, BOOL,
HANDLE hFile,
LPWSTR lpVolumeNameBuff... | 688 | 22.758621 | 61 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_granularity/mocks_dax_windows.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* mocks_dax_windows.h -- redefinitions of GetVolumeInformationByHandleW
*
* This file is Windows-specific.
*
* This file should be included (i.e. using Forced Include) by libpmem2
* files, when compiled for the purpose of pmem2_g... | 956 | 28.90625 | 77 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_fip/rpmem_fip_test.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* rpmem_fip_test.c -- tests for rpmem_fip and rpmemd_fip modules
*/
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "unittest.h"
#include "pmemcommon.h"
#include "librpmem.h"
... | 22,586 | 21.97762 | 78 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/rpmem_fip/rpmem_fip_oob.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, Intel Corporation */
/*
* rpmem_fip_sock.h -- simple oob connection implementation for exchanging
* required RDMA related data
*/
#include <stdint.h>
#include <netinet/in.h>
typedef struct rpmem_ssh client_t;
client_t *client_exchange(struct rpmem_targe... | 743 | 24.655172 | 74 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_source/pmem2_source.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* pmem2_source.c -- pmem2_source unittests
*/
#include "fault_injection.h"
#include "libpmem2.h"
#include "unittest.h"
#include "ut_pmem2_utils.h"
#include "ut_pmem2_config.h"
#include "source.h"
#include "out.h"
/*
* verify_f... | 7,608 | 20.433803 | 77 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/tools/ddmap/ddmap.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */
/*
* ddmap.c -- simple app for reading and writing data from/to a regular file or
* dax device using mmap instead of file io API
*/
#include <stdio.h>
#include <unistd.h>
#include <getopt.h>
#include <stdlib.h>
#include <sys/mman... | 11,872 | 22.280392 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/tools/dllview/dllview.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */
/*
* dllview.c -- a simple utility displaying the list of symbols exported by DLL
*
* usage: dllview filename
*/
#include <windows.h>
#include <stdio.h>
#include <winnt.h>
#include <imagehlp.h>
#include "util.h"
int
main(int ar... | 1,233 | 20.649123 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/tools/cmpmap/cmpmap.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2019, Intel Corporation */
/*
* cmpmap -- a tool for comparing files using mmap
*/
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <sys/mman.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "file... | 5,918 | 20.291367 | 73 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/tools/ctrld/signals_linux.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017, Intel Corporation */
/*
* signals_linux.h - Signal definitions for Linux
*/
#ifndef _SIGNALS_LINUX_H
#define _SIGNALS_LINUX_H 1
#define SIGNAL_2_STR(sig) [sig] = #sig
static const char *signal2str[] = {
SIGNAL_2_STR(SIGHUP), /* 1 */
SIGNAL_2_STR(SIGINT)... | 1,322 | 27.148936 | 49 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/tools/ctrld/signals_freebsd.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017, Intel Corporation */
/*
* signals_fbsd.h - Signal definitions for FreeBSD
*/
#ifndef _SIGNALS_FBSD_H
#define _SIGNALS_FBSD_H 1
#define SIGNAL_2_STR(sig) [sig] = #sig
static const char *signal2str[] = {
SIGNAL_2_STR(SIGHUP), /* 1 */
SIGNAL_2_STR(SIGINT)... | 1,386 | 26.74 | 50 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_locks/obj_locks.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* obj_locks.c -- unit test for PMEMmutex, PMEMrwlock and PMEMcond
*/
#include <sys/param.h>
#include <string.h>
#include "unittest.h"
#include "libpmemobj.h"
#define LAYOUT_NAME "obj_locks"
#define NUM_THREADS 16
#define MAX_F... | 4,821 | 22.99005 | 72 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/libpmempool_feature/libpmempool_feature.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, Intel Corporation */
/*
* libpmempool_feature -- pmempool_feature_(enable|disable|query) test
*
*/
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include "libpmempool.h"
#include "pool_hdr.h"
#include "unittest.h"
#define EMPTY_FLAGS 0
/*
... | 1,622 | 20.077922 | 72 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_tx_flow/obj_tx_flow.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_tx_flow.c -- unit test for transaction flow
*/
#include "unittest.h"
#include "obj.h"
#define LAYOUT_NAME "direct"
#define TEST_VALUE_A 5
#define TEST_VALUE_B 10
#define TEST_VALUE_C 15
#define OPS_NUM 9
TOID_DECLARE(str... | 7,445 | 23.574257 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/util_pool_hdr/util_pool_hdr.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* util_pool_hdr.c -- unit test for pool_hdr layout and default values
*
* This test should be modified after every layout change. It's here to prevent
* any accidental layout changes.
*/
#include "util.h"
#include "unittest.h... | 4,508 | 30.531469 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/util_map_proc/util_map_proc.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2018, Intel Corporation */
/*
* util_map_proc.c -- unit test for util_map() /proc parsing
*
* usage: util_map_proc maps_file len [len]...
*/
#define _GNU_SOURCE
#include <dlfcn.h>
#include "unittest.h"
#include "util.h"
#include "mmap.h"
#define GIGABYT... | 1,335 | 21.644068 | 60 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/win_lists/win_lists.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, 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:
*
* * Re... | 5,431 | 27 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_pool/obj_pool.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_pool.c -- unit test for pmemobj_create() and pmemobj_open()
* Also tests pmemobj_(set/get)_user_data().
*
* usage: obj_pool op path layout [poolsize mode]
*
* op can be:
* c - create
* o - open
*
* "poolsize" a... | 2,905 | 21.527132 | 75 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_memset/pmem2_memset.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* pmem_memset.c -- unit test for doing a memset
*
* usage: pmem_memset file offset length
*/
#include "unittest.h"
#include "file.h"
#include "ut_pmem2.h"
#include "memset_common.h"
static void
do_memset_variants(int fd, char *de... | 1,810 | 21.6375 | 78 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_memset/memset_common.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* memset_common.c -- common part for tests doing a persistent memset
*/
#include "unittest.h"
#include "memset_common.h"
/*
* do_memset - worker function for memset
*/
void
do_memset(int fd, char *dest, const char *file_name... | 2,043 | 24.55 | 69 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem2_memset/memset_common.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* memset_common.h -- header file for common memset utilities
*/
#ifndef MEMSET_COMMON_H
#define MEMSET_COMMON_H 1
#include "unittest.h"
#include "file.h"
extern unsigned Flags[10];
typedef void *(*memset_fn)(void *pmemdest, int c,... | 552 | 22.041667 | 78 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_pmalloc_basic/obj_pmalloc_basic.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* obj_pmalloc_basic.c -- unit test for pmalloc interface
*/
#include <stdint.h>
#include "heap.h"
#include "obj.h"
#include "pmalloc.h"
#include "unittest.h"
#include "valgrind_internal.h"
#include "set.h"
#define MOCK_POOL_SI... | 8,962 | 23.15903 | 78 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/win_common/win_common.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017, 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:
*
* * Re... | 3,080 | 35.678571 | 74 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_realloc/obj_realloc.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2019, Intel Corporation */
/*
* obj_realloc.c -- unit test for pmemobj_realloc and pmemobj_zrealloc
*/
#include <sys/param.h>
#include <string.h>
#include "unittest.h"
#include "heap.h"
#include "alloc_class.h"
#include "obj.h"
#include "util.h"
#define M... | 7,788 | 24.371336 | 70 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem_deep_persist/mocks_posix.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2018-2020, Intel Corporation */
/*
* mocks_posix.c -- redefinitions of open/write functions (Posix implementation)
*/
#include "util.h"
#include "os.h"
#include "unittest.h"
/*
* open -- open mock because of Dev DAX without deep_flush
* sysfs file, eg. DAX o... | 1,326 | 20.754098 | 80 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_tx_free/obj_tx_free.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* obj_tx_free.c -- unit test for pmemobj_tx_free
*/
#include <sys/param.h>
#include <string.h>
#include "unittest.h"
#include "util.h"
#include "valgrind_internal.h"
#define LAYOUT_NAME "tx_free"
#define OBJ_SIZE (200 * 1024)... | 11,423 | 21.356164 | 78 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/util_uuid_generate/util_uuid_generate.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, Intel Corporation */
/*
* util_uuid_generate.c -- unit test for generating a uuid
*
* usage: util_uuid_generate [string] [valid|invalid]
*/
#include "unittest.h"
#include "uuid.h"
#include <unistd.h>
#include <string.h>
int
main(int argc, char *argv[])
... | 1,885 | 21.722892 | 62 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_pool_lookup/obj_pool_lookup.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2018, Intel Corporation */
/*
* obj_pool_lookup.c -- unit test for pmemobj_pool and pmemobj_pool_of
*/
#include "unittest.h"
#define MAX_PATH_LEN 255
#define LAYOUT_NAME "pool_lookup"
#define ALLOC_SIZE 100
static void
define_path(char *str, size_t size, ... | 3,576 | 26.305344 | 70 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_constructor/obj_constructor.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2017, Intel Corporation */
/*
* obj_constructor.c -- tests for constructor
*/
#include <stddef.h>
#include "unittest.h"
/*
* Command line toggle indicating use of a bigger node structure for querying
* pool size expressed in a number of possible allocat... | 4,369 | 22.621622 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/unittest.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
/*
* unittest.h -- the mundane stuff shared by all unit tests
*
* we want unit tests to be very thorough and check absolutely everything
* in order to nail down the test case as precisely as possible and flag
* anything at all u... | 23,907 | 29.769627 | 79 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_fh.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* ut_fh.c -- implementation of OS-independent file handle / file descriptor
* interface
*/
/* for O_TMPFILE */
#define _GNU_SOURCE
#include <fcntl.h>
#include "ut_fh.h"
#include "unittest.h"
struct FHandle {
int fd;
#ifdef... | 7,734 | 22.158683 | 77 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_config.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* ut_pmem2_config.h -- utility helper functions for libpmem2 config tests
*/
#ifndef UT_PMEM2_CONFIG_H
#define UT_PMEM2_CONFIG_H 1
#include "ut_fh.h"
/* a pmem2_config_new() that can't return NULL */
#define PMEM2_CONFIG_NEW(... | 1,152 | 30.162162 | 77 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_alloc.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2017, Intel Corporation */
/*
* ut_alloc.c -- unit test memory allocation routines
*/
#include "unittest.h"
/*
* ut_malloc -- a malloc that cannot return NULL
*/
void *
ut_malloc(const char *file, int line, const char *func, size_t size)
{
void *retval ... | 4,238 | 20.963731 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_utils.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* ut_pmem2_utils.c -- utility helper functions for libpmem2 tests
*/
#include "unittest.h"
#include "ut_pmem2_utils.h"
/*
* ut_pmem2_expect_return -- veryfies error code and prints appropriate
* error message in case of error
*/... | 608 | 23.36 | 73 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_utils.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019, Intel Corporation */
/*
* ut_pmem2_utils.h -- utility helper functions for libpmem2 tests
*/
#ifndef UT_PMEM2_UTILS_H
#define UT_PMEM2_UTILS_H 1
/* veryfies error code and prints appropriate error message in case of error */
#define UT_PMEM2_EXPECT_RETURN... | 552 | 26.65 | 79 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_fh.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* ut_fh.h -- OS-independent file handle / file descriptor interface
*/
#ifndef UT_FH_H
#define UT_FH_H
#include "os.h"
struct FHandle;
enum file_handle_type { FH_FD, FH_HANDLE };
#define FH_ACCMODE (7)
#define FH_READ (1 <... | 1,761 | 24.536232 | 72 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_source.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_source.h -- utility helper functions for libpmem2 source tests
*/
#include <libpmem2.h>
#include "unittest.h"
#include "ut_pmem2_source.h"
#include "ut_pmem2_utils.h"
/*
* ut_pmem2_source_from_fd -- sets fd (cannot fail... | 1,929 | 24.064935 | 74 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_signal.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2017, Intel Corporation */
/*
* ut_signal.c -- unit test signal operations
*/
#include "unittest.h"
#ifdef _WIN32
/*
* On Windows, Access Violation exception does not raise SIGSEGV signal.
* The trick is to catch the exception and... call the signal hand... | 2,306 | 23.806452 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pthread.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2017, Intel Corporation */
/*
* ut_pthread.c -- unit test wrappers for pthread routines
*/
#include "unittest.h"
/*
* ut_thread_create -- a os_thread_create that cannot return an error
*/
int
ut_thread_create(const char *file, int line, const char *func,... | 901 | 23.378378 | 71 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_map.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_map.h -- utility helper functions for libpmem2 map tests
*/
#ifndef UT_PMEM2_MAP_H
#define UT_PMEM2_MAP_H 1
/* a pmem2_map() that can't return NULL */
#define PMEM2_MAP(cfg, src, map) \
ut_pmem2_map(__FILE__, __LINE... | 522 | 25.15 | 68 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_config.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* ut_pmem2_config.h -- utility helper functions for libpmem2 config tests
*/
#include <libpmem2.h>
#include "unittest.h"
#include "ut_pmem2_config.h"
#include "ut_pmem2_utils.h"
/*
* ut_pmem2_config_new -- allocates cfg (cann... | 1,181 | 23.122449 | 74 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_setup_integration.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_setup_integration.h -- libpmem2 setup functions using public API
* (for integration tests)
*/
#include <libpmem2.h>
#include "ut_pmem2_config.h"
#include "ut_pmem2_setup_integration.h"
#include "ut_pmem2_source.h"
#inclu... | 804 | 26.758621 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_source.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_source.h -- utility helper functions for libpmem2 source tests
*/
#ifndef UT_PMEM2_SOURCE_H
#define UT_PMEM2_SOURCE_H 1
#include "ut_fh.h"
/* a pmem2_config_set_fd() that can't return NULL */
#define PMEM2_SOURCE_FROM_F... | 1,667 | 33.040816 | 76 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_setup.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_setup.h -- libpmem2 setup functions using non-public API
* (only for unit tests)
*/
#include "../../libpmem2/config.h"
#include "ut_pmem2_source.h"
#include "ut_pmem2_setup.h"
#include "unittest.h"
/*
* ut_pmem2_prepar... | 805 | 25 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_map.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_map.h -- utility helper functions for libpmem2 map tests
*/
#include <libpmem2.h>
#include "unittest.h"
#include "ut_pmem2_map.h"
#include "ut_pmem2_utils.h"
/*
* ut_pmem2_map -- allocates map (cannot fail)
*/
void
ut_... | 572 | 21.92 | 68 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/unittest/ut_pmem2_setup_integration.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2020, Intel Corporation */
/*
* ut_pmem2_setup_integration.h -- libpmem2 setup functions using public API
* (for integration tests)
*/
#ifndef UT_PMEM2_SETUP_INTEGRATION_H
#define UT_PMEM2_SETUP_INTEGRATION_H 1
#include "ut_fh.h"
/* a prepare_config() that ca... | 728 | 29.375 | 76 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem_movnt_align/pmem_movnt_align.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2020, Intel Corporation */
/*
* pmem_movnt_align.c -- unit test for functions with non-temporal stores
*
* usage: pmem_movnt_align [C|F|B|S]
*
* C - pmem_memcpy_persist()
* B - pmem_memmove_persist() in backward direction
* F - pmem_memmove_persist() in... | 6,229 | 23.92 | 78 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_memblock/obj_memblock.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2018, Intel Corporation */
/*
* obj_memblock.c -- unit test for memblock interface
*/
#include "memblock.h"
#include "memops.h"
#include "obj.h"
#include "unittest.h"
#include "heap.h"
#define NCHUNKS 10
static PMEMobjpool *pop;
FUNC_MOCK(operation_add_ty... | 5,320 | 27.153439 | 77 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_memblock/mocks_windows.h | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016, 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_memblock test.
* ... | 634 | 29.238095 | 73 | h |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmreorder_flushes/pmreorder_flushes.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2019-2020, Intel Corporation */
/*
* pmreorder_flushes.c -- test for store reordering with flushes
* in different barriers
*
* usage: pmreorder_flushes g|c file
*
* g - write data in a specific manner - some flushes
* of the stores are made in different barr... | 3,207 | 20.105263 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/libpmempool_api_win/libpmempool_test_win.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017, Intel Corporation */
/*
* libpmempool_test_win -- test of libpmempool.
*
*/
#include <stddef.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include "unittest.h"
/*
* Exact copy of the struct pmempool_check_args from libpmempool 1.0 prov... | 3,912 | 24.743421 | 80 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/pmem_is_pmem_windows/pmem_is_pmem_windows.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2014-2020, Intel Corporation */
/*
* Copyright (c) 2015-2017, 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:
*
... | 6,946 | 27.239837 | 76 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_fragmentation2/obj_fragmentation2.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2020, Intel Corporation */
/*
* obj_fragmentation.c -- measures average heap external fragmentation
*
* This test is based on the workloads proposed in:
* Log-structured Memory for DRAM-based Storage
* by Stephen M. Rumble, Ankita Kejriwal, and John Ouste... | 7,747 | 22.337349 | 80 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/getopt/getopt.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2019, Intel Corporation */
/*
* getopt.c -- test for windows getopt() implementation
*/
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include "unittest.h"
/*
* long_options -- command line arguments
*/
static const struct option long_option... | 2,159 | 21.736842 | 55 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/util_sds/util_sds.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2017-2020, Intel Corporation */
/*
* util_sds.c -- unit test for shutdown state functions
*/
#include <stdlib.h>
#include "unittest.h"
#include "ut_pmem2.h"
#include "shutdown_state.h"
#include "set.h"
#define PMEM_LEN 4096
static char **uids;
static size_t ui... | 4,175 | 21.572973 | 79 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/obj_recreate/obj_recreate.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2015-2017, Intel Corporation */
/*
* obj_recreate.c -- recreate pool on dirty file and check consistency
*/
#include "unittest.h"
POBJ_LAYOUT_BEGIN(recreate);
POBJ_LAYOUT_ROOT(recreate, struct root);
POBJ_LAYOUT_TOID(recreate, struct foo);
POBJ_LAYOUT_END(recre... | 1,968 | 21.123596 | 73 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/src/test/util_ctl/util_ctl.c | // SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2020, Intel Corporation */
/*
* util_ctl.c -- tests for the control module
*/
#include "unittest.h"
#include "ctl.h"
#include "out.h"
#include "pmemcommon.h"
#include "fault_injection.h"
#define LOG_PREFIX "ut"
#define LOG_LEVEL_VAR "TEST_LOG_LEVEL"
#defin... | 17,492 | 22.639189 | 72 | c |
null | NearPMSW-main/nearpm/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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/checkpointing/pmdk-checkpoint1/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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.