Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
1095a005
Unverified
Commit
1095a005
authored
Nov 28, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverage: fix injection in test_fellow_cache_obj_iter_fina()
parent
35a4964b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
fellow_cache.c
src/fellow_cache.c
+16
-11
No files found.
src/fellow_cache.c
View file @
1095a005
...
...
@@ -5529,18 +5529,15 @@ static void test_fellow_cache_obj_iter_final(
VSHA256_Final
(
h2
,
&
sha256ctx
);
AZ
(
memcmp
(
h1
,
h2
,
sizeof
*
h1
));
injcount
=
fc_inj_count
();
DBG
(
"injcount %d"
,
injcount
);
if
(
injcount
==
0
)
return
;
fcsc_init
(
&
c
,
&
(
*
fcop
)
->
seglist
);
if
((
fcs
=
FCSC_NEXT
(
&
c
))
!=
NULL
)
{
while
(
fcs
->
state
==
FCS_READING
||
fcs
->
state
==
FCS_WRITING
)
usleep
(
100
);
assert
(
fcs
->
state
==
FCS_INCORE
);
AZ
(
fcs
->
refcnt
);
AN
(
fcs
->
fcs_onlru
);
if
(
fcs
->
state
!=
FCS_DISK
)
{
assert
(
fcs
->
state
==
FCS_INCORE
);
AZ
(
fcs
->
refcnt
);
AN
(
fcs
->
fcs_onlru
);
}
}
else
WRONG
(
"no seg"
);
fellow_cache_obj_slim
(
fc
,
*
fcop
);
...
...
@@ -5552,8 +5549,13 @@ static void test_fellow_cache_obj_iter_final(
(
void
)
fellow_cache_obj_deref
(
fc
,
*
fcop
);
*
fcop
=
NULL
;
fc_inj_reset
();
injcount
=
-
1
;
AN
(
injcount
);
while
(
injcount
)
{
DBG
(
"injcount %d"
,
injcount
);
fc_inj_set
(
0
);
toc
=
ocmem
;
fcr
=
fellow_cache_obj_get
(
fc
,
&
toc
,
priv2
,
0
);
assert
(
fcr
.
status
==
fcr_ok
);
...
...
@@ -5563,9 +5565,12 @@ static void test_fellow_cache_obj_iter_final(
VSHA256_Init
(
&
sha256ctx
);
fcr
=
fellow_cache_obj_iter
(
fc
,
fco
,
&
sha256ctx
,
iter_sha256
,
0
);
assert
(
fcr
.
status
!=
fcr_ok
);
DBG
(
"inj %d err %s"
,
injcount
,
fcr
.
r
.
err
);
injcount
--
;
if
(
fcr
.
status
==
fcr_ok
)
{
assert
(
injcount
==
-
1
);
injcount
=
fc_inj_count
();
}
else
injcount
--
;
assert
(
FCO_REFCNT
(
fco
)
==
1
);
fellow_cache_obj_deref
(
fc
,
fco
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment