# # # patch "roster_merge.cc" # from [3cb79d8c55e6844fc682a4f5158f9282e9614b02] # to [658623cc85cdf4f3a9f29cd7e3920e25e5c34d31] # ============================================================ --- roster_merge.cc 3cb79d8c55e6844fc682a4f5158f9282e9614b02 +++ roster_merge.cc 658623cc85cdf4f3a9f29cd7e3920e25e5c34d31 @@ -1693,6 +1693,28 @@ } }; +struct node_name_plus_illegal_name : public node_name_plus_helper +{ + node_id new_root_nid; + + virtual void setup() + { + new_root_nid = nis.next(); + make_dir(left_roster, left_markings, old_rid, old_rid, "new_root", new_root_nid); + right_roster.drop_detached_node(right_roster.detach_node(split(""))); + safe_erase(right_markings, root_nid); + make_dir(right_roster, right_markings, old_rid, right_rid, "", new_root_nid); + make_nn_conflict("new_root/_MTN", "foo"); + } + + virtual void check() + { + I(result.roster.root()->self == new_root_nid); + I(result.roster.all_nodes().size() == 2); + check_nn_conflict(); + } +}; + static void test_complex_structural_conflicts() { @@ -1708,6 +1730,10 @@ node_name_plus_directory_loop t; t.test(); } + { + node_name_plus_illegal_name t; + t.test(); + } } void