Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6c304746
Commit
6c304746
authored
Mar 15, 2019
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: tests: use standard error message after extent map allocation failure
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
ccfada1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
fs/btrfs/tests/extent-map-tests.c
fs/btrfs/tests/extent-map-tests.c
+19
-4
No files found.
fs/btrfs/tests/extent-map-tests.c
View file @
6c304746
...
...
@@ -56,8 +56,10 @@ static int test_case_1(struct btrfs_fs_info *fs_info,
int
ret
;
em
=
alloc_extent_map
();
if
(
!
em
)
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
return
-
ENOMEM
;
}
/* Add [0, 16K) */
em
->
start
=
0
;
...
...
@@ -74,6 +76,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info,
/* Add [16K, 20K) following [0, 16K) */
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -91,6 +94,7 @@ static int test_case_1(struct btrfs_fs_info *fs_info,
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -134,8 +138,10 @@ static int test_case_2(struct btrfs_fs_info *fs_info,
int
ret
;
em
=
alloc_extent_map
();
if
(
!
em
)
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
return
-
ENOMEM
;
}
/* Add [0, 1K) */
em
->
start
=
0
;
...
...
@@ -152,6 +158,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info,
/* Add [4K, 4K) following [0, 1K) */
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -169,6 +176,7 @@ static int test_case_2(struct btrfs_fs_info *fs_info,
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -207,8 +215,10 @@ static int __test_case_3(struct btrfs_fs_info *fs_info,
int
ret
;
em
=
alloc_extent_map
();
if
(
!
em
)
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
return
-
ENOMEM
;
}
/* Add [4K, 8K) */
em
->
start
=
SZ_4K
;
...
...
@@ -224,6 +234,7 @@ static int __test_case_3(struct btrfs_fs_info *fs_info,
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -299,8 +310,10 @@ static int __test_case_4(struct btrfs_fs_info *fs_info,
int
ret
;
em
=
alloc_extent_map
();
if
(
!
em
)
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
return
-
ENOMEM
;
}
/* Add [0K, 8K) */
em
->
start
=
0
;
...
...
@@ -316,6 +329,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info,
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
@@ -334,6 +348,7 @@ static int __test_case_4(struct btrfs_fs_info *fs_info,
em
=
alloc_extent_map
();
if
(
!
em
)
{
test_std_err
(
TEST_ALLOC_EXTENT_MAP
);
ret
=
-
ENOMEM
;
goto
out
;
}
...
...
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