Skip to content

Commit

Permalink
Add test for parallel restore
Browse files Browse the repository at this point in the history
This is the benchmark binary that bulk creates filesystem items, xattrs
and is heavily threaded to scope the performance of the library. The
test script invokes it to validate some basic constraints.

Signed-off-by: Zach Brown <[email protected]>
Signed-off-by: Hunter Shaffer <[email protected]>
Signed-off-by: Auke Kok <[email protected]>
  • Loading branch information
zabbo authored and aversecat committed Feb 10, 2025
1 parent 2f4c512 commit 05c83ee
Show file tree
Hide file tree
Showing 5 changed files with 913 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ BIN := src/createmany \
src/create_xattr_loop \
src/fragmented_data_extents \
src/o_tmpfile_umask \
src/o_tmpfile_linkat
src/o_tmpfile_linkat \
src/parallel_restore

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

Expand All @@ -23,8 +24,12 @@ ifneq ($(DEPS),)
-include $(DEPS)
endif

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

$(BIN): %: %.c Makefile
gcc $(CFLAGS) -MD -MP -MF $*.d $< -o $@
gcc $(CFLAGS) -MD -MP -MF $*.d $< -o $@ $($(@)_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 Size Total Used Free Use%
MetaData 64KB 163840 34721 129119 21
Data 4KB 15728640 64 15728576 0
== under ENOSPC
Type Size Total Used Free Use%
MetaData 64KB 163840 115361 48479 70
Data 4KB 15728640 64 15728576 0
== ENOSPC
== attempt to restore data device
== attempt format_v1 restore
== test if previously mounted
== cleanup
1 change: 1 addition & 0 deletions tests/sequence
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ archive-light-cycle.sh
block-stale-reads.sh
inode-deletion.sh
renameat2-noreplace.sh
parallel_restore.sh
xfstests.sh
Loading

0 comments on commit 05c83ee

Please sign in to comment.