put the test code where it's more useful

This commit is contained in:
flatcap 2005-09-13 14:30:51 +00:00
parent 0ae7e885d1
commit d75567112c
20 changed files with 15282 additions and 1 deletions

View File

@ -1,5 +1,5 @@
SUBDIRS = doc include libntfs ntfsprogs
SUBDIRS = doc include libntfs ntfsprogs test
EXTRA_DIST = AUTHORS CREDITS COPYING TODO.include TODO.libntfs ChangeLog \
INSTALL NEWS README autogen.sh ntfsprogs.spec.in \
@ -26,3 +26,13 @@ extra: extras
extras: libs
(cd ntfsprogs && $(MAKE) extras) || exit 1;
if ENABLE_TEST
test: libs
(cd test && $(MAKE) all test) || exit 1;
else
test:
@echo The libntfs test code has been configured out of this release.
@echo "./configure --enable-test" and rebuild.
endif

View File

@ -100,6 +100,15 @@ AC_ARG_ENABLE(warnings,
enable_warnings=no
)
AC_ARG_ENABLE(test,
AS_HELP_STRING(--enable-test,compile in test code for libntfs), ,
enable_test=no
)
AM_CONDITIONAL(ENABLE_TEST, test "$enable_test" = yes)
if test "$enable_test" = "yes"; then
CFLAGS="$CFLAGS -DNTFS_TEST"
fi
# Use GNU extensions if available.
AC_GNU_SOURCE
@ -305,5 +314,6 @@ AC_CONFIG_FILES([
ntfsprogs/ntfsresize.8
ntfsprogs/ntfsundelete.8
ntfsprogs.spec
test/Makefile
])
AC_OUTPUT

View File

@ -79,5 +79,9 @@ extern int ntfs_rl_truncate(runlist **rl, const VCN start_vcn);
extern int ntfs_rl_sparse(runlist *rl);
extern s64 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl);
#ifdef NTFS_TEST
int test_rl_main (int argc, char *argv[]);
#endif
#endif /* defined _NTFS_RUNLIST_H */

View File

@ -1687,3 +1687,375 @@ s64 ntfs_rl_get_compressed_size(ntfs_volume *vol, runlist *rl)
}
return ret << vol->cluster_size_bits;
}
#ifdef NTFS_TEST
/**
* test_rl_helper
*/
#define MKRL(R,V,L,S) \
(R)->vcn = V; \
(R)->lcn = L; \
(R)->length = S;
/*
}
*/
/**
* test_rl_dump_runlist
*/
static void test_rl_dump_runlist (const runlist_element *rl)
{
int abbr = 0; /* abbreviate long lists */
int len = 0;
int i;
const char *lcn_str[5] = { "HOLE", "NOTMAP", "ENOENT", "XXXX" };
if (!rl) {
printf(" Run list not present.\n");
return;
}
if (abbr)
for (len = 0; rl[len].length; len++) ;
printf(" VCN LCN len\n");
for (i = 0; ; i++, rl++) {
LCN lcn = rl->lcn;
if ((abbr) && (len > 20)) {
if (i == 4)
printf (" ...\n");
if ((i > 3) && (i < (len - 3)))
continue;
}
if (lcn < (LCN)0) {
int ind = -lcn - 1;
if (ind > -LCN_ENOENT - 1)
ind = 3;
//printf("%8llx %8s %8llx\n",
printf("%8lld %8s %8lld\n",
rl->vcn, lcn_str[ind], rl->length);
} else
//printf("%8llx %8llx %8llx\n",
printf("%8lld %8lld %8lld\n",
rl->vcn, rl->lcn, rl->length);
if (!rl->length)
break;
}
if ((abbr) && (len > 20))
printf (" (%d entries)\n", len+1);
printf ("\n");
}
/**
* test_rl_runlists_merge
*/
static runlist_element * test_rl_runlists_merge (runlist_element *drl, runlist_element *srl)
{
runlist_element *res = NULL;
printf ("dst:\n");
test_rl_dump_runlist (drl);
printf ("src:\n");
test_rl_dump_runlist (srl);
res = ntfs_runlists_merge (drl, srl);
printf ("res:\n");
test_rl_dump_runlist (res);
return res;
}
/**
* test_rl_read_buffer
*/
static int test_rl_read_buffer (const char *file, u8 *buf, int bufsize)
{
FILE *fptr;
fptr = fopen (file, "r");
if (!fptr) {
printf ("open %s\n", file);
return 0;
}
memset (buf, 0, bufsize);
if (fread (buf, bufsize, 1, fptr) == 99) {
printf ("read %s\n", file);
return 0;
}
fclose (fptr);
return 1;
}
/**
* test_rl_pure_src
*/
static runlist_element * test_rl_pure_src (BOOL contig, BOOL multi, int vcn, int len)
{
runlist_element *result;
int fudge;
if (contig)
fudge = 0;
else
fudge = 999;
result = malloc (4096);
memset (result, -7, 4096);
if (multi) {
MKRL (result+0, vcn + (0*len/4), fudge + vcn + 1000 + (0*len/4), len / 4)
MKRL (result+1, vcn + (1*len/4), fudge + vcn + 1000 + (1*len/4), len / 4)
MKRL (result+2, vcn + (2*len/4), fudge + vcn + 1000 + (2*len/4), len / 4)
MKRL (result+3, vcn + (3*len/4), fudge + vcn + 1000 + (3*len/4), len / 4)
MKRL (result+4, vcn + (4*len/4), LCN_RL_NOT_MAPPED, 0)
} else {
MKRL (result+0, vcn, fudge + vcn + 1000, len)
MKRL (result+1, vcn + len, LCN_RL_NOT_MAPPED, 0)
}
return result;
}
/**
* test_rl_pure_test
*/
static void test_rl_pure_test (int test, BOOL contig, BOOL multi, int vcn, int len, runlist_element *file, int size)
{
runlist_element *src;
runlist_element *dst;
runlist_element *res;
src = test_rl_pure_src (contig, multi, vcn, len);
dst = malloc (4096);
memset (dst, -7, 4096);
memcpy (dst, file, size);
printf ("Test %2d ----------\n", test);
res = test_rl_runlists_merge (dst, src);
free (res);
test = 0;
}
/**
* test_rl_pure
*/
static void test_rl_pure (char *contig, char *multi)
{
/* VCN, LCN, len */
static runlist_element file1[] = {
{ 0, -1, 100 }, /* HOLE */
{ 100, 1100, 100 }, /* DATA */
{ 200, -1, 100 }, /* HOLE */
{ 300, 1300, 100 }, /* DATA */
{ 400, -1, 100 }, /* HOLE */
{ 500, -3, 0 } /* NOENT */
};
static runlist_element file2[] = {
{ 0, 1000, 100 }, /* DATA */
{ 100, -1, 100 }, /* HOLE */
{ 200, -3, 0 } /* NOENT */
};
static runlist_element file3[] = {
{ 0, 1000, 100 }, /* DATA */
{ 100, -3, 0 } /* NOENT */
};
static runlist_element file4[] = {
{ 0, -3, 0 } /* NOENT */
};
#if 0
static runlist_element file5[] = {
{ 0, -1, 100 }, /* HOLE */
{ 100, 1100, 100 }, /* DATA */
{ 200, -1, 100 }, /* HOLE */
{ 300, 1300, 100 }, /* DATA */
{ 400, -1, 100 }, /* HOLE */
{ 500, -2, 0 } /* NOT_MAPPED */
};
static runlist_element file6[] = {
{ 0, 1000, 100 }, /* DATA */
{ 100, -1, 100 }, /* HOLE */
{ 200, -2, 0 } /* NOT_MAPPED */
};
static runlist_element file7[] = {
{ 0, 1000, 100 }, /* DATA */
{ 100, -2, 0 } /* NOT_MAPPED */
};
static runlist_element file8[] = {
{ 0, -2, 0 } /* NOT_MAPPED */
};
#endif
BOOL c, m;
if (strcmp (contig, "contig") == 0)
c = TRUE;
else if (strcmp (contig, "noncontig") == 0)
c = FALSE;
else {
printf ("rl pure [contig|noncontig] [single|multi]\n");
return;
}
if (strcmp (multi, "multi") == 0)
m = TRUE;
else if (strcmp (multi, "single") == 0)
m = FALSE;
else {
printf ("rl pure [contig|noncontig] [single|multi]\n");
return;
}
test_rl_pure_test (1, c, m, 0, 40, file1, sizeof (file1));
test_rl_pure_test (2, c, m, 40, 40, file1, sizeof (file1));
test_rl_pure_test (3, c, m, 60, 40, file1, sizeof (file1));
test_rl_pure_test (4, c, m, 0, 100, file1, sizeof (file1));
test_rl_pure_test (5, c, m, 200, 40, file1, sizeof (file1));
test_rl_pure_test (6, c, m, 240, 40, file1, sizeof (file1));
test_rl_pure_test (7, c, m, 260, 40, file1, sizeof (file1));
test_rl_pure_test (8, c, m, 200, 100, file1, sizeof (file1));
test_rl_pure_test (9, c, m, 400, 40, file1, sizeof (file1));
test_rl_pure_test (10, c, m, 440, 40, file1, sizeof (file1));
test_rl_pure_test (11, c, m, 460, 40, file1, sizeof (file1));
test_rl_pure_test (12, c, m, 400, 100, file1, sizeof (file1));
test_rl_pure_test (13, c, m, 160, 100, file2, sizeof (file2));
test_rl_pure_test (14, c, m, 100, 140, file2, sizeof (file2));
test_rl_pure_test (15, c, m, 200, 40, file2, sizeof (file2));
test_rl_pure_test (16, c, m, 240, 40, file2, sizeof (file2));
test_rl_pure_test (17, c, m, 100, 40, file3, sizeof (file3));
test_rl_pure_test (18, c, m, 140, 40, file3, sizeof (file3));
test_rl_pure_test (19, c, m, 0, 40, file4, sizeof (file4));
test_rl_pure_test (20, c, m, 40, 40, file4, sizeof (file4));
#if 0
test_rl_pure_test (21, c, m, 0, 40, file5, sizeof (file5));
test_rl_pure_test (22, c, m, 40, 40, file5, sizeof (file5));
test_rl_pure_test (23, c, m, 60, 40, file5, sizeof (file5));
test_rl_pure_test (24, c, m, 0, 100, file5, sizeof (file5));
test_rl_pure_test (25, c, m, 200, 40, file5, sizeof (file5));
test_rl_pure_test (26, c, m, 240, 40, file5, sizeof (file5));
test_rl_pure_test (27, c, m, 260, 40, file5, sizeof (file5));
test_rl_pure_test (28, c, m, 200, 100, file5, sizeof (file5));
test_rl_pure_test (29, c, m, 400, 40, file5, sizeof (file5));
test_rl_pure_test (30, c, m, 440, 40, file5, sizeof (file5));
test_rl_pure_test (31, c, m, 460, 40, file5, sizeof (file5));
test_rl_pure_test (32, c, m, 400, 100, file5, sizeof (file5));
test_rl_pure_test (33, c, m, 160, 100, file6, sizeof (file6));
test_rl_pure_test (34, c, m, 100, 140, file6, sizeof (file6));
test_rl_pure_test (35, c, m, 200, 40, file6, sizeof (file6));
test_rl_pure_test (36, c, m, 240, 40, file6, sizeof (file6));
test_rl_pure_test (37, c, m, 100, 40, file7, sizeof (file7));
test_rl_pure_test (38, c, m, 140, 40, file7, sizeof (file7));
test_rl_pure_test (39, c, m, 0, 40, file8, sizeof (file8));
test_rl_pure_test (40, c, m, 40, 40, file8, sizeof (file8));
#endif
}
/**
* test_rl_zero
*/
static void test_rl_zero (void)
{
runlist_element *jim = NULL;
runlist_element *bob = NULL;
bob = calloc (3, sizeof (runlist_element));
if (!bob)
return;
MKRL(bob+0, 10, 99, 5)
MKRL(bob+1, 15, LCN_RL_NOT_MAPPED, 0)
jim = test_rl_runlists_merge (jim, bob);
if (!jim)
return;
free (jim);
}
/**
* test_rl_frag_combine
*/
static void test_rl_frag_combine (ntfs_volume *vol, ATTR_RECORD *attr1, ATTR_RECORD *attr2, ATTR_RECORD *attr3)
{
runlist_element *run1;
runlist_element *run2;
runlist_element *run3;
run1 = ntfs_mapping_pairs_decompress (vol, attr1, NULL);
if (!run1)
return;
run2 = ntfs_mapping_pairs_decompress (vol, attr2, NULL);
if (!run2)
return;
run1 = test_rl_runlists_merge (run1, run2);
run3 = ntfs_mapping_pairs_decompress (vol, attr3, NULL);
if (!run3)
return;
run1 = test_rl_runlists_merge (run1, run3);
free (run1);
}
/**
* test_rl_frag
*/
static void test_rl_frag (char *test)
{
ntfs_volume vol;
ATTR_RECORD *attr1 = malloc (1024);
ATTR_RECORD *attr2 = malloc (1024);
ATTR_RECORD *attr3 = malloc (1024);
if (!attr1 || !attr2 || !attr3)
goto out;
vol.sb = NULL;
vol.sector_size_bits = 9;
vol.cluster_size = 2048;
vol.cluster_size_bits = 11;
vol.major_ver = 3;
if (!test_rl_read_buffer ("runlist-data/attr1.bin", (u8*) attr1, 1024))
goto out;
if (!test_rl_read_buffer ("runlist-data/attr2.bin", (u8*) attr2, 1024))
goto out;
if (!test_rl_read_buffer ("runlist-data/attr3.bin", (u8*) attr3, 1024))
goto out;
if (strcmp (test, "123") == 0) test_rl_frag_combine (&vol, attr1, attr2, attr3);
else if (strcmp (test, "132") == 0) test_rl_frag_combine (&vol, attr1, attr3, attr2);
else if (strcmp (test, "213") == 0) test_rl_frag_combine (&vol, attr2, attr1, attr3);
else if (strcmp (test, "231") == 0) test_rl_frag_combine (&vol, attr2, attr3, attr1);
else if (strcmp (test, "312") == 0) test_rl_frag_combine (&vol, attr3, attr1, attr2);
else if (strcmp (test, "321") == 0) test_rl_frag_combine (&vol, attr3, attr2, attr1);
else printf ("Frag: No such test '%s'\n", test);
out:
free (attr1);
free (attr2);
free (attr3);
}
/**
* test_rl_main
*/
int test_rl_main (int argc, char *argv[])
{
if ((argc == 2) && (strcmp (argv[1], "zero") == 0)) test_rl_zero();
else if ((argc == 3) && (strcmp (argv[1], "frag") == 0)) test_rl_frag (argv[2]);
else if ((argc == 4) && (strcmp (argv[1], "pure") == 0)) test_rl_pure (argv[2], argv[3]);
else printf ("rl [zero|frag|pure] {args}\n");
return 0;
}
#endif

67
test/Makefile.am Normal file
View File

@ -0,0 +1,67 @@
if REALLYSTATIC
AM_LIBS = $(top_builddir)/libntfs/.libs/libntfs.a
AM_LFLAGS = -static
STATIC_LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
else
AM_LIBS = $(top_builddir)/libntfs/libntfs.la
AM_LFLAGS = $(all_libraries)
LIBTOOL_LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
endif
# Workaround to make REALLYSTATIC work with automake 1.5.
LINK=$(STATIC_LINK) $(LIBTOOL_LINK)
#TEST_VALGRIND = valgrind
TEST_RUNLIST = runlist
bin_PROGRAMS = $(TEST_RUNLIST)
CLEANFILES = attr[123].bin frag[123][123][123] pure-[cn][ms] zero
MAINTAINERCLEANFILES = Makefile.in
linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs
# Set the include path.
AM_CPPFLAGS = -I$(top_srcdir)/include/ntfs $(all_includes)
runlist_SOURCES = runlist.c
runlist_LDADD = $(AM_LIBS)
runlist_LDFLAGS = $(AM_LFLAGS)
# Extra targets
libs:
(cd ../libntfs && $(MAKE) libs) || exit 1;
test: $(TEST_RUNLIST) testz testp testf
testz: $(TEST_RUNLIST)
@$(TEST_VALGRIND) $(TEST_RUNLIST) zero > zero
@diff -qs {runlist-data/,}zero
@echo
@echo Success
@echo
testp: $(TEST_RUNLIST)
@for i in contig noncontig; do \
for j in single multi; do \
L1=`echo $$i | cut -b1`; \
L2=`echo $$j | cut -b1`; \
FILE=pure-$$L1$$L2; \
$(TEST_VALGRIND) $(TEST_RUNLIST) pure $$i $$j > $$FILE; \
diff -qs {runlist-data/,}$$FILE; \
done; \
done
@echo
@echo Success
@echo
testf: $(TEST_RUNLIST)
@for i in 123 132 213 231 312 321; do \
$(TEST_VALGRIND) $(TEST_RUNLIST) frag $$i > frag$$i; \
diff -qs {runlist-data/,}frag$$i; \
done
@echo
@echo Success
@echo

