Skip to content

Commit 128e84a

Browse files
committed
t: differentiate test descriptions
Problem: Several tests in t2816-fsck-cmd.t have the same test description. When an error occurs in one, it is a little hard to figure out which test failed. Update the test descriptions a bit to differentiate them.
1 parent 8a3693e commit 128e84a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

t/t2816-fsck-cmd.t

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ test_expect_success 'save some treeobjs for later' '
3939
test_expect_success 'unload kvs' '
4040
flux module remove kvs
4141
'
42-
test_expect_success 'flux-fsck works' '
42+
test_expect_success 'flux-fsck works (simple)' '
4343
flux fsck 2> simple.out &&
4444
grep "Checking integrity" simple.out &&
4545
grep "Total errors: 0" simple.out
4646
'
47-
test_expect_success 'flux-fsck verbose works' '
47+
test_expect_success 'flux-fsck verbose works (simple)' '
4848
flux fsck --verbose 2> verbose.out &&
4949
grep "dir\.a" verbose.out &&
5050
grep "dir\.b" verbose.out &&
@@ -66,7 +66,7 @@ test_expect_success LONGTEST 'call sync to ensure we have checkpointed' '
6666
test_expect_success LONGTEST 'unload kvs' '
6767
flux module remove kvs
6868
'
69-
test_expect_success LONGTEST 'flux-fsck works' '
69+
test_expect_success LONGTEST 'flux-fsck works (big)' '
7070
flux fsck --verbose 2> bigval.out &&
7171
grep "Checking integrity" bigval.out &&
7272
grep "bigval" bigval.out &&
@@ -77,7 +77,7 @@ test_expect_success 'load kvs' '
7777
'
7878
# unfortunately we don't have a `flux content remove` command, so we'll corrupt
7979
# a valref by overwriting a treeobj with a bad reference
80-
test_expect_success 'make a reference invalid' '
80+
test_expect_success 'make a reference invalid (dir.b)' '
8181
cat dirb.out | jq -c .data[1]=\"sha1-1234567890123456789012345678901234567890\" > dirbbad.out &&
8282
flux kvs put --treeobj dir.b="$(cat dirbbad.out)"
8383
'
@@ -88,21 +88,21 @@ test_expect_success 'unload kvs' '
8888
flux module remove kvs
8989
'
9090
# line count includes extra diagnostic messages
91-
test_expect_success 'flux-fsck detects errors' '
91+
test_expect_success 'flux-fsck detects errors (dir.b)' '
9292
test_must_fail flux fsck 2> fsckerrors1.out &&
9393
test_debug "cat fsckerrors1.out" &&
9494
count=$(cat fsckerrors1.out | wc -l) &&
9595
test $count -eq 3 &&
9696
grep "dir\.b" fsckerrors1.out | grep "missing blobref(s)" &&
9797
grep "Total errors: 1" fsckerrors1.out
9898
'
99-
test_expect_success 'flux-fsck --verbose outputs details' '
99+
test_expect_success 'flux-fsck --verbose outputs details (dir.b)' '
100100
test_must_fail flux fsck --verbose 2> fsckerrors1V.out &&
101101
test_debug "cat fsckerrors1V.out" &&
102102
grep "dir\.b" fsckerrors1V.out | grep "missing blobref" | grep "index=1" &&
103103
grep "Total errors: 1" fsckerrors1V.out
104104
'
105-
test_expect_success 'flux-fsck no output with --quiet' '
105+
test_expect_success 'flux-fsck no output with --quiet (dir.b)' '
106106
test_must_fail flux fsck --quiet 2> fsckerrors2.out &&
107107
test_debug "cat fsckerrors2.out" &&
108108
count=$(cat fsckerrors2.out | wc -l) &&
@@ -111,7 +111,7 @@ test_expect_success 'flux-fsck no output with --quiet' '
111111
test_expect_success 'load kvs' '
112112
flux module load kvs
113113
'
114-
test_expect_success 'make a reference invalid' '
114+
test_expect_success 'make a reference invalid (dir.c)' '
115115
cat dirc.out | jq -c .data[1]=\"sha1-1234567890123456789012345678901234567890\" > dircbad1.out &&
116116
cat dircbad1.out | jq -c .data[2]=\"sha1-1234567890123456789012345678901234567890\" > dircbad2.out &&
117117
flux kvs put --treeobj dir.c="$(cat dircbad2.out)"
@@ -123,7 +123,7 @@ test_expect_success 'unload kvs' '
123123
flux module remove kvs
124124
'
125125
# line count includes extra diagnostic messages
126-
test_expect_success 'flux-fsck detects errors' '
126+
test_expect_success 'flux-fsck detects errors (dir.b & c)' '
127127
test_must_fail flux fsck 2> fsckerrors3.out &&
128128
test_debug "cat fsckerrors3.out" &&
129129
count=$(cat fsckerrors3.out | wc -l) &&
@@ -132,15 +132,15 @@ test_expect_success 'flux-fsck detects errors' '
132132
grep "dir\.c" fsckerrors3.out | grep "missing blobref(s)" &&
133133
grep "Total errors: 2" fsckerrors3.out
134134
'
135-
test_expect_success 'flux-fsck --verbose outputs details' '
135+
test_expect_success 'flux-fsck --verbose outputs details (dir.b & c)' '
136136
test_must_fail flux fsck --verbose 2> fsckerrors3V.out &&
137137
test_debug "cat fsckerrors3V.out" &&
138138
grep "dir\.b" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
139139
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
140140
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=2" &&
141141
grep "Total errors: 2" fsckerrors3V.out
142142
'
143-
test_expect_success 'flux-fsck no output with --quiet' '
143+
test_expect_success 'flux-fsck no output with --quiet (dir.b & c)' '
144144
test_must_fail flux fsck --quiet 2> fsckerrors4.out &&
145145
test_debug "cat fsckerrors4.out" &&
146146
count=$(cat fsckerrors4.out | wc -l) &&

0 commit comments

Comments
 (0)