Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ BIN := src/createmany \
src/o_tmpfile_umask \
src/o_tmpfile_linkat \
src/mmap_stress \
src/mmap_validate
src/mmap_validate \
src/parallel_restore \
src/restore_copy

DEPS := $(wildcard src/*.d)

Expand All @@ -27,8 +29,13 @@ endif

src/mmap_stress: LIBS+=-lpthread

src/parallel_restore_cflags := ../utils/src/scoutfs_parallel_restore.a -lm
src/parallel_restore: ../utils/src/scoutfs_parallel_restore.a
src/restore_copy_cflags := ../utils/src/scoutfs_parallel_restore.a -lm
src/restore_copy : ../utils/src/scoutfs_parallel_restore.a

$(BIN): %: %.c Makefile
gcc $(CFLAGS) -MD -MP -MF $*.d $< -o $@ $(LIBS)
gcc $(CFLAGS) -MD -MP -MF $*.d $< -o $@ $(LIBS) $($(@)_cflags)

.PHONY: clean
clean:
Expand Down
26 changes: 26 additions & 0 deletions tests/golden/parallel_restore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
== simple mkfs/restore/mount
committed_seq 1120
total_meta_blocks 163840
total_data_blocks 15728640
1440 1440 57120
80 80 400
0: offset: 0 length: 1 flags: O.L
extents: 1
0: offset: 0 length: 1 flags: O.L
extents: 1
0: offset: 0 length: 1 flags: O.L
extents: 1
0: offset: 0 length: 1 flags: O.L
extents: 1
Type Used
MetaData 34721
Data 64
== under ENOSPC
Type Used
MetaData 117073
Data 64
== ENOSPC
== attempt to restore data device
== attempt format_v1 restore
== test if previously mounted
== cleanup
83 changes: 83 additions & 0 deletions tests/golden/restore_copy
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
== restore_copy content verification
d /mnt/test/data/d
f /mnt/test/data/f
l /mnt/test/data/l -> broken
f /mnt/test/data/h
l /mnt/test/data/F -> f
b /mnt/test/data/b
c /mnt/test/data/c
c /mnt/test/data/u
p /mnt/test/data/p
f /mnt/test/data/f4096
f /mnt/test/data/falloc
f /mnt/test/data/truncate
s /mnt/test/data/s
f /mnt/test/data/mode_t
f /mnt/test/data/uidgid
f /mnt/test/data/retention
f /mnt/test/data/proj
f /mnt/test/data/proj_d/f
d /mnt/test/data/proj_d
d /mnt/test/data
Quota rule: 7 13,L,- 0,L,- 0,L,- I 33 -
Quota rule: 7 11,L,- 0,L,- 0,L,- I 33 -
Quota rule: 7 12,L,- 0,L,- 0,L,- I 33 -
Quota rule: 7 10,L,- 0,L,- 0,L,- I 33 -
Quota rule: 7 15,L,- 0,L,- 0,L,- I 33 -
Quota rule: 7 14,L,- 0,L,- 0,L,- I 33 -
Wrote 1 directories, 0 files, 458752 bytes total
== verify metadata bits on restored fs
total 16516
-rw-r--r--. 1 33333 33333 0 uidgid
crw-r--r--. 1 0 0 2, 2 u
-rw-r--r--. 1 0 0 16777216 truncate
srwxr-xr-x. 1 0 0 0 s
-rw-r--r--. 1 0 0 0 retention
drwxr-xr-x. 2 0 0 1 proj_d
-rw-r--r--. 1 0 0 0 proj
prw-r--r--. 1 0 0 0 p
-rwsrwsrwx. 1 0 0 0 mode_t
lrwxrwxrwx. 1 0 0 7 l -> broken
-rw-r--r--. 2 0 0 0 h
-rw-r--r--. 1 0 0 131072 falloc
-rw-r--r--. 1 0 0 4096 f4096
-rw-r--r--. 2 0 0 0 f
drwxr-xr-x. 2 0 0 0 d
crw-r--r--. 1 0 0 0, 0 c
brw-r--r--. 1 0 0 1, 1 b
lrwxrwxrwx. 1 0 0 2 F -> f
1
12345
0: offset: 0 length: 1 flags: O.L
extents: 1
0: offset: 0 length: 32 flags: O.L
extents: 1
0: offset: 0 length: 4096 flags: O.L
extents: 1
7 15,L,- 0,L,- 0,L,- I 33 -
7 14,L,- 0,L,- 0,L,- I 33 -
7 13,L,- 0,L,- 0,L,- I 33 -
7 12,L,- 0,L,- 0,L,- I 33 -
7 11,L,- 0,L,- 0,L,- I 33 -
7 10,L,- 0,L,- 0,L,- I 33 -
12345
54321
crtime 55555.666666666
crtime 55556.666666666
== verify quota rules on restored fs
7 14,L,- 0,L,- 0,L,- I 33 -
7 13,L,- 0,L,- 0,L,- I 33 -
7 12,L,- 0,L,- 0,L,- I 33 -
7 11,L,- 0,L,- 0,L,- I 33 -
7 10,L,- 0,L,- 0,L,- I 33 -
7 15,L,- 0,L,- 0,L,- I 33 -
7 14,L,- 0,L,- 0,L,- I 33 -
7 13,L,- 0,L,- 0,L,- I 33 -
7 12,L,- 0,L,- 0,L,- I 33 -
7 11,L,- 0,L,- 0,L,- I 33 -
7 10,L,- 0,L,- 0,L,- I 33 -
Type Used
MetaData 34698
Data 64
== umount restored fs and check
== cleanup
2 changes: 2 additions & 0 deletions tests/sequence
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ archive-light-cycle.sh
block-stale-reads.sh
inode-deletion.sh
renameat2-noreplace.sh
parallel_restore.sh
restore_copy.sh
xfstests.sh
Loading