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
b0dccf98
Unverified
Commit
b0dccf98
authored
Nov 28, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coverage: fellow_busy_body_seg_return()
parent
b07819cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
fellow_cache.c
src/fellow_cache.c
+30
-0
No files found.
src/fellow_cache.c
View file @
b0dccf98
...
...
@@ -4008,6 +4008,9 @@ static size_t fellow_busy_seg_memalloc(buddy_t *membuddy,
AZ
(
fcs
->
alloc
.
ptr
);
AZ
(
fcs
->
alloc
.
size
);
if
(
FC_INJ
)
return
(
0
);
fcs
->
alloc
=
buddy_alloc1_ptr_extent_wait
(
membuddy
,
FEP_SPC
,
fds
->
seg
.
size
,
cram
);
...
...
@@ -5904,6 +5907,7 @@ t_cache(unsigned chksum)
const
size_t
dsksz
=
100
*
1024
*
1024
;
const
size_t
objsize_hint
=
1
*
1024
*
1024
;
struct
fellow_cache_res
fcr
;
int
injcount
;
char
*
ptr
;
DBGSZ
(
fellow_disk_seg
);
...
...
@@ -6049,6 +6053,32 @@ t_cache(unsigned chksum)
test_bocdone
(
fbo
,
TRUST_ME
(
hash
),
1
);
fellow_cache_obj_deref
(
fc
,
fco
);
// === alloc space error inject
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
1234
).
r
.
ptr
;
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
fc_inj_reset
();
injcount
=
-
1
;
while
(
injcount
)
{
DBG
(
"injcount=%d"
,
injcount
);
if
(
injcount
>
0
)
fc_inj_set
(
injcount
);
sz
=
1234
;
fcr
=
fellow_busy_obj_getspace
(
fbo
,
&
sz
,
(
uint8_t
**
)
&
ptr
);
if
(
fcr
.
status
==
fcr_ok
)
fellow_busy_obj_extend
(
fbo
,
sz
);
else
assert
(
fcr
.
status
==
fcr_allocerr
);
if
(
injcount
<
0
)
injcount
=
fc_inj_count
();
else
injcount
--
;
}
fellow_busy_obj_trimstore
(
fbo
);
test_bocdone
(
fbo
,
TRUST_ME
(
hash
),
1
);
fellow_cache_obj_deref
(
fc
,
fco
);
// === hit objsize_max
fbo
=
fellow_busy_obj_alloc
(
fc
,
&
fco
,
&
priv2
,
1234
).
r
.
ptr
;
CHECK_OBJ_NOTNULL
(
fbo
,
FELLOW_BUSY_MAGIC
);
...
...
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