From: David Sterba Date: Fri, 15 Mar 2019 16:03:55 +0000 (+0100) Subject: btrfs: tests: print file:line for error messages X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=efd31fce54f78a172edd7ef61f9661cc614c56b2;p=linux.git 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 --- diff --git a/fs/btrfs/tests/btrfs-tests.h b/fs/btrfs/tests/btrfs-tests.h index 70ff9f9d86a1b..bb9e9c2345350 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;