Commit ec3d21a9 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Add error handling to unit & perf tests

This way, these tests can be used with tests that inject IO errors and
shut down the filesystem.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 231db03c
...@@ -503,10 +503,11 @@ STORE(bch2_fs) ...@@ -503,10 +503,11 @@ STORE(bch2_fs)
if (threads_str && if (threads_str &&
!(ret = kstrtouint(threads_str, 10, &threads)) && !(ret = kstrtouint(threads_str, 10, &threads)) &&
!(ret = bch2_strtoull_h(nr_str, &nr))) !(ret = bch2_strtoull_h(nr_str, &nr)))
bch2_btree_perf_test(c, test, nr, threads); ret = bch2_btree_perf_test(c, test, nr, threads);
else
size = ret;
kfree(tmp); kfree(tmp);
if (ret)
size = ret;
} }
#endif #endif
return size; return size;
......
This diff is collapsed.
...@@ -6,7 +6,7 @@ struct bch_fs; ...@@ -6,7 +6,7 @@ struct bch_fs;
#ifdef CONFIG_BCACHEFS_TESTS #ifdef CONFIG_BCACHEFS_TESTS
void bch2_btree_perf_test(struct bch_fs *, const char *, u64, unsigned); int bch2_btree_perf_test(struct bch_fs *, const char *, u64, unsigned);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment