Skip to content

Commit

Permalink
Merge pull request #4733 from ldorau/test-add-bad-block-files-to-LIBP…
Browse files Browse the repository at this point in the history
…MEM2-internal-nondebug

test: add bad block files to LIBPMEM2 internal-(non)debug
  • Loading branch information
marcinslusarz authored Apr 14, 2020
2 parents cfc35f0 + df01a56 commit 35fee3a
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 33 deletions.
3 changes: 2 additions & 1 deletion src/common/pmemcommon.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ SOURCE +=\
$(COMMON)/ctl_sds.c\
$(COMMON)/ctl_fallocate.c\
$(COMMON)/ctl_cow.c\
$(call osdep, $(COMMON)/extent,.c)\
$(COMMON)/file.c\
$(COMMON)/file_posix.c\
$(COMMON)/mmap.c\
Expand All @@ -37,11 +36,13 @@ ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_sync_linux.c\
$(PMEM2)/extent_linux.c\
$(PMEM2)/pmem2_utils_linux.c
else
SOURCE +=\
$(PMEM2)/auto_flush_none.c\
$(PMEM2)/deep_sync_none.c\
$(PMEM2)/extent_none.c\
$(PMEM2)/pmem2_utils_other.c
endif

Expand Down
7 changes: 4 additions & 3 deletions src/libpmem2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ SOURCE =\
memops_generic.c\
map.c\
map_posix.c\
$(call osdep, extent,.c)\
persist.c\
persist_posix.c\
pmem2.c\
Expand All @@ -33,12 +32,14 @@ ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
auto_flush_linux.c\
deep_sync_linux.c\
extent_linux.c\
pmem2_utils_linux.c
else
SOURCE +=\
pmem2_utils_other.c\
auto_flush_none.c\
deep_sync_none.c
deep_sync_none.c\
extent_none.c\
pmem2_utils_other.c
endif

ifeq ($(OS_DIMM),ndctl)
Expand Down
8 changes: 1 addition & 7 deletions src/libpmem2/extent_freebsd.c → src/libpmem2/extent_none.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
/* Copyright 2018-2020, Intel Corporation */

/*
* extent_freebsd.c - implementation of the FreeBSD fs extent query API
* XXX THIS IS CURRENTLY A DUMMY MODULE.
* extent_none.c - fake implementation of the FS extent query API
*/

#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>

#include "file.h"
#include "out.h"
#include "extent.h"

Expand Down
56 changes: 35 additions & 21 deletions src/test/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ endif
ifeq ($(LIBPMEM2), internal-debug)
LIBPMEMCORE=internal-debug
OBJS +=\
$(TOP)/src/debug/libpmem2/libpmem2.o\
$(TOP)/src/debug/libpmem2/badblocks.o\
$(TOP)/src/debug/libpmem2/badblocks_$(OS_DIMM).o\
$(TOP)/src/debug/libpmem2/config.o\
$(TOP)/src/debug/libpmem2/source.o\
$(TOP)/src/debug/libpmem2/source_posix.o\
$(TOP)/src/debug/libpmem2/errormsg.o\
$(TOP)/src/debug/libpmem2/libpmem2.o\
$(TOP)/src/debug/libpmem2/map.o\
$(TOP)/src/debug/libpmem2/map_posix.o\
$(TOP)/src/debug/libpmem2/memops_generic.o\
Expand All @@ -172,18 +172,22 @@ OBJS +=\
$(TOP)/src/debug/libpmem2/pmem2.o\
$(TOP)/src/debug/libpmem2/pmem2_utils.o\
$(TOP)/src/debug/libpmem2/ravl.o\
$(TOP)/src/debug/libpmem2/source.o\
$(TOP)/src/debug/libpmem2/source_posix.o\
$(TOP)/src/debug/libpmem2/usc_$(OS_DIMM).o

ifeq ($(OS_KERNEL_NAME),Linux)
OBJS +=\
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/debug/libpmem2/auto_flush_linux.o\
$(TOP)/src/debug/libpmem2/deep_sync_linux.o
$(TOP)/src/debug/libpmem2/deep_sync_linux.o\
$(TOP)/src/debug/libpmem2/extent_linux.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o
else
OBJS +=\
$(TOP)/src/debug/libpmem2/pmem2_utils_other.o\
$(TOP)/src/debug/libpmem2/auto_flush_none.o\
$(TOP)/src/debug/libpmem2/deep_sync_none.o
$(TOP)/src/debug/libpmem2/deep_sync_none.o\
$(TOP)/src/debug/libpmem2/extent_none.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_other.o
endif

ifeq ($(OS_DIMM),ndctl)
Expand All @@ -203,6 +207,8 @@ ifeq ($(LIBPMEM2), internal-nondebug)
LIBPMEMCORE=internal-nondebug
OBJS +=\
$(TOP)/src/nondebug/libpmem2/libpmem2.o\
$(TOP)/src/nondebug/libpmem2/badblocks.o\
$(TOP)/src/nondebug/libpmem2/badblocks_$(OS_DIMM).o\
$(TOP)/src/nondebug/libpmem2/config.o\
$(TOP)/src/nondebug/libpmem2/source.o\
$(TOP)/src/nondebug/libpmem2/source_posix.o\
Expand All @@ -219,14 +225,16 @@ OBJS +=\

