From 6a826517cc5878fd1e0e2289ac02251059e6ef67 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Thu, 9 Mar 2023 14:59:16 +0100 Subject: Test: Extend basic GC test by link count check --- test/end-to-end/gc/basic.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/end-to-end/gc') diff --git a/test/end-to-end/gc/basic.sh b/test/end-to-end/gc/basic.sh index dabb6dcf..b3e93ff5 100644 --- a/test/end-to-end/gc/basic.sh +++ b/test/end-to-end/gc/basic.sh @@ -103,4 +103,12 @@ test -f "${OUT}/out-tree/out/hello/world/tree/hello.txt" test -f "${OUT}/out-tree/out/hello/world/tree/name.txt" test "$(cat "${OUT}/out-tree/out/hello/world/tree/name.txt")" = "World" +# check if all files in generation 0 have been linked and not copied +readonly NON_LINKED_FILES=$(find ${LBR}/protocol-dependent/generation-0 -type f -exec sh -c 'test $(stat -c %h {}) != 2' \; -print) +echo +echo "Files with link count!=2:" +echo "${NON_LINKED_FILES:-""}" +echo +test -z "${NON_LINKED_FILES}" + echo OK -- cgit v1.2.3