BIN
test/runlist-data/attr1.bin Normal file

Binary file not shown.

BIN
test/runlist-data/attr2.bin Normal file

Binary file not shown.

BIN
test/runlist-data/attr3.bin Normal file

Binary file not shown.

2213
test/runlist-data/frag123 Normal file

File diff suppressed because it is too large Load Diff

2061
test/runlist-data/frag132 Normal file

File diff suppressed because it is too large Load Diff

2213
test/runlist-data/frag213 Normal file

File diff suppressed because it is too large Load Diff

2133
test/runlist-data/frag231 Normal file

File diff suppressed because it is too large Load Diff

2061
test/runlist-data/frag312 Normal file

File diff suppressed because it is too large Load Diff

2133
test/runlist-data/frag321 Normal file

File diff suppressed because it is too large Load Diff

551
test/runlist-data/pure-cm Normal file
View File

@ -0,0 +1,551 @@
Test 1 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1000 10
10 1010 10
20 1020 10
30 1030 10
40 NOTMAP 0
res:
VCN LCN len
0 1000 10
10 1010 10
20 1020 10
30 1030 10
40 HOLE 60
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 2 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
40 1040 10
50 1050 10
60 1060 10
70 1070 10
80 NOTMAP 0
res:
VCN LCN len
0 HOLE 40
40 1040 10
50 1050 10
60 1060 10
70 1070 10
80 HOLE 20
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 3 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
60 1060 10
70 1070 10
80 1080 10
90 1090 10
100 NOTMAP 0
res:
VCN LCN len
0 HOLE 60
60 1060 10
70 1070 10
80 1080 10
90 1090 110
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 4 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1000 25
25 1025 25
50 1050 25
75 1075 25
100 NOTMAP 0
res:
VCN LCN len
0 1000 25
25 1025 25
50 1050 25
75 1075 125
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 5 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 1200 10
210 1210 10
220 1220 10
230 1230 10
240 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 110
210 1210 10
220 1220 10
230 1230 10
240 HOLE 60
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 6 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
240 1240 10
250 1250 10
260 1260 10
270 1270 10
280 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 40
240 1240 10
250 1250 10
260 1260 10
270 1270 10
280 HOLE 20
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 7 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
260 1260 10
270 1270 10
280 1280 10
290 1290 10
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 60
260 1260 10
270 1270 10
280 1280 10
290 1290 110
400 HOLE 100
500 ENOENT 0
Test 8 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 1200 25
225 1225 25
250 1250 25
275 1275 25
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 125
225 1225 25
250 1250 25
275 1275 125
400 HOLE 100
500 ENOENT 0
Test 9 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 1400 10
410 1410 10
420 1420 10
430 1430 10
440 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 110
410 1410 10
420 1420 10
430 1430 10
440 HOLE 60
500 ENOENT 0
Test 10 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
440 1440 10
450 1450 10
460 1460 10
470 1470 10
480 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 40
440 1440 10
450 1450 10
460 1460 10
470 1470 10
480 HOLE 20
500 ENOENT 0
Test 11 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
460 1460 10
470 1470 10
480 1480 10
490 1490 10
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 60
460 1460 10
470 1470 10
480 1480 10
490 1490 10
500 ENOENT 0
Test 12 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 1400 25
425 1425 25
450 1450 25
475 1475 25
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 125
425 1425 25
450 1450 25
475 1475 25
500 ENOENT 0
Test 13 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
160 1160 25
185 1185 25
210 1210 25
235 1235 25
260 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 60
160 1160 25
185 1185 25
210 1210 25
235 1235 25
260 ENOENT 0
Test 14 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
100 1100 35
135 1135 35
170 1170 35
205 1205 35
240 NOTMAP 0
res:
VCN LCN len
0 1000 135
135 1135 35
170 1170 35
205 1205 35
240 ENOENT 0
Test 15 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
200 1200 10
210 1210 10
220 1220 10
230 1230 10
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 100
200 1200 10
210 1210 10
220 1220 10
230 1230 10
240 ENOENT 0
Test 16 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
240 1240 10
250 1250 10
260 1260 10
270 1270 10
280 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 140
240 1240 10
250 1250 10
260 1260 10
270 1270 10
280 ENOENT 0
Test 17 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
100 1100 10
110 1110 10
120 1120 10
130 1130 10
140 NOTMAP 0
res:
VCN LCN len
0 1000 110
110 1110 10
120 1120 10
130 1130 10
140 ENOENT 0
Test 18 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
140 1140 10
150 1150 10
160 1160 10
170 1170 10
180 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 NOTMAP 40
140 1140 10
150 1150 10
160 1160 10
170 1170 10
180 ENOENT 0
Test 19 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
0 1000 10
10 1010 10
20 1020 10
30 1030 10
40 NOTMAP 0
res:
VCN LCN len
0 1000 10
10 1010 10
20 1020 10
30 1030 10
40 ENOENT 0
Test 20 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
40 1040 10
50 1050 10
60 1060 10
70 1070 10
80 NOTMAP 0
res:
VCN LCN len
0 NOTMAP 40
40 1040 10
50 1050 10
60 1060 10
70 1070 10
80 ENOENT 0

