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>
This commit is contained in:
David Sterba 2019-03-15 17:03:55 +01:00
parent d33d105b85
commit efd31fce54

View File

@ -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;