Skip to content

Commit 8a3693e

Browse files
committed
t: add fsck test debug
Problem: Several fsck tests have failed in CI without much debugging to go on. Add some debugging in t2816-fsck-cmd.t.
1 parent 127da10 commit 8a3693e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t2816-fsck-cmd.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,21 @@ test_expect_success 'unload kvs' '
9090
# line count includes extra diagnostic messages
9191
test_expect_success 'flux-fsck detects errors' '
9292
test_must_fail flux fsck 2> fsckerrors1.out &&
93+
test_debug "cat fsckerrors1.out" &&
9394
count=$(cat fsckerrors1.out | wc -l) &&
9495
test $count -eq 3 &&
9596
grep "dir\.b" fsckerrors1.out | grep "missing blobref(s)" &&
9697
grep "Total errors: 1" fsckerrors1.out
9798
'
9899
test_expect_success 'flux-fsck --verbose outputs details' '
99100
test_must_fail flux fsck --verbose 2> fsckerrors1V.out &&
101+
test_debug "cat fsckerrors1V.out" &&
100102
grep "dir\.b" fsckerrors1V.out | grep "missing blobref" | grep "index=1" &&
101103
grep "Total errors: 1" fsckerrors1V.out
102104
'
103105
test_expect_success 'flux-fsck no output with --quiet' '
104106
test_must_fail flux fsck --quiet 2> fsckerrors2.out &&
107+
test_debug "cat fsckerrors2.out" &&
105108
count=$(cat fsckerrors2.out | wc -l) &&
106109
test $count -eq 0
107110
'
@@ -122,6 +125,7 @@ test_expect_success 'unload kvs' '
122125
# line count includes extra diagnostic messages
123126
test_expect_success 'flux-fsck detects errors' '
124127
test_must_fail flux fsck 2> fsckerrors3.out &&
128+
test_debug "cat fsckerrors3.out" &&
125129
count=$(cat fsckerrors3.out | wc -l) &&
126130
test $count -eq 4 &&
127131
grep "dir\.b" fsckerrors3.out | grep "missing blobref(s)" &&
@@ -130,13 +134,15 @@ test_expect_success 'flux-fsck detects errors' '
130134
'
131135
test_expect_success 'flux-fsck --verbose outputs details' '
132136
test_must_fail flux fsck --verbose 2> fsckerrors3V.out &&
137+
test_debug "cat fsckerrors3V.out" &&
133138
grep "dir\.b" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
134139
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
135140
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=2" &&
136141
grep "Total errors: 2" fsckerrors3V.out
137142
'
138143
test_expect_success 'flux-fsck no output with --quiet' '
139144
test_must_fail flux fsck --quiet 2> fsckerrors4.out &&
145+
test_debug "cat fsckerrors4.out" &&
140146
count=$(cat fsckerrors4.out | wc -l) &&
141147
test $count -eq 0
142148
'

0 commit comments

Comments
 (0)