431
test/runlist-data/pure-cs Normal file
View File

@ -0,0 +1,431 @@
Test 1 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1000 40
40 NOTMAP 0
res:
VCN LCN len
0 1000 40
40 HOLE 60
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 2 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
40 1040 40
80 NOTMAP 0
res:
VCN LCN len
0 HOLE 40
40 1040 40
80 HOLE 20
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 3 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
60 1060 40
100 NOTMAP 0
res:
VCN LCN len
0 HOLE 60
60 1060 140
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 4 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1000 100
100 NOTMAP 0
res:
VCN LCN len
0 1000 200
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 5 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 1200 40
240 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 140
240 HOLE 60
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 6 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
240 1240 40
280 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 40
240 1240 40
280 HOLE 20
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 7 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
260 1260 40
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 60
260 1260 140
400 HOLE 100
500 ENOENT 0
Test 8 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 1200 100
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 300
400 HOLE 100
500 ENOENT 0
Test 9 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 1400 40
440 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 140
440 HOLE 60
500 ENOENT 0
Test 10 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
440 1440 40
480 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 40
440 1440 40
480 HOLE 20
500 ENOENT 0
Test 11 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
460 1460 40
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 60
460 1460 40
500 ENOENT 0
Test 12 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 1400 100
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 200
500 ENOENT 0
Test 13 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
160 1160 100
260 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 60
160 1160 100
260 ENOENT 0
Test 14 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
100 1100 140
240 NOTMAP 0
res:
VCN LCN len
0 1000 240
240 ENOENT 0
Test 15 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
200 1200 40
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 100
200 1200 40
240 ENOENT 0
Test 16 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
240 1240 40
280 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 140
240 1240 40
280 ENOENT 0
Test 17 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
100 1100 40
140 NOTMAP 0
res:
VCN LCN len
0 1000 140
140 ENOENT 0
Test 18 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
140 1140 40
180 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 NOTMAP 40
140 1140 40
180 ENOENT 0
Test 19 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
0 1000 40
40 NOTMAP 0
res:
VCN LCN len
0 1000 40
40 ENOENT 0
Test 20 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
40 1040 40
80 NOTMAP 0
res:
VCN LCN len
0 NOTMAP 40
40 1040 40
80 ENOENT 0