ifeq ($(OS_KERNEL_NAME),Linux)
OBJS +=\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o\
$(TOP)/src/nondebug/libpmem2/auto_flush_linux.o\
$(TOP)/src/nondebug/libpmem2/deep_sync_linuc.o
$(TOP)/src/nondebug/libpmem2/deep_sync_linuc.o\
$(TOP)/src/nondebug/libpmem2/extent_linux.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o
else
OBJS +=\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_other.o\
$(TOP)/src/nondebug/libpmem2/auto_flush_none.o\
$(TOP)/src/nondebug/libpmem2/deep_sync_none.o
$(TOP)/src/nondebug/libpmem2/deep_sync_none.o\
$(TOP)/src/nondebug/libpmem2/extent_none.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_other.o
endif

ifeq ($(OS_DIMM),ndctl)
Expand Down Expand Up @@ -265,7 +273,6 @@ OBJS +=\
$(TOP)/src/nondebug/common/ctl_sds.o\
$(TOP)/src/nondebug/common/ctl_fallocate.o\
$(TOP)/src/nondebug/common/ctl_cow.o\
$(call osdep, $(TOP)/src/nondebug/common/extent,.o)\
$(TOP)/src/nondebug/common/file.o\
$(TOP)/src/nondebug/common/file_posix.o\
$(TOP)/src/nondebug/common/mmap.o\
Expand All @@ -287,13 +294,17 @@ OBJS +=\
$(TOP)/src/nondebug/libpmem2/source_posix.o

ifeq ($(OS_KERNEL_NAME),Linux)
OBJS += $(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o\
OBJS +=\
$(TOP)/src/nondebug/libpmem2/auto_flush_linux.o\
$(TOP)/src/nondebug/libpmem2/deep_sync_linux.o
$(TOP)/src/nondebug/libpmem2/deep_sync_linux.o\
$(TOP)/src/nondebug/libpmem2/extent_linux.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_linux.o
else
OBJS += $(TOP)/src/nondebug/libpmem2/pmem2_utils_other.o\
OBJS +=\
$(TOP)/src/nondebug/libpmem2/auto_flush_none.o\
$(TOP)/src/nondebug/libpmem2/deep_sync_none.o
$(TOP)/src/nondebug/libpmem2/deep_sync_none.o\
$(TOP)/src/nondebug/libpmem2/extent_none.o\
$(TOP)/src/nondebug/libpmem2/pmem2_utils_other.o
endif

ifeq ($(OS_DIMM),ndctl)
Expand All @@ -313,7 +324,6 @@ OBJS +=\
$(TOP)/src/debug/common/ctl_sds.o\
$(TOP)/src/debug/common/ctl_fallocate.o\
$(TOP)/src/debug/common/ctl_cow.o\
$(call osdep, $(TOP)/src/debug/common/extent,.o)\
$(TOP)/src/debug/common/file.o\
$(TOP)/src/debug/common/file_posix.o\
$(TOP)/src/debug/common/mmap.o\
Expand All @@ -333,13 +343,17 @@ OBJS +=\
$(TOP)/src/debug/libpmem2/usc_$(OS_DIMM).o

ifeq ($(OS_KERNEL_NAME),Linux)
OBJS += $(TOP)/src/debug/libpmem2/pmem2_utils_linux.o\
OBJS +=\
$(TOP)/src/debug/libpmem2/auto_flush_linux.o\
$(TOP)/src/debug/libpmem2/deep_sync_linux.o
$(TOP)/src/debug/libpmem2/deep_sync_linux.o\
$(TOP)/src/debug/libpmem2/extent_linux.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_linux.o
else
OBJS += $(TOP)/src/debug/libpmem2/pmem2_utils_other.o\
OBJS +=\
$(TOP)/src/debug/libpmem2/auto_flush_none.o\
$(TOP)/src/debug/libpmem2/deep_sync_none.o
$(TOP)/src/debug/libpmem2/deep_sync_none.o\
$(TOP)/src/debug/libpmem2/extent_none.o\
$(TOP)/src/debug/libpmem2/pmem2_utils_other.o
endif

ifeq ($(OS_DIMM),ndctl)
Expand Down
7 changes: 6 additions & 1 deletion src/test/tools/extents/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ vpath %.c $(TOP)/src/libpmem2

TARGET = extents
OBJS = extents.o\
$(call osdep, extent,.o)\
pmem2_utils_linux.o\
pmem2_utils.o

ifeq ($(OS_KERNEL_NAME),Linux)
OBJS += extent_linux.o
else
OBJS += extent_none.o
endif

LIBPMEMCORE=y

include $(TOP)/src/tools/Makefile.inc

0 comments on commit 35fee3a

Please sign in to comment.