diff options
author | David Sterba <dsterba@suse.com> | 2019-03-15 17:03:55 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:25 +0200 |
commit | efd31fce54f78a172edd7ef61f9661cc614c56b2 (patch) | |
tree | f9a9ea3b7a3b1c70fe6d1a8ef3386d8876544db9 /fs/btrfs/tests | |
parent | d33d105b85d6099e2499c536fb6fbb2dc65ea644 (diff) |
btrfs: tests: print file:line for error messages
For better diagnostics print the file name and line to locate the
errors. Sample output:
[ 9.052924] BTRFS: selftest: fs/btrfs/tests/extent-io-tests.c:283 offset bits do not match
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.h b/fs/btrfs/tests/btrfs-tests.h index 70ff9f9d86a1..bb9e9c234535 100644 --- a/fs/btrfs/tests/btrfs-tests.h +++ b/fs/btrfs/tests/btrfs-tests.h @@ -10,7 +10,8 @@ int btrfs_run_sanity_tests(void); #define test_msg(fmt, ...) pr_info("BTRFS: selftest: " fmt "\n", ##__VA_ARGS__) -#define test_err(fmt, ...) pr_err("BTRFS: selftest: " fmt "\n", ##__VA_ARGS__) +#define test_err(fmt, ...) pr_err("BTRFS: selftest: %s:%d " fmt "\n", \ + __FILE__, __LINE__, ##__VA_ARGS__) struct btrfs_root; struct btrfs_trans_handle; |