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
37b2a7bc
Commit
37b2a7bc
authored
Mar 15, 2019
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: tests: use standard error message after fs_info allocation failure
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
703de426
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
10 deletions
+11
-10
fs/btrfs/tests/extent-buffer-tests.c
fs/btrfs/tests/extent-buffer-tests.c
+1
-1
fs/btrfs/tests/extent-io-tests.c
fs/btrfs/tests/extent-io-tests.c
+1
-1
fs/btrfs/tests/extent-map-tests.c
fs/btrfs/tests/extent-map-tests.c
+1
-1
fs/btrfs/tests/free-space-tests.c
fs/btrfs/tests/free-space-tests.c
+3
-2
fs/btrfs/tests/free-space-tree-tests.c
fs/btrfs/tests/free-space-tree-tests.c
+1
-1
fs/btrfs/tests/inode-tests.c
fs/btrfs/tests/inode-tests.c
+3
-3
fs/btrfs/tests/qgroup-tests.c
fs/btrfs/tests/qgroup-tests.c
+1
-1
No files found.
fs/btrfs/tests/extent-buffer-tests.c
View file @
37b2a7bc
...
@@ -30,7 +30,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
...
@@ -30,7 +30,7 @@ static int test_btrfs_split_item(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"could not allocate fs_info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
fs/btrfs/tests/extent-io-tests.c
View file @
37b2a7bc
...
@@ -393,7 +393,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
...
@@ -393,7 +393,7 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
len
,
len
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
len
,
len
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"could not allocate fs_info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
fs/btrfs/tests/extent-map-tests.c
View file @
37b2a7bc
...
@@ -349,7 +349,7 @@ int btrfs_test_extent_map(void)
...
@@ -349,7 +349,7 @@ int btrfs_test_extent_map(void)
*/
*/
fs_info
=
btrfs_alloc_dummy_fs_info
(
PAGE_SIZE
,
PAGE_SIZE
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
PAGE_SIZE
,
PAGE_SIZE
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
msg
(
"Couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
fs/btrfs/tests/free-space-tests.c
View file @
37b2a7bc
...
@@ -834,9 +834,10 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
...
@@ -834,9 +834,10 @@ int btrfs_test_free_space_cache(u32 sectorsize, u32 nodesize)
test_msg
(
"running btrfs free space cache tests"
);
test_msg
(
"running btrfs free space cache tests"
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
if
(
!
fs_info
)
{
test_std_err
(
TEST_ALLOC_FS_INFO
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
/*
/*
* For ppc64 (with 64k page size), bytes per bitmap might be
* For ppc64 (with 64k page size), bytes per bitmap might be
...
...
fs/btrfs/tests/free-space-tree-tests.c
View file @
37b2a7bc
...
@@ -444,7 +444,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
...
@@ -444,7 +444,7 @@ static int run_test(test_func_t test_func, int bitmaps, u32 sectorsize,
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
ret
=
-
ENOMEM
;
ret
=
-
ENOMEM
;
goto
out
;
goto
out
;
}
}
...
...
fs/btrfs/tests/inode-tests.c
View file @
37b2a7bc
...
@@ -238,7 +238,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
...
@@ -238,7 +238,7 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
goto
out
;
goto
out
;
}
}
...
@@ -839,7 +839,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
...
@@ -839,7 +839,7 @@ static int test_hole_first(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
goto
out
;
goto
out
;
}
}
...
@@ -935,7 +935,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
...
@@ -935,7 +935,7 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
goto
out
;
goto
out
;
}
}
...
...
fs/btrfs/tests/qgroup-tests.c
View file @
37b2a7bc
...
@@ -457,7 +457,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
...
@@ -457,7 +457,7 @@ int btrfs_test_qgroups(u32 sectorsize, u32 nodesize)
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
fs_info
=
btrfs_alloc_dummy_fs_info
(
nodesize
,
sectorsize
);
if
(
!
fs_info
)
{
if
(
!
fs_info
)
{
test_
err
(
"couldn't allocate dummy fs info"
);
test_
std_err
(
TEST_ALLOC_FS_INFO
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
...
...
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