561
test/runlist-data/pure-nm Normal file
View File

@ -0,0 +1,561 @@
Test 1 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1999 10
10 2009 10
20 2019 10
30 2029 10
40 NOTMAP 0
res:
VCN LCN len
0 1999 10
10 2009 10
20 2019 10
30 2029 10
40 HOLE 60
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 2 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
40 2039 10
50 2049 10
60 2059 10
70 2069 10
80 NOTMAP 0
res:
VCN LCN len
0 HOLE 40
40 2039 10
50 2049 10
60 2059 10
70 2069 10
80 HOLE 20
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 3 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
60 2059 10
70 2069 10
80 2079 10
90 2089 10
100 NOTMAP 0
res:
VCN LCN len
0 HOLE 60
60 2059 10
70 2069 10
80 2079 10
90 2089 10
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 4 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1999 25
25 2024 25
50 2049 25
75 2074 25
100 NOTMAP 0
res:
VCN LCN len
0 1999 25
25 2024 25
50 2049 25
75 2074 25
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 5 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 2199 10
210 2209 10
220 2219 10
230 2229 10
240 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 2199 10
210 2209 10
220 2219 10
230 2229 10
240 HOLE 60
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 6 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
240 2239 10
250 2249 10
260 2259 10
270 2269 10
280 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 40
240 2239 10
250 2249 10
260 2259 10
270 2269 10
280 HOLE 20
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 7 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
260 2259 10
270 2269 10
280 2279 10
290 2289 10
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 60
260 2259 10
270 2269 10
280 2279 10
290 2289 10
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 8 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 2199 25
225 2224 25
250 2249 25
275 2274 25
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 2199 25
225 2224 25
250 2249 25
275 2274 25
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 9 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 2399 10
410 2409 10
420 2419 10
430 2429 10
440 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 2399 10
410 2409 10
420 2419 10
430 2429 10
440 HOLE 60
500 ENOENT 0
Test 10 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
440 2439 10
450 2449 10
460 2459 10
470 2469 10
480 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 40
440 2439 10
450 2449 10
460 2459 10
470 2469 10
480 HOLE 20
500 ENOENT 0
Test 11 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
460 2459 10
470 2469 10
480 2479 10
490 2489 10
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 60
460 2459 10
470 2469 10
480 2479 10
490 2489 10
500 ENOENT 0
Test 12 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 2399 25
425 2424 25
450 2449 25
475 2474 25
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 2399 25
425 2424 25
450 2449 25
475 2474 25
500 ENOENT 0
Test 13 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
160 2159 25
185 2184 25
210 2209 25
235 2234 25
260 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 60
160 2159 25
185 2184 25
210 2209 25
235 2234 25
260 ENOENT 0
Test 14 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
100 2099 35
135 2134 35
170 2169 35
205 2204 35
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 2099 35
135 2134 35
170 2169 35
205 2204 35
240 ENOENT 0
Test 15 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
200 2199 10
210 2209 10
220 2219 10
230 2229 10
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 100
200 2199 10
210 2209 10
220 2219 10
230 2229 10
240 ENOENT 0
Test 16 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
240 2239 10
250 2249 10
260 2259 10
270 2269 10
280 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 140
240 2239 10
250 2249 10
260 2259 10
270 2269 10
280 ENOENT 0
Test 17 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
100 2099 10
110 2109 10
120 2119 10
130 2129 10
140 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 2099 10
110 2109 10
120 2119 10
130 2129 10
140 ENOENT 0
Test 18 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
140 2139 10
150 2149 10
160 2159 10
170 2169 10
180 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 NOTMAP 40
140 2139 10
150 2149 10
160 2159 10
170 2169 10
180 ENOENT 0
Test 19 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
0 1999 10
10 2009 10
20 2019 10
30 2029 10
40 NOTMAP 0
res:
VCN LCN len
0 1999 10
10 2009 10
20 2019 10
30 2029 10
40 ENOENT 0
Test 20 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
40 2039 10
50 2049 10
60 2059 10
70 2069 10
80 NOTMAP 0
res:
VCN LCN len
0 NOTMAP 40
40 2039 10
50 2049 10
60 2059 10
70 2069 10
80 ENOENT 0

441
test/runlist-data/pure-ns Normal file
View File

@ -0,0 +1,441 @@
Test 1 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1999 40
40 NOTMAP 0
res:
VCN LCN len
0 1999 40
40 HOLE 60
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 2 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
40 2039 40
80 NOTMAP 0
res:
VCN LCN len
0 HOLE 40
40 2039 40
80 HOLE 20
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 3 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
60 2059 40
100 NOTMAP 0
res:
VCN LCN len
0 HOLE 60
60 2059 40
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 4 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
0 1999 100
100 NOTMAP 0
res:
VCN LCN len
0 1999 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 5 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 2199 40
240 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 2199 40
240 HOLE 60
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 6 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
240 2239 40
280 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 40
240 2239 40
280 HOLE 20
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 7 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
260 2259 40
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 60
260 2259 40
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 8 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
200 2199 100
300 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 2199 100
300 1300 100
400 HOLE 100
500 ENOENT 0
Test 9 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 2399 40
440 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 2399 40
440 HOLE 60
500 ENOENT 0
Test 10 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
440 2439 40
480 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 40
440 2439 40
480 HOLE 20
500 ENOENT 0
Test 11 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
460 2459 40
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 60
460 2459 40
500 ENOENT 0
Test 12 ----------
dst:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 HOLE 100
500 ENOENT 0
src:
VCN LCN len
400 2399 100
500 NOTMAP 0
res:
VCN LCN len
0 HOLE 100
100 1100 100
200 HOLE 100
300 1300 100
400 2399 100
500 ENOENT 0
Test 13 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
160 2159 100
260 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 60
160 2159 100
260 ENOENT 0
Test 14 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
100 2099 140
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 2099 140
240 ENOENT 0
Test 15 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
200 2199 40
240 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 100
200 2199 40
240 ENOENT 0
Test 16 ----------
dst:
VCN LCN len
0 1000 100
100 HOLE 100
200 ENOENT 0
src:
VCN LCN len
240 2239 40
280 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 HOLE 140
240 2239 40
280 ENOENT 0
Test 17 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
100 2099 40
140 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 2099 40
140 ENOENT 0
Test 18 ----------
dst:
VCN LCN len
0 1000 100
100 ENOENT 0
src:
VCN LCN len
140 2139 40
180 NOTMAP 0
res:
VCN LCN len
0 1000 100
100 NOTMAP 40
140 2139 40
180 ENOENT 0
Test 19 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
0 1999 40
40 NOTMAP 0
res:
VCN LCN len
0 1999 40
40 ENOENT 0
Test 20 ----------
dst:
VCN LCN len
0 ENOENT 0
src:
VCN LCN len
40 2039 40
80 NOTMAP 0
res:
VCN LCN len
0 NOTMAP 40
40 2039 40
80 ENOENT 0

13
test/runlist-data/zero Normal file
View File

@ -0,0 +1,13 @@
dst:
Run list not present.
src:
VCN LCN len
10 99 5
15 NOTMAP 0
res:
VCN LCN len
0 NOTMAP 10
10 99 5
0 0 0

7
test/runlist.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
#include "runlist.h"
int main (int argc, char *argv[])
{
return test_rl_main (argc, argv);
}