anchor.diff:  flatten_format_log(Report, Format) ->
       lists:flatten(supervisor:format_log(Report, Format)).
   
  +% Test the auto-shutdown feature with temporary significant children.
  +significant_temporary(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => temporary,
  +	       significant => true},
  +    Child2 = #{id => child2,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => temporary,
  +	       significant => true},
  +    Child3 = #{id => child3,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => temporary,
  +	       significant => false},
  +
  +    % Test auto-shutdown on the exit of any significant child.
  +
  +    % Terminating a temporary significant child via the supervisor should not
  +    % trigger auto-shutdown.
  +    {ok, Sup1} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => any_significant}, []}}),
  +    supervisor:start_child(Sup1, Child1),
  +    supervisor:start_child(Sup1, Child2),
  +    supervisor:start_child(Sup1, Child3),
  +    [{child3, ChildPid1_3, _, _},
  +     {child2, ChildPid1_2, _, _},
  +     {child1, ChildPid1_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid1_1),
  +    link(ChildPid1_2),
  +    link(ChildPid1_3),
  +    terminate(Sup1, ChildPid1_1, child1, supervisor),
  +    ok = check_exit([ChildPid1_1]),
  +    error = check_exit([ChildPid1_2], 1000),
  +    error = check_exit([ChildPid1_3], 1000),
  +    error = check_exit([Sup1], 1000),
  +
  +    % Killing a temporary significant child should trigger auto-shutdown.
  +    supervisor:start_child(Sup1, Child1),
  +    [{child1, ChildPid2_1, _, _},
  +     {child3, ChildPid2_3, _, _},
  +     {child2, ChildPid2_2, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid2_1),
  +    link(ChildPid2_2),
  +    link(ChildPid2_3),
  +    terminate(ChildPid2_1, kill),
  +    ok = check_exit([ChildPid2_1, ChildPid2_2, ChildPid2_3, Sup1]),
  +
  +    % Abnormal termination of a temporary significant child should trigger
  +    % auto-shutdown.
  +    {ok, Sup2} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => any_significant}, []}}),
  +    supervisor:start_child(Sup2, Child1),
  +    supervisor:start_child(Sup2, Child2),
  +    supervisor:start_child(Sup2, Child3),
  +    [{child3, ChildPid3_3, _, _},
  +     {child2, ChildPid3_2, _, _},
  +     {child1, ChildPid3_1, _, _}] = supervisor:which_children(Sup2),
  +    link(ChildPid3_1),
  +    link(ChildPid3_2),
  +    link(ChildPid3_3),
  +    terminate(ChildPid3_1, abnormal),
  +    ok = check_exit([ChildPid3_1, ChildPid3_2, ChildPid3_3, Sup2]),
  +
  +    % Normal termination of a temporary significant child should trigger
  +    % auto-shutdown.
  +    {ok, Sup3} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => any_significant}, []}}),
  +    supervisor:start_child(Sup3, Child1),
  +    supervisor:start_child(Sup3, Child2),
  +    supervisor:start_child(Sup3, Child3),
  +    [{child3, ChildPid4_3, _, _},
  +     {child2, ChildPid4_2, _, _},
  +     {child1, ChildPid4_1, _, _}] = supervisor:which_children(Sup3),
  +    link(ChildPid4_1),
  +    link(ChildPid4_2),
  +    link(ChildPid4_3),
  +    terminate(ChildPid4_1, normal),
  +    ok = check_exit([ChildPid4_1, ChildPid4_2, ChildPid4_3, Sup3]),
  +
  +    % Test auto-shutdown on the exit of all significant children.
  +
  +    {ok, Sup4} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => all_significant}, []}}),
  +
  +    % The termination of only one of the two significant children should
  +    % not trigger auto-shutdown. The termination of the second (last of the two)
  +    % significant child should trigger auto-shutdown.
  +    supervisor:start_child(Sup4, Child1),
  +    supervisor:start_child(Sup4, Child2),
  +    supervisor:start_child(Sup4, Child3),
  +    [{child3, ChildPid5_3, _, _},
  +     {child2, ChildPid5_2, _, _},
  +     {child1, ChildPid5_1, _, _}] = supervisor:which_children(Sup4),
  +    link(ChildPid5_1),
  +    link(ChildPid5_2),
  +    link(ChildPid5_3),
  +    terminate(ChildPid5_1, normal),
  +    ok = check_exit([ChildPid5_1]),
  +    error = check_exit([ChildPid5_2], 1000),
  +    error = check_exit([ChildPid5_3], 1000),
  +    error = check_exit([Sup4], 1000),
  +    terminate(ChildPid5_2, normal),
  +    ok = check_exit([ChildPid5_2, ChildPid5_3, Sup4]),
  +
  +    ok.
  +
  +% Test the auto-shutdown feature with transient significant children.
  +significant_transient(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => true},
  +    Child2 = #{id => child2,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => true},
  +    Child3 = #{id => child3,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => false},
  +
  +    % Test auto-shutdown on the exit of any significant child.
  +
  +    {ok, Sup1} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => any_significant}, []}}),
  +
  +    % Terminating a transient significant child via the supervisor should not
  +    % trigger auto-shutdown.
  +    supervisor:start_child(Sup1, Child1),
  +    supervisor:start_child(Sup1, Child2),
  +    supervisor:start_child(Sup1, Child3),
  +    [{child3, ChildPid1_3, _, _},
  +     {child2, ChildPid1_2, _, _},
  +     {child1, ChildPid1_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid1_1),
  +    link(ChildPid1_2),
  +    link(ChildPid1_3),
  +    terminate(Sup1, ChildPid1_1, child1, supervisor),
  +    ok = check_exit([ChildPid1_1]),
  +    error = check_exit([ChildPid1_2], 1000),
  +    error = check_exit([ChildPid1_3], 1000),
  +    error = check_exit([Sup1], 1000),
  +    supervisor:restart_child(Sup1, child1),
  +
  +
  +    % Killing a transient significant child should not trigger
  +    % auto-shutdown. The killed child should be restarted.
  +    [{child3, ChildPid2_3, _, _},
  +     {child2, ChildPid2_2, _, _},
  +     {child1, ChildPid2_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid2_1),
  +    link(ChildPid2_2),
  +    link(ChildPid2_3),
  +    terminate(ChildPid2_1, kill),
  +    ok = check_exit([ChildPid2_1]),
  +    error = check_exit([ChildPid2_2], 1000),
  +    error = check_exit([ChildPid2_3], 1000),
  +    error = check_exit([Sup1], 1000),
  +
  +    % Abnormal termination of a transient significant child should not trigger
  +    % auto-shutdown. The terminated child should be restarted.
  +    [{child3, ChildPid3_3, _, _},
  +     {child2, ChildPid3_2, _, _},
  +     {child1, ChildPid3_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid3_1),
  +    link(ChildPid3_2),
  +    link(ChildPid3_3),
  +    terminate(ChildPid3_1, abnormal),
  +    ok = check_exit([ChildPid3_1]),
  +    error = check_exit([ChildPid3_2], 1000),
  +    error = check_exit([ChildPid3_3], 1000),
  +    error = check_exit([Sup1], 1000),
  +
  +    % Normal termination of a transient significant child should trigger
  +    % auto-shutdown.
  +    [{child3, ChildPid4_3, _, _},
  +     {child2, ChildPid4_2, _, _},
  +     {child1, ChildPid4_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid4_1),
  +    link(ChildPid4_2),
  +    link(ChildPid4_3),
  +    terminate(ChildPid4_1, normal),
  +    ok = check_exit([ChildPid4_1, ChildPid4_2, ChildPid4_3, Sup1]),
  +
  +    % Test auto-shutdown on the exit of all significant children.
  +
  +    {ok, Sup2} = start_link({ok, {#{intensity => 5,
  +				    auto_shutdown => all_significant}, []}}),
  +
  +    % The termination of only one of the two significant children should
  +    % not trigger auto-shutdown. The termination of the second (last of the two)
  +    % significant child should trigger auto-shutdown.
  +    supervisor:start_child(Sup2, Child1),
  +    supervisor:start_child(Sup2, Child2),
  +    supervisor:start_child(Sup2, Child3),
  +    [{child3, ChildPid5_3, _, _},
  +     {child2, ChildPid5_2, _, _},
  +     {child1, ChildPid5_1, _, _}] = supervisor:which_children(Sup2),
  +    link(ChildPid5_1),
  +    link(ChildPid5_2),
  +    link(ChildPid5_3),
  +    terminate(ChildPid5_1, normal),
  +    ok = check_exit([ChildPid5_1]),
  +    error = check_exit([ChildPid5_2], 1000),
  +    error = check_exit([ChildPid5_3], 1000),
  +    error = check_exit([Sup2], 1000),
  +    terminate(ChildPid5_2, normal),
  +    ok = check_exit([ChildPid5_2, ChildPid5_3, Sup2]),
  +
  +    ok.
  +
  +% Test the auto-shutdown feature in a simple_one_for_one supervisor.
  +significant_simple(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => temporary,
  +	       significant => true},
  +
  +    % Test auto-shutdown on the exit of any significant child.
  +    {ok, Sup1} = start_link({ok, {#{strategy => simple_one_for_one,
  +				    auto_shutdown => any_significant},
  +				  [Child1]}}),
  +    {ok, ChildPid1_1} = supervisor:start_child(Sup1, []),
  +    {ok, ChildPid1_2} = supervisor:start_child(Sup1, []),
  +    link(ChildPid1_1),
  +    link(ChildPid1_2),
  +    terminate(ChildPid1_1, normal),
  +    ok = check_exit([ChildPid1_1, ChildPid1_2, Sup1]),
  +
  +    % Test auto-shutdown on the exit of all significant children.
  +    {ok, Sup2} = start_link({ok, {#{strategy => simple_one_for_one,
  +				    auto_shutdown => all_significant},
  +				  [Child1]}}),
  +    {ok, ChildPid2_1} = supervisor:start_child(Sup2, []),
  +    {ok, ChildPid2_2} = supervisor:start_child(Sup2, []),
  +    link(ChildPid2_1),
  +    link(ChildPid2_2),
  +    terminate(ChildPid2_1, normal),
  +    ok = check_exit([ChildPid2_1]),
  +    error = check_exit([ChildPid2_2], 1000),
  +    error = check_exit([Sup2], 1000),
  +    terminate(ChildPid2_2, normal),
  +    ok = check_exit([ChildPid2_2, Sup2]),
  +
  +    ok.
  +
  +% Test that terminations of significant children caused by
  +% the death of a sibling does not trigger auto-shutdown.
  +significant_bystander(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => false},
  +    Child2 = #{id => child2,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => true},
  +    Child3 = #{id => child3,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => true},
  +
  +    % Test with auto-shutdown triggered by the termination of any significant
  +    % child.
  +    {ok, Sup1} = start_link({ok, {#{strategy => one_for_all,
  +				   intensity => 5,
  +				   auto_shutdown => any_significant}, []}}),
  +    supervisor:start_child(Sup1, Child1),
  +    supervisor:start_child(Sup1, Child2),
  +    supervisor:start_child(Sup1, Child3),
  +    [{child3, ChildPid1_3, _, _},
  +     {child2, ChildPid1_2, _, _},
  +     {child1, ChildPid1_1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid1_1),
  +    link(ChildPid1_2),
  +    link(ChildPid1_3),
  +    terminate(ChildPid1_1, kill),
  +    ok = check_exit([ChildPid1_1, ChildPid1_2, ChildPid1_3]),
  +    error = check_exit([Sup1], 1000),
  +    terminate(Sup1, shutdown),
  +    ok = check_exit([Sup1]),
  +
  +    % Test with auto-shutdown triggered by the termination of all significant
  +    % children.
  +    {ok, Sup2} = start_link({ok, {#{strategy => one_for_all,
  +				   intensity => 5,
  +				   auto_shutdown => all_significant}, []}}),
  +    supervisor:start_child(Sup2, Child1),
  +    supervisor:start_child(Sup2, Child2),
  +    supervisor:start_child(Sup2, Child3),
  +    [{child3, ChildPid2_3, _, _},
  +     {child2, ChildPid2_2, _, _},
  +     {child1, ChildPid2_1, _, _}] = supervisor:which_children(Sup2),
  +    link(ChildPid2_1),
  +    link(ChildPid2_2),
  +    link(ChildPid2_3),
  +    terminate(ChildPid2_1, kill),
  +    ok = check_exit([ChildPid2_1, ChildPid2_2, ChildPid2_3]),
  +    error = check_exit([Sup2], 1000),
  +    terminate(Sup2, shutdown),
  +    ok = check_exit([Sup2]),
  +
  +    ok.
  +
  +% Test auto-shutdown escalation. 
  +significant_escalation(_Config) ->
  +    process_flag(trap_exit, true),
  +    ChildSup1 = #{id => sup1,
  +		  start => {supervisor,
  +			    start_link,
  +			    [?MODULE, {ok, {#{auto_shutdown => any_significant}, []}}]},
  +		  restart => transient,
  +                  type => supervisor},
  +    Child1 = #{id => child1,
  +               start => {supervisor_1, start_child, []},
  +               restart => transient,
  +               significant => true},
  +
  +    % Supervisor A has another supervisor B as a significant child, and supervisor B
  +    % has a worker C as a significant child. A and B have auto-shutdown enabled.
  +    % When C terminates, it should cause the auto-shutdown of B, and the termination
  +    % of B should in turn cause the auto-shutdown of A.
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => any_significant}, []}}),
  +    {ok, ChildSupPid1} = supervisor:start_child(Sup1, ChildSup1#{significant => true}),
  +    {ok, ChildPid1} = supervisor:start_child(ChildSupPid1, Child1),
  +    link(ChildSupPid1),
  +    link(ChildPid1),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1, ChildSupPid1, Sup1]),
  +
  +    % Supervisor A has another supervisor B as a non-significant child, and supervisor B
  +    % has a worker C as a significant child. A and B have auto-shutdown enabled.
  +    % When C terminates, it should cause the auto-shutdown of B, but the termination
  +    % of B should not in turn cause the auto-shutdown of A.
  +    {ok, Sup2} = start_link({ok, {#{auto_shutdown => any_significant}, []}}),
  +    {ok, ChildSupPid2} = supervisor:start_child(Sup2, ChildSup1#{significant => false}),
  +    {ok, ChildPid2} = supervisor:start_child(ChildSupPid2, Child1),
  +    link(ChildSupPid2),
  +    link(ChildPid2),
  +    terminate(ChildPid2, normal),
  +    ok = check_exit([ChildPid2, ChildSupPid2]),
  +    error = check_exit([Sup2], 1000),
  +    terminate(Sup2, shutdown),
  +    ok = check_exit([Sup2]),
  +
  +    ok.
  +
  +% Test upgrading auto-shutdown from never to any_significant.
  +significant_upgrade_never_any(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    Child2 = #{id => child2,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => never}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    {ok, ChildPid2} = supervisor:start_child(Sup1, Child2),
  +    link(ChildPid1),
  +    link(ChildPid2),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => any_significant}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1, ChildPid2, Sup1]),
  +    ok.
  +
  +% Test upgrading auto-shutdown from any_significant to never.
  +significant_upgrade_any_never(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => any_significant}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    link(ChildPid1),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => never}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1]),
  +    error = check_exit([Sup1], 1000),
  +    ok.
  +
  +% Test upgrading auto-shutdown from never to all_significant.
  +significant_upgrade_never_all(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    Child2 = #{id => child2,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => never}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    {ok, ChildPid2} = supervisor:start_child(Sup1, Child2),
  +    link(ChildPid1),
  +    link(ChildPid2),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => all_significant}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1]),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid2, normal),
  +    ok = check_exit([ChildPid2, Sup1]),
  +    ok.
  +
  +% Test upgrading auto-shutdown from all_significant to never.
  +significant_upgrade_all_never(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => all_significant}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    link(ChildPid1),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => never}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1]),
  +    error = check_exit([Sup1], 1000),
  +    ok.
  +
  +% Test upgrading auto-shutdown from any_significant to all_significant.
  +significant_upgrade_any_all(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    Child2 = #{id => child2,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => any_significant}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    {ok, ChildPid2} = supervisor:start_child(Sup1, Child2),
  +    link(ChildPid1),
  +    link(ChildPid2),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => all_significant}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1]),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid2, normal),
  +    ok = check_exit([ChildPid2, Sup1]),
  +    ok.
  +
  +% Test upgrading auto-shutdown from all_significant to any_significant.
  +significant_upgrade_all_any(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child1,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    Child2 = #{id => child2,
  +	       start => {supervisor_1, start_child, []},
  +	       restart => transient,
  +	       significant => true},
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => all_significant}, []}}),
  +    {ok, ChildPid1} = supervisor:start_child(Sup1, Child1),
  +    {ok, ChildPid2} = supervisor:start_child(Sup1, Child2),
  +    link(ChildPid1),
  +    link(ChildPid2),
  +    S1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => any_significant}, []}}),
  +    S2 = sys:get_state(Sup1),
  +    true = (S1 /= S2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1, ChildPid2, Sup1]),
  +    ok.
  +
  +% Test upgrading a child from non-significant to significant
  +% and vice versa.
  +significant_upgrade_child(_Config) ->
  +    process_flag(trap_exit, true),
  +    Child1 = #{id => child,
  +	      start => {supervisor_1, start_child, []},
  +	      restart => transient,
  +	      significant => false},
  +    Child2 = #{id => child,
  +	      start => {supervisor_1, start_child, []},
  +	      restart => transient,
  +	      significant => true},
  +
  +    % Start with a non-significant child, upgrade it to significant
  +    % and ensure that it triggers auto-shutdown.
  +    {ok, Sup1} = start_link({ok, {#{auto_shutdown => any_significant}, [Child1]}}),
  +    [{child, ChildPid1, _, _}] = supervisor:which_children(Sup1),
  +    link(ChildPid1),
  +    S1_1 = sys:get_state(Sup1),
  +    ok = fake_upgrade(Sup1, {ok, {#{auto_shutdown => any_significant}, [Child2]}}),
  +    S1_2 = sys:get_state(Sup1),
  +    true = (S1_1 /= S1_2),
  +    error = check_exit([ChildPid1], 1000),
  +    error = check_exit([Sup1], 1000),
  +    terminate(ChildPid1, normal),
  +    ok = check_exit([ChildPid1, Sup1]),
  +
  +    % Start with a significant child, upgrade it to non-significant
  +    % and ensure that it does not trigger auto-shutdown.
  +    {ok, Sup2} = start_link({ok, {#{auto_shutdown => any_significant}, [Child2]}}),
  +    [{child, ChildPid2, _, _}] = supervisor:which_children(Sup2),
  +    link(ChildPid2),
  +    S2_1 = sys:get_state(Sup2),
  +    ok = fake_upgrade(Sup2, {ok, {#{auto_shutdown => any_significant}, [Child1]}}),
  +    S2_2 = sys:get_state(Sup2),
  +    true = (S2_1 /= S2_2),
  +    error = check_exit([ChildPid2], 1000),
  +    error = check_exit([Sup2], 1000),
  +    terminate(ChildPid2, normal),
  +    ok = check_exit([ChildPid2]),
  +    error = check_exit([Sup2], 1000),
  +    terminate(Sup2, shutdown),
  +    ok = check_exit([Sup2]),
  +
  +    ok.
  +
   %%-------------------------------------------------------------------------
   terminate(Pid, Reason) when Reason =/= supervisor ->
       terminate(dummy, Pid, dummy, Reason).
  
positive.code: 	  sup_start_map/1, sup_start_map_simple/1,
  	  sup_start_map_faulty_specs/1,
  	  sup_stop_infinity/1, sup_stop_timeout/1, sup_stop_brutal_kill/1,
  	  child_adm/1, child_adm_simple/1, child_specs/1, extra_return/1,
  	  sup_flags/1]).
  
  %% Tests concept permanent, transient and temporary 
  -export([ permanent_normal/1, transient_normal/1,
  
negative.code:     ok.
  
  %%-------------------------------------------------------------------------
  %% Tests child specs (tuple form), invalid formats should be rejected.
  child_specs(Config) when is_list(Config) ->
      process_flag(trap_exit, true),
      {ok, Pid} = start_link({ok, {{one_for_one, 2, 3600}, []}}),
  