diff --git a/tests/ovn-ic.at b/tests/ovn-ic.at
index 0638af401295..2a4fba031f36 100644
--- a/tests/ovn-ic.at
+++ b/tests/ovn-ic.at
@@ -1,4 +1,5 @@
 AT_BANNER([OVN Interconnection Controller])
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- AZ register])
 
 ovn_init_ic_db
@@ -29,7 +30,9 @@ availability-zone az3
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- transit switch handling])
 
 ovn_init_ic_db
@@ -59,7 +62,9 @@ check_column ts2 nb:Logical_Switch name
 OVN_CLEANUP_IC([az1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- gateway sync])
 
 ovn_init_ic_db
@@ -120,8 +125,9 @@ OVN_CLEANUP_SBOX(gw2)
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- port sync])
 
 ovn_init_ic_db
@@ -185,7 +191,9 @@ OVN_CLEANUP_SBOX(gw1)
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-ic -- route sync])
 
 ovn_init_ic_db
@@ -310,3 +318,4 @@ OVS_WAIT_WHILE([ovn_as az1 ovn-nbctl lr-route-list lr1 | grep learned | grep 10.
 OVN_CLEANUP_IC([az1], [az2])
 
 AT_CLEANUP
+])
diff --git a/tests/ovn-macros.at b/tests/ovn-macros.at
index 59e500c5705a..44c0e20cfdc5 100644
--- a/tests/ovn-macros.at
+++ b/tests/ovn-macros.at
@@ -47,10 +47,12 @@ m4_define([OVN_CLEANUP],[
     OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
     as northd
-    OVS_APP_EXIT_AND_WAIT([ovn-northd])
+    OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
 
-    as northd-backup
-    OVS_APP_EXIT_AND_WAIT([ovn-northd])
+    if test -d northd-backup; then
+        as northd-backup
+        OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
+    fi
 
     OVN_CLEANUP_VSWITCH([main])
 ])
@@ -69,10 +71,12 @@ m4_define([OVN_CLEANUP_AZ],[
     OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
     as $1/northd
-    OVS_APP_EXIT_AND_WAIT([ovn-northd])
+    OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
 
-    as $1/northd-backup
-    OVS_APP_EXIT_AND_WAIT([ovn-northd])
+    if test -d $1/northd-backup; then
+        as $1/northd-backup
+        OVS_APP_EXIT_AND_WAIT([[$NORTHD_TYPE]])
+    fi
 
     as $1/ic
     OVS_APP_EXIT_AND_WAIT([ovn-ic])
@@ -134,15 +138,48 @@ ovn_init_ic_db () {
     ovn_init_db ovn-ic-sb
 }
 
-# ovn_start [AZ]
+# ovn_start_northd (primary|backup) [AZ]
+ovn_start_northd() {
+    local priority=$1
+    local AZ=$2
+    local msg_prefix=${AZ:+$AZ: }
+    local d_prefix=${AZ:+$AZ/}
+
+    local suffix=
+    case $priority in
+        backup) suffix=-backup ;;
+    esac
+
+    local northd_args=
+    case ${NORTHD_TYPE:=ovn-northd} in
+        ovn-northd) ;;
+        ovn-northd-ddlog) northd_args="--ddlog-record=${AZ:+$AZ/}replay$suffix.dat -v" ;;
+    esac
+
+    local name=${d_prefix}northd${suffix}
+    echo "${prefix}starting $name"
+    test -d "$ovs_base/$name" || mkdir "$ovs_base/$name"
+    as $name start_daemon $NORTHD_TYPE $northd_args -vjsonrpc \
+               --ovnnb-db=$OVN_NB_DB --ovnsb-db=$OVN_SB_DB
+}
+
+# ovn_start [--no-backup-northd] [AZ]
 #
 # Creates and initializes ovn-sb and ovn-nb databases and starts their
 # ovsdb-server instance, sets appropriate environment variables so that
 # ovn-sbctl and ovn-nbctl use them by default, and starts ovn-northd running
 # against them.
 ovn_start () {
-    if test -n "$1"; then
-        mkdir "$ovs_base"/$1
+    local backup_northd=:
+    case $1 in
+        --no-backup-northd) backup_northd=false; shift ;;
+    esac
+    local AZ=$1
+    local msg_prefix=${AZ:+$AZ: }
+    local d_prefix=${AZ:+$AZ/}
+
+    if test -n "$AZ"; then
+        mkdir "$ovs_base"/$AZ
     fi
 
     ovn_init_db ovn-sb $1; ovn-sbctl init
@@ -150,36 +187,19 @@ ovn_start () {
     if test -n "$1"; then
         ovn-nbctl set NB_Global . name=$1
     fi
-    local ovn_sb_db=$OVN_SB_DB
-    local ovn_nb_db=$OVN_NB_DB
 
-    local as_d=northd
-    if test -n "$1"; then
-        as_d=$1/$as_d
+    ovn_start_northd primary $AZ
+    if $backup_northd; then
+        ovn_start_northd backup $AZ
     fi
-    echo "starting ovn-northd"
-    mkdir "$ovs_base"/$as_d
-    as $as_d start_daemon ovn-northd -v \
-               --ovnnb-db=$ovn_nb_db \
-               --ovnsb-db=$ovn_sb_db
 
-    as_d=northd-backup
-    if test -n "$1"; then
-        as_d=$1/$as_d
-    fi
-    echo "starting backup ovn-northd"
-    mkdir "$ovs_base"/$as_d
-    as $as_d start_daemon ovn-northd -v \
-               --ovnnb-db=$ovn_nb_db \
-               --ovnsb-db=$ovn_sb_db
+    if test -n "$AZ"; then
+        ovn-nbctl --wait=sb sync || exit $?
 
-    if test -n "$1"; then
-        as_d=$1/ic
-        echo "starting ovn-ic"
-        mkdir "$ovs_base"/$as_d
-        as $as_d start_daemon ovn-ic -v \
-               --ovnnb-db=$ovn_nb_db \
-               --ovnsb-db=$ovn_sb_db \
+        echo "${msg_prefix}starting ovn-ic"
+        mkdir "$ovs_base"/$d_prefix/ic
+        as $d_prefix/ic start_daemon ovn-ic -v \
+               --ovnnb-db=$OVN_NB_DB --ovnsb-db=$OVN_SB_DB \
                --ic-nb-db=unix:"$ovs_base"/ovn-ic-nb/ovn-ic-nb.sock \
                --ic-sb-db=unix:"$ovs_base"/ovn-ic-sb/ovn-ic-sb.sock
     fi
@@ -420,3 +440,9 @@ wait_column() {
 OVS_END_SHELL_HELPERS
 
 m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])])
+
+m4_define([OVN_FOR_EACH_NORTHD], [dnl
+m4_pushdef([NORTHD_TYPE], [ovn-northd])dnl
+$1
+m4_popdef([NORTHD_TYPE])dnl
+])
diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index ef77c53181e6..470a1ec90888 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -1,4 +1,6 @@
 AT_BANNER([OVN northd])
+
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check from NBDB to SBDB])
 ovn_start
 
@@ -65,7 +67,9 @@ check_row_count Gateway_Chassis 0
 check_row_count Ha_Chassis_Group 0
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check up state of VIF LSP])
 ovn_start
 
@@ -78,7 +82,9 @@ ovn-sbctl lsp-bind S1-vm1 hv1
 wait_row_count nb:Logical_Switch_Port 1 name=S1-vm1 'up=true'
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check up state of router LSP linked to a distributed LR])
 ovn_start
 
@@ -93,7 +99,9 @@ ovn-nbctl --wait=sb lsp-set-options S1-R1 router-port=R1-S1
 AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check up state of router LSP linked to a gateway LR])
 ovn_start
 
@@ -112,7 +120,9 @@ ovn-sbctl lsp-bind S1-R1 gw1
 AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check up state of router LSP linked to an LRP with set Gateway Chassis])
 ovn_start
 
@@ -130,7 +140,9 @@ ovn-nbctl --wait=sb lsp-set-options S1-R1 router-port=R1-S1
 AT_CHECK([test x`ovn-nbctl lsp-get-up S1-R1` = xup])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check IPv6 RA config propagation to SBDB])
 ovn_start
 
@@ -240,14 +252,16 @@ AT_CHECK_UNQUOTED([ovn-sbctl get Port_Binding ${uuid} options:ipv6_ra_prefixes],
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- test unixctl])
 ovn_init_db ovn-sb; ovn-sbctl init
 ovn_init_db ovn-nb; ovn-nbctl init
 
 # test unixctl option
 mkdir "$ovs_base"/northd
-as northd start_daemon ovn-northd --unixctl="$ovs_base"/northd/ovn-northd.ctl --ovnnb-db=unix:"$ovs_base"/ovn-nb/ovn-nb.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock
+as northd start_daemon NORTHD_TYPE --unixctl="$ovs_base"/northd/NORTHD_TYPE[].ctl --ovnnb-db=unix:"$ovs_base"/ovn-nb/ovn-nb.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock
 ovn-nbctl ls-add sw
 ovn-nbctl --wait=sb lsp-add sw p1
 # northd created with unixctl option successfully created port_binding entry
@@ -255,7 +269,7 @@ check_row_count Port_Binding 1 logical_port=p1
 AT_CHECK([ovn-nbctl --wait=sb lsp-del p1])
 
 # ovs-appctl exit with unixctl option
-OVS_APP_EXIT_AND_WAIT_BY_TARGET(["$ovs_base"/northd/ovn-northd.ctl], ["$ovs_base"/northd/ovn-northd.pid])
+OVS_APP_EXIT_AND_WAIT_BY_TARGET(["$ovs_base"/northd/]NORTHD_TYPE[.ctl], ["$ovs_base"/northd/]NORTHD_TYPE[.pid])
 
 # Check no port_binding entry for new port as ovn-northd is not running
 #
@@ -266,7 +280,7 @@ AT_CHECK([ovn-nbctl --timeout=10 --wait=sb sync], [142], [], [ignore])
 check_row_count Port_Binding 0 logical_port=p2
 
 # test default unixctl path
-as northd start_daemon ovn-northd --ovnnb-db=unix:"$ovs_base"/ovn-nb/ovn-nb.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock
+as northd start_daemon NORTHD_TYPE --ovnnb-db=unix:"$ovs_base"/ovn-nb/ovn-nb.sock --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock
 ovn-nbctl --wait=sb lsp-add sw p3
 # northd created with default unixctl path successfully created port_binding entry
 check_row_count Port_Binding 1 logical_port=p3
@@ -276,10 +290,13 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 AT_CLEANUP
+])
+
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check HA_Chassis_Group propagation from NBDB to SBDB])
 ovn_start
 
@@ -617,71 +634,77 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ovn-northd pause and resume])
 ovn_start
 
-AT_CHECK([test xfalse = x`as northd ovn-appctl -t ovn-northd is-paused`])
-AT_CHECK([as northd ovn-appctl -t ovn-northd status], [0], [Status: active
-])
-AT_CHECK([test xfalse = x`as northd-backup ovn-appctl -t ovn-northd \
-is-paused`])
-AT_CHECK([as northd-backup ovn-appctl -t ovn-northd status], [0],
-[Status: standby
-])
+get_northd_status() {
+    as northd ovn-appctl -t NORTHD_TYPE is-paused
+    as northd ovn-appctl -t NORTHD_TYPE status
+    as northd-backup ovn-appctl -t NORTHD_TYPE is-paused
+    as northd-backup ovn-appctl -t NORTHD_TYPE status
+}
 
-ovn-nbctl ls-add sw0
+# Pause the backup, to force the main northd to become active (otherwise
+# there's no guarantee, ovn_start is racy).
+check as northd-backup ovs-appctl -t NORTHD_TYPE pause
+OVS_WAIT_FOR_OUTPUT([get_northd_status], [0], [false
+Status: active
+true
+Status: paused
+])
 
-OVS_WAIT_UNTIL([
-    ovn-sbctl lflow-list sw0
-    test 0 = $?])
+# Resume the backup.
+check as northd-backup ovs-appctl -t NORTHD_TYPE resume
+OVS_WAIT_FOR_OUTPUT([get_northd_status], [0], [false
+Status: active
+false
+Status: standby
+])
 
-ovn-nbctl ls-del sw0
-OVS_WAIT_UNTIL([
-    ovn-sbctl lflow-list sw0
-    test 1 = $?])
+# Check that ovn-northd is active, by verifying that it creates and
+# destroys southbound datapaths as one would expect.
+check_row_count Datapath_Binding 0
+check ovn-nbctl --wait=sb ls-add sw0
+check_row_count Datapath_Binding 1
+check ovn-nbctl --wait=sb ls-del sw0
+check_row_count Datapath_Binding 0
 
 # Now pause the ovn-northd
-as northd ovs-appctl -t ovn-northd pause
-as northd-backup ovs-appctl -t ovn-northd pause
-AT_CHECK([test xtrue = x`as northd ovn-appctl -t ovn-northd is-paused`])
-AT_CHECK([as northd ovn-appctl -t ovn-northd status], [0], [Status: paused
+check as northd ovs-appctl -t NORTHD_TYPE pause
+check as northd-backup ovs-appctl -t NORTHD_TYPE pause
+AT_CHECK([get_northd_status], [0], [true
+Status: paused
+true
+Status: paused
 ])
-AT_CHECK([test xtrue = x`as northd-backup ovn-appctl -t ovn-northd is-paused`])
-AT_CHECK([as northd-backup ovn-appctl -t ovn-northd status], [0],
-[Status: paused
-])
-
-ovn-nbctl ls-add sw0
 
-# There should be no logical flows for sw0 datapath.
-OVS_WAIT_UNTIL([
-    ovn-sbctl lflow-list sw0
-    test 1 = $?])
-
-# Now resume ovn-northd
-as northd ovs-appctl -t ovn-northd resume
-AT_CHECK([test xfalse = x`as northd ovn-appctl -t ovn-northd is-paused`])
-OVS_WAIT_UNTIL([as northd ovn-appctl -t ovn-northd status], [0],
-[Status: active
-])
+# Now ovn-northd won't respond by adding a datapath, because it's paused.
+check ovn-nbctl ls-add sw0
+sleep 5
+check_row_count Datapath_Binding 0
 
-as northd-backup ovs-appctl -t ovn-northd resume
-AT_CHECK([test xfalse = x`as northd-backup ovn-appctl -t ovn-northd \
-is-paused`])
-AT_CHECK([as northd-backup ovn-appctl -t ovn-northd status], [0],
-[Status: standby
+# Now resume ovn-northd!
+check as northd ovs-appctl -t NORTHD_TYPE resume
+check as northd-backup ovs-appctl -t NORTHD_TYPE resume
+OVS_WAIT_FOR_OUTPUT([get_northd_status], [0], [false
+Status: active
+false
+Status: standby
 ])
 
-OVS_WAIT_UNTIL([
-    ovn-sbctl lflow-list sw0
-    test 0 = $?])
+check ovn-nbctl --wait=sb sync
+check_row_count Datapath_Binding 1
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check Redirect Chassis propagation from NB to SB])
 ovn_start
 
@@ -704,7 +727,9 @@ wait_row_count Port_Binding 1 logical_port=cr-R1-S1 options:redirect-type=bridge
 ovn-nbctl lrp-set-redirect-type R1-S1 overlay
 wait_row_count Port_Binding 1 logical_port=cr-R1-S1 options:redirect-type=overlay
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check stateless dnat_and_snat rule])
 ovn_start
 
@@ -762,7 +787,9 @@ ovn-nbctl --wait=sb --stateless lr-nat-add R1 dnat_and_snat fd01::1 fd11::2
 check_flow_match_sets 2 0 0 0 0 2 2
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check portrange dnat, snat and dnat_and_snat rules])
 ovn_start
 
@@ -812,7 +839,9 @@ AT_CHECK([grep 'ct_[s]dnat.*172\.16\.1\.2.*3000' sbflows3], [1])
 ovn-nbctl lr-nat-del R1 dnat_and_snat  172.16.1.1
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check allowed/disallowed external dnat, snat and dnat_and_snat rules])
 ovn_start
 
@@ -1030,10 +1059,11 @@ AT_CHECK([ovn-sbctl dump-flows CR | grep lr_in_dnat | grep "ip4.dst == 172.16.1.
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check Load balancer health check and Service Monitor sync])
-ovn_start
-
+ovn_start NORTHD_TYPE
 check ovn-nbctl lb-add lb1 10.0.0.10:80 10.0.0.3:80,20.0.0.3:80
 
 check ovn-nbctl --wait=sb set load_balancer . ip_port_mappings:10.0.0.3=sw0-p1
@@ -1234,7 +1264,9 @@ ovn-nbctl --wait=sb lb-del lb2
 wait_row_count Service_Monitor 0
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer VIP in NAT entries])
 AT_SKIP_IF([test $HAVE_PYTHON = no])
 ovn_start
@@ -1275,7 +1307,9 @@ AT_CHECK([test 0 = $(grep lr_in_unsnat sbflows | \
 grep "ip4 && ip4.dst == 192.168.2.6 && tcp && tcp.dst == 8080" -c) ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DNAT force snat IP])
 ovn_start
 
@@ -1294,7 +1328,9 @@ AT_CHECK([ovn-sbctl lflow-list lr0 | grep lr_in_unsnat], [0], [dnl
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check reconcile stale Datapath_Binding])
 ovn_start
 
@@ -1320,7 +1356,9 @@ echo nb_uuid="$nb_uuid" lr_uuid="$lr_uuid"
 AT_CHECK([test "${nb_uuid}" = "${lr_uuid}"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check reconcile stale tunnel keys])
 ovn_start
 
@@ -1342,7 +1380,9 @@ check_column 1 Port_Binding tunnel_key logical_port=lsp1
 check_column 2 Port_Binding tunnel_key logical_port=lsp2
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check reconcile stale Ha_Chassis_Group])
 ovn_start
 
@@ -1368,7 +1408,9 @@ AT_CHECK([ovn-nbctl --wait=sb sync], [0])
 check_row_count HA_Chassis_Group 0
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check NB/SB Port_Group translation (lsp add/del)])
 ovn_start
 
@@ -1416,7 +1458,9 @@ ovn-nbctl --wait=sb clear Port_Group pg_test ports
 AT_CHECK([test 0 = $(ovn-sbctl --columns _uuid list Port_Group | grep uuid -c)])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check NB/SB Port_Group translation (ls del)])
 ovn_start
 
@@ -1441,7 +1485,9 @@ wait_row_count Port_Group 1
 check_row_count Port_Group 1 name=${ls2_key}_pg_test
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check router ARP/NS responder])
 ovn_start
 
@@ -1603,6 +1649,7 @@ action=(eth.dst = eth.src; eth.src = 00:00:00:00:00:02; arp.op = 2; /* ARP reply
 AT_CHECK([ovn-sbctl lflow-list | grep "xreg0\[[0..47\]]" | grep -vE 'lr_in_admission|lr_in_ip_input'], [1], [])
 
 AT_CLEANUP
+])
 
 # This test case tests that when a logical switch has load balancers associated
 # (with VIPs configured), the below logical flow is added by ovn-northd.
@@ -1616,6 +1663,7 @@ AT_CLEANUP
 # So make sure that the above lflow is added even if one load balancer has VIP
 # associated.
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer - missing ls_out_pre_lb flows])
 ovn_start
 
@@ -1676,7 +1724,9 @@ AT_CHECK([ovn-sbctl lflow-list | grep "ls_out_pre_lb.*priority=100" | grep reg0
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ignore_lsp_down])
 ovn_start
 
@@ -1690,7 +1740,9 @@ ovn-nbctl --wait=sb set NB_Global . options:ignore_lsp_down=true
 AT_CHECK([ovn-sbctl lflow-list | grep arp | grep 10\.0\.0\.1], [0], [ignore])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn-northd -- reject ACL])
 ovn_start
 
@@ -1810,9 +1862,10 @@ action=(ct_commit { ct_label.blocked = 1; };  reg0 = 0; reject { /* eth.dst <->
 match=((reg0[[9]] == 1) && outport == @pg0 && ip6 && udp), dnl
 action=(reg0 = 0; reject { /* eth.dst <-> eth.src; ip.dst <-> ip.src; is implicit. */ outport <-> inport; next(pipeline=ingress,table=21); };)
 ])
-
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL fair Meters])
 AT_KEYWORDS([acl log meter fair])
 ovn_start
@@ -1909,7 +1962,9 @@ check_meter_by_name meter_me
 check_meter_by_name NOT meter_me__${acl1} meter_me__${acl2}
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([datapath requested-tnl-key])
 AT_KEYWORDS([requested tnl tunnel key keys])
 ovn_start
@@ -1957,6 +2012,7 @@ AT_CHECK([test $ls2 = 3])
 AT_CLEANUP
 ])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([port requested-tnl-key])
 AT_KEYWORDS([requested tnl tunnel key keys])
 ovn_start
@@ -2099,3 +2155,4 @@ ovn-nbctl --wait=sb lb-del lb1
 check_column "$lb0_uuid" sb:datapath_binding load_balancers external_ids:name=sw1
 
 AT_CLEANUP
+])
diff --git a/tests/ovn.at b/tests/ovn.at
index 5b7a64cde192..37dbd87532fb 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -1827,6 +1827,7 @@ AT_CLEANUP
 AT_BANNER([OVN end-to-end tests])
 
 # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 3 HVs, 1 LS, 3 lports/HV])
 AT_KEYWORDS([ovnarp])
 ovn_start
@@ -2106,9 +2107,11 @@ done
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
 # 2 hypervisors, one logical switch, 2 logical ports per hypervisor
 # logical ports bound to chassis encap-ip.
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 1 LS, 2 lports/HV])
 AT_KEYWORDS([ovnarp])
 ovn_start
@@ -2261,7 +2264,9 @@ done
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- trace 1 LS, 3 LSPs])
 ovn_start
 
@@ -2488,10 +2493,12 @@ for s in 1 2 3; do
 done
 
 AT_CLEANUP
+])
 
 # 2 hypervisors, 4 logical ports per HV
 # 2 locally attached networks (one flat, one vlan tagged over same device)
 # 2 ports per HV on each network
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 4 lports/HV, localnet ports])
 ovn_start
 
@@ -2684,7 +2691,9 @@ done
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 LS, routing works for multiple collocated segments attached to different switches])
 ovn_start
 
@@ -2813,7 +2822,9 @@ done
 OVN_CLEANUP([hv-1],[hv-2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 LS, broadcast traffic with multiple localnet ports per switch])
 ovn_start
 
@@ -2950,7 +2961,9 @@ done
 OVN_CLEANUP([hv-1],[hv-2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 LS, switching between multiple localnet ports with same tags])
 ovn_start
 
@@ -3074,7 +3087,9 @@ done
 OVN_CLEANUP([hv-1],[hv-2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- VLAN transparency, passthru=true])
 ovn_start
 
@@ -3121,7 +3136,9 @@ for i in 1 2; do
 done
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- VLAN transparency, passthru=false])
 ovn_start
 
@@ -3166,7 +3183,9 @@ for i in 1 2; do
 done
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 1 LS, no switching between multiple localnet ports with different tags])
 ovn_start
 
@@ -3280,7 +3299,9 @@ done
 OVN_CLEANUP([hv-10-1],[hv-10-2],[hv-20-1],[hv-20-2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS])
 AT_KEYWORDS([vtep])
 ovn_start
@@ -3478,8 +3499,10 @@ OVN_CLEANUP([hv1],[hv2],[vtep])
 OVN_CLEANUP_VSWITCH([hv3])
 
 AT_CLEANUP
+])
 
 # Similar test to "hardware GW"
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 3 HVs, 1 VIFs/HV, 1 software GW, 1 LS])
 ovn_start
 
@@ -3626,8 +3649,10 @@ for i in 1 2 3; do
     OVN_CHECK_PACKETS([hv$i/vif$i-tx.pcap], [$i.expected])
 done
 AT_CLEANUP
+])
 
 # 3 hypervisors, 3 logical switches with 3 logical ports each, 1 logical router
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 3 HVs, 3 LS, 3 lports/LS, 1 LR])
 ovn_start
 
@@ -4051,7 +4076,9 @@ OVS_WAIT_UNTIL([check_packets], [$at_diff -F'^---' expected received])
 OVN_CLEANUP([hv1], [hv2], [hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IP relocation using GARP request])
 ovn_start
 
@@ -4264,8 +4291,10 @@ done
 OVN_CLEANUP([hv1], [hv2])
 
 AT_CLEANUP
+])
 
 # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- portsecurity : 3 HVs, 1 LS, 3 lports/HV])
 ovn_start
 
@@ -4660,7 +4689,9 @@ done
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 LS, 1 lport/LS, 2 peer LRs])
 ovn_start
 
@@ -4804,8 +4835,9 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 1 HV, 1 LS, 2 lport/LS, 1 LR])
 AT_KEYWORDS([router-admin-state])
 ovn_start
@@ -4912,8 +4944,9 @@ OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 1 HV, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([router-admin-state])
 ovn_start
@@ -5025,7 +5058,9 @@ OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 3 LS, 1 lport/LS, 2 peer LRs, static routes])
 ovn_start
 
@@ -5173,7 +5208,9 @@ OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send gratuitous arp on localnet])
 ovn_start
 ovn-nbctl ls-add lsw0
@@ -5226,7 +5263,9 @@ AT_CHECK([ovn-nbctl lsp-del ln_port])
 OVN_CLEANUP([hv])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 3 LRs connected via LS, static routes])
 ovn_start
 
@@ -5398,7 +5437,9 @@ OVN_CHECK_PACKETS([hv1/vif2-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- dhcpv4 : 1 HV, 2 LS, 2 LSPs/LS])
 ovn_start
 
@@ -6057,10 +6098,10 @@ compare_dhcp_packets 1
 
 # Stop ovn-northd so that we can modify the northd_version.
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as northd-backup
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 northd_version=$(ovn-sbctl get SB_Global . options:northd_internal_version | sed s/\"//g)
 echo "northd version = $northd_version"
@@ -6112,7 +6153,9 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- dhcpv6 : 1 HV, 2 LS, 5 LSPs])
 ovn_start
 
@@ -6383,7 +6426,9 @@ AT_CHECK([cat 5.packets | cut -c 1-120,125- ], [0], [expout])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 LRs connected via LS, gateway router])
 ovn_start
 
@@ -6554,7 +6599,9 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([router-icmp-reply])
 ovn_start
@@ -6696,7 +6743,9 @@ done
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- policy-based routing: 1 HVs, 2 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([policy-based-routing])
 ovn_start
@@ -6884,7 +6933,9 @@ OVN_CHECK_PACKETS([pbr-hv/vif3-tx.pcap], [3.expected])
 
 OVN_CLEANUP([pbr-hv])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- policy-based routing IPv6: 1 HVs, 3 LSs, 1 lport/LS, 1 LR])
 AT_KEYWORDS([policy-based-routing])
 ovn_start
@@ -7074,7 +7125,9 @@ OVN_CHECK_PACKETS([pbr-hv/vif3-tx.pcap], [3.expected])
 
 OVN_CLEANUP([pbr-hv])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # 1 hypervisor, 1 port
 # make sure that the port state is properly set to up and back down
 # when created and deleted.
@@ -7099,7 +7152,9 @@ OVS_WAIT_UNTIL([test x`ovn-nbctl lsp-get-up lp1` = xdown])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # 1 hypervisor, 1 port
 # make sure that the OF rules created to support a datapath are added/cleared
 # when logical switch is created and removed.
@@ -7166,7 +7221,9 @@ test_datapath_in_of_rules 0 "after lport+ls removal"
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- nd_na ])
 ovn_start
 
@@ -7237,7 +7294,9 @@ done
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- address sets modification/removal smoke test])
 ovn_start
 
@@ -7264,7 +7323,9 @@ AT_CHECK([ovs-appctl -t ovn-controller version], [0], [ignore])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ipam])
 ovn_start
 
@@ -7571,13 +7632,11 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
-
-as northd-backup
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
-
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ipam connectivity])
 ovn_start
 
@@ -7701,7 +7760,9 @@ AT_CHECK([cat received2.packets], [0], [expout])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ovs-vswitchd restart])
 AT_KEYWORDS([vswitchd])
 ovn_start
@@ -7795,7 +7856,9 @@ OVS_WAIT_UNTIL([
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send arp for nexthop])
 ovn_start
 
@@ -7900,7 +7963,9 @@ cat packets
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send gratuitous arp for nat ips in localnet])
 ovn_start
 # Create logical switch
@@ -7953,7 +8018,9 @@ fffffffffffff0000000000108060001080006040001f00000000001c0a80002000000000000c0a8
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send gratuitous arp with nat-addresses router in localnet])
 ovn_start
 # Create logical switch
@@ -8019,7 +8086,9 @@ AT_CHECK([sort packets], [0], [expout])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- delete mac bindings])
 ovn_start
 net_add n1
@@ -8050,7 +8119,9 @@ wait_row_count MAC_Binding 0
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- conntrack zone allocation])
 ovn_start
 
@@ -8103,7 +8174,9 @@ OVS_WAIT_UNTIL([test `ovs-ofctl dump-flows br-int table=0 | grep REG13 | wc -l`
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- tag allocation])
 ovn_start
 
@@ -8169,8 +8242,8 @@ check test "$c6_tag" != "$c3_tag"
 
 AS_BOX([restart northd and make sure tag allocation is stable]) 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
-start_daemon ovn-northd \
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
+start_daemon NORTHD_TYPE \
     --ovnnb-db=unix:"$ovs_base"/ovn-nb/ovn-nb.sock \
     --ovnsb-db=unix:"$ovs_base"/ovn-sb/ovn-sb.sock
 
@@ -8219,7 +8292,9 @@ AT_CHECK([ovn-nbctl lsp-get-tag local1], [0], [50
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- lsp deletion and broadcast-flow deletion on localnet])
 ovn_start
 ovn-nbctl ls-add lsw0
@@ -8288,8 +8363,9 @@ OVS_WAIT_UNTIL([test `ovs-vsctl show | grep "Port patch-br-int-to-ln_port" | wc
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL logging])
 AT_KEYWORDS([ovn])
 ovn_start
@@ -8394,8 +8470,9 @@ name="reject-flow", verdict=reject, severity=alert: tcp,vlan_tci=0x0000,dl_src=f
 
 OVN_CLEANUP([hv])
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL rate-limited logging])
 AT_KEYWORDS([ovn])
 ovn_start
@@ -8484,8 +8561,9 @@ AT_CHECK([ test $n_acl1 -gt $n_acl2 ], [0], [])
 
 OVN_CLEANUP([hv])
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- same meter used by multiple logical flows])
 AT_KEYWORDS([ovn])
 ovn_start
@@ -8539,8 +8617,9 @@ AT_CHECK([ovs-ofctl -O OpenFlow13 dump-meters br-int | grep meter], [1])
 
 OVN_CLEANUP([hv])
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DSCP marking and meter check])
 AT_KEYWORDS([ovn])
 ovn_start
@@ -8674,6 +8753,7 @@ AT_CHECK([as hv ovs-ofctl dump-meters br-int -O OpenFlow13 | grep meter | wc -l]
 
 OVN_CLEANUP([hv])
 AT_CLEANUP
+])
 
 AT_SETUP([ovn -- read-only sb db:ptcp access])
 
@@ -8868,6 +8948,7 @@ AT_CHECK([ovn-sbctl --db=ssl:127.0.0.1:$TCP_PORT \
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 AT_CLEANUP
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- nested containers])
 ovn_start
 
@@ -9134,7 +9215,9 @@ OVS_WAIT_UNTIL([test xdown = x$(ovn-nbctl lsp-get-up bar1)])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 3 HVs, 3 LRs connected via LS, source IP based routes])
 ovn_start
 
@@ -9331,7 +9414,9 @@ OVN_CHECK_PACKETS([hv3/vif1-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- dns lookup : 1 HV, 2 LS, 2 LSPs/LS])
 ovn_start
 
@@ -9769,7 +9854,9 @@ rm -f 2.expected
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 4 HV, 1 LS, 1 LR, packet test with HA distributed router gateway port])
 ovn_start
 
@@ -10018,7 +10105,9 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 OVN_CLEANUP([hv1],[gw1],[ext1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port])
 ovn_start
 
@@ -10231,7 +10320,9 @@ test_ip_packet gw2 gw1
 
 OVN_CLEANUP([hv1],[gw1],[gw2],[ext1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 1 LR with distributed router gateway port])
 ovn_start
 
@@ -10567,7 +10658,9 @@ check_row_count Port_Binding 0 logical_port=cr-alice
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send gratuitous arp for NAT rules on distributed router])
 ovn_start
 # Create logical switches
@@ -10705,10 +10798,12 @@ AT_CHECK([cat exp], [0], [expout])
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
 # VLAN traffic for external network redirected through distributed router
 # gateway port should use vlans(i.e input network vlan tag) across hypervisors
 # instead of tunneling.
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- vlan traffic for external network with distributed router gateway port])
 ovn_start
 
@@ -11018,7 +11113,9 @@ AT_CHECK([cat empty], [0], [])
 
 OVN_CLEANUP([hv1],[hv2],[hv3], [hv4])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IPv6 ND Router Solicitation responder])
 AT_KEYWORDS([ovn-nd_ra])
 ovn_start
@@ -11272,7 +11369,9 @@ AT_CHECK([cat 1.packets], [0], [])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- /32 router IP address])
 ovn_start
 
@@ -11365,7 +11464,9 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 1 lport/HV, localport ports])
 ovn_start
 
@@ -11486,7 +11587,9 @@ done
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 1 LR with HA distributed router gateway port])
 ovn_start
 
@@ -11991,7 +12094,9 @@ wait_row_count Port_Binding 1 logical_port=cr-outside chassis=$gw1_chassis
 OVN_CLEANUP([gw1],[gw2],[hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- send gratuitous ARP for NAT rules on HA distributed router])
 ovn_start
 ovn-nbctl ls-add ls0
@@ -12178,7 +12283,9 @@ AT_CHECK([grep $garp hv2_br_phys_tx | sort], [0], [])
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ensure one gw controller restart in HA doesn't bounce the master])
 ovn_start
 
@@ -12265,7 +12372,9 @@ wait_row_count Port_Binding 1 logical_port=cr-outside chassis=$gw1_chassis
 OVN_CLEANUP([gw1],[gw2],[hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IPv6 Neighbor Solicitation for unknown MAC])
 AT_KEYWORDS([ovn-nd_ns for unknown mac])
 ovn_start
@@ -12492,7 +12601,9 @@ AT_CHECK([cat 2.packets], [0], [])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- options:requested-chassis for logical port])
 ovn_start
 
@@ -12571,7 +12682,9 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep output], [1], [])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- options:requested-chassis with hostname])
 
 ovn_start
@@ -12609,7 +12722,9 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=65 | grep output], [1], [])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IPv6 periodic RA])
 ovn_start
 
@@ -12797,7 +12912,9 @@ ra_test 000005dc 48 $dns_addr $dnssl $route_info c0 40 aef0000000000000000000000
 
 OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL reject rule test])
 AT_KEYWORDS([acl-reject])
 ovn_start
@@ -12937,7 +13054,9 @@ done
 
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Port Groups])
 AT_KEYWORDS([ovnpg])
 ovn_start
@@ -13159,7 +13278,9 @@ done
 # Gracefully terminate daemons
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACLs on Port Groups])
 AT_KEYWORDS([ovnpg_acl])
 ovn_start
@@ -13408,7 +13529,9 @@ done
 # Gracefully terminate daemons
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Address Set generation from Port Groups (static addressing)])
 ovn_start
 
@@ -13446,7 +13569,9 @@ check_column '10.0.0.11 10.0.0.2' Address_Set addresses name=pg1_ip4
 check_column '2001:db8::11 2001:db8::2' Address_Set addresses name=pg1_ip6
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Address Set generation from Port Groups (dynamic addressing)])
 ovn_start
 
@@ -13510,7 +13635,9 @@ AT_CHECK(
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL conjunction])
 ovn_start
 
@@ -13721,7 +13848,9 @@ grep conjunction.*conjunction.*conjunction | wc -l`])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Superseding ACLs with conjunction])
 ovn_start
 
@@ -13935,8 +14064,10 @@ priority=1003,ip,metadata=0x1,nw_src=10.0.0.42 actions=conjunction()
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
 # 3 hypervisors, one logical switch, 3 logical ports per hypervisor
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- L2 Drop and Allow ACL w/ Stateful ACL])
 ovn_start
 
@@ -14140,7 +14271,9 @@ OVS_WAIT_UNTIL([check_packets], [$at_diff -F'^---' expected received])
 OVN_CLEANUP([hv1],[hv2],[hv3])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- TTL exceeded])
 AT_KEYWORDS([ttl-exceeded])
 ovn_start
@@ -14232,7 +14365,9 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [vif1.expected])
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- router port unreachable])
 AT_KEYWORDS([router-port-unreachable])
 ovn_start
@@ -14379,7 +14514,9 @@ OVN_CHECK_PACKETS([hv2/vif2-tx.pcap], [vif2.expected])
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ovn-controller exit])
 ovn_start
 # Logical network:
@@ -14469,7 +14606,9 @@ as hv2 start_daemon ovn-controller
 
 OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- external logical port])
 ovn_start
 
@@ -15218,7 +15357,9 @@ OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 OVN_CLEANUP([hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Address Set Incremental Processing])
 AT_KEYWORDS([ovn_as_inc])
 ovn_start
@@ -15296,7 +15437,9 @@ done
 # Gracefully terminate daemons
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ovn-controller restart])
 ovn_start
 
@@ -15388,10 +15531,10 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected2])
 as hv2 start_daemon ovn-controller
 
 OVN_CLEANUP([hv1],[hv2])
-
-
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ovn-nbctl duplicate addresses])
 ovn_start
 
@@ -15447,7 +15590,9 @@ AT_CHECK([ovn-nbctl lsp-set-addresses sw2-p1 "00:00:00:00:00:04 192.168.0.3"])
 AT_CHECK([ovn-nbctl lsp-set-addresses sw2-p1 "00:00:00:00:00:04 aef0::1"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- router - check packet length - icmp defrag])
 AT_KEYWORDS([check packet length])
 ovn_start
@@ -15683,7 +15828,9 @@ done
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IP packet buffering])
 AT_KEYWORDS([ip-buffering])
 ovn_start
@@ -15861,7 +16008,9 @@ OVN_CHECK_PACKETS([hv2/vif1-tx.pcap], [expected])
 
 OVN_CLEANUP([hv1],[hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- neighbor update on same HV])
 ovn_start
 
@@ -15964,7 +16113,9 @@ fffffffffffff0000000010108060001080006040001f00000000101ac1804dd000000000000ac18
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ipam to non-ipam])
 ovn_start
 
@@ -15984,7 +16135,9 @@ ovn-nbctl get Logical-Switch-Port p0 dynamic_addresses
 AT_CHECK([ovn-nbctl get Logical-Switch-Port p0 dynamic_addresses], [0], [[[]]
 ])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ipam router ports])
 ovn_start
 
@@ -16005,7 +16158,9 @@ ovn-nbctl list logical_switch_port
 ovn-nbctl list logical_router_port
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- test transport zones])
 ovn_start
 
@@ -16165,7 +16320,9 @@ ovn-hv4-0
 
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 HVs, 2 lports/HV, localnet ports, DVR chassis mac])
 ovn_start
 
@@ -16366,7 +16523,9 @@ OVN_CHECK_PACKETS([hv2/vif22-tx.pcap], [vif22.expected])
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- virtual ports])
 AT_KEYWORDS([virtual ports])
 ovn_start
@@ -16706,7 +16865,9 @@ AT_CHECK([grep lr_in_arp_resolve lr0-flows8 | grep "reg0 == 10.0.0.10"], [1])
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # Run ovn-nbctl in daemon mode, change to a backup database and verify that
 # an insert operation is not allowed.
 AT_SETUP([ovn -- can't write to a backup database server instance])
@@ -16727,7 +16888,9 @@ AT_CHECK([ovn-nbctl ls-add sw1], [1], [ignore],
 ])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- controller event])
 AT_KEYWORDS([ovn_controller_event])
 ovn_start
@@ -16864,7 +17027,9 @@ AT_CHECK_UNQUOTED([ovn-sbctl get controller_event $uuid event_info:load_balancer
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IGMP snoop/querier/relay])
 ovn_start
 
@@ -17528,7 +17693,9 @@ wait_row_count IGMP_Group 1 address=239.0.1.42
 
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- MLD snoop/querier/relay])
 ovn_start
 
@@ -18231,7 +18398,9 @@ OVS_WAIT_UNTIL(
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- unixctl socket])
 ovn_start
 
@@ -18250,7 +18419,7 @@ on_exit 'kill $(cat ovn-nbctl.pid)'
 AT_CHECK([ovn-nbctl -u $sockfile show])
 
 AT_CLEANUP
-
+])
 
 m4_define([DVR_N_S_ARP_HANDLING],
   [OVN_FOR_EACH_NORTHD([
@@ -18823,6 +18992,7 @@ m4_define([DVR_N_S_PING],
 DVR_N_S_PING([geneve])
 DVR_N_S_PING([vxlan])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ARP lookup before learning])
 AT_KEYWORDS([virtual ports])
 ovn_start
@@ -19039,7 +19209,9 @@ AT_CHECK([test 4 = `cat hv1/ovn-controller.log | grep NXT_PACKET_IN2 | wc -l`])
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 1 HVs, 1 lport/HV, localnet ports, RARP])
 ovn_start
 
@@ -19101,7 +19273,9 @@ grep 101 | wc -l`])
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Stateless Floating IP])
 ovn_start
 
@@ -19399,7 +19573,9 @@ as hv4 ovs-appctl fdb/show br-phys
 
 OVN_CLEANUP([hv1],[hv2],[hv3],[hv4])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer health checks])
 AT_KEYWORDS([lb])
 ovn_start
@@ -19592,7 +19768,9 @@ wait_row_count Service_Monitor 0 status=online
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- SCTP Load balancer health checks])
 AT_KEYWORDS([lb sctp])
 
@@ -19704,10 +19882,12 @@ check_row_count Service_Monitor 0
 # Let's also be sure the warning message about SCTP load balancers is
 # is in the ovn-northd log
 
-AT_CHECK([test 1 = `grep -c "SCTP load balancers do not currently support health checks" northd/ovn-northd.log`])
+AT_CHECK([test 1 = `grep -c "SCTP load balancers do not currently support health checks" northd/NORTHD_TYPE.log`])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ARP/ND request broadcast limiting])
 ovn_start
 
@@ -20171,7 +20351,9 @@ OVS_WAIT_UNTIL([
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- trace when flow cookie updated])
 AT_KEYWORDS([cookie])
 ovn_start
@@ -20206,7 +20388,9 @@ AT_CHECK([ovn-trace --ovs lsw0 'inport == "lp1" && eth.type == 0x1234' | grep "d
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- interconnection])
 ovn_init_ic_db
 n_az=5
@@ -20389,8 +20573,9 @@ done
 OVN_CLEANUP_IC
 
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ECMP static routes])
 ovn_start
 
@@ -20493,7 +20678,9 @@ done
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- forwarding group: 3 HVs, 1 LR, 2 LS])
 AT_KEYWORDS([forwarding-group])
 ovn_start
@@ -20613,7 +20800,9 @@ AT_CHECK([as hv1 ovs-ofctl -O OpenFlow13 dump-groups br-int | \
 
 OVN_CLEANUP([hv1], [hv2], [hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load Balancer LS hairpin])
 ovn_start
 
@@ -20771,7 +20960,9 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [expected])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Big Load Balancer])
 ovn_start
 
@@ -20800,7 +20991,9 @@ AT_CHECK([test 2287 = `ovs-ofctl dump-group-stats br-int | grep -o bucket | wc -
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Bind existing VIF])
 net_add n1
 sim_add hv1
@@ -20832,7 +21025,9 @@ OVS_WAIT_UNTIL([as hv1 ovs-ofctl dump-flows br-int | grep -E "table=8.*metadata=
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Release stale port binding])
 net_add n1
 sim_add hv1
@@ -20856,7 +21051,9 @@ OVS_WAIT_UNTIL([test 0 = $(ovn-sbctl show | grep Port_Binding -c)], [0])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Logical router policy packet marking])
 ovn_start
 
@@ -21158,7 +21355,9 @@ match=(ip6), action=(next;)
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- normalized lrp-add])
 ovn_start
 
@@ -21167,7 +21366,9 @@ ovn-nbctl lrp-add r1 rp1 CC:DD:EE:EE:DD:CC AEF0::1/64 BEF0::1/64
 
 AT_CHECK([ovn-nbctl --may-exist lrp-add r1 rp1 cc:dd:ee:ee:dd:cc bef0:0000:0000:0000::1/64 aef0::1/64])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- normalized lr-nat-add])
 ovn_start
 
@@ -21178,7 +21379,9 @@ ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1
 AT_CHECK([ovn-nbctl --may-exist lr-nat-add r1 snat aef0:0000::1 beef:0000::/ffff:ffff:ffff:ffff::0])
 AT_CHECK([ovn-nbctl --may-exist lr-nat-add r1 dnat aef0:0000:00::1 beef::0001])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- normalized lr-nat-del])
 ovn_start
 
@@ -21189,7 +21392,9 @@ ovn-nbctl lr-nat-add r1 dnat AEF0::1 BEEF::1
 AT_CHECK([ovn-nbctl --if-exists lr-nat-del r1 snat beef:0000::0/ffff:ffff:ffff:ffff::0])
 AT_CHECK([ovn-nbctl --if-exists lr-nat-del r1 dnat aef0:0000:00::1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer selection fields])
 AT_KEYWORDS([lb])
 ovn_start
@@ -21340,7 +21545,9 @@ OVS_WAIT_UNTIL([
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- controller I-P handling with monitoring disabled])
 ovn_start
 
@@ -21448,7 +21655,9 @@ AT_CHECK([test "$hv2_offlows" = "$hv2_offlows_mon"])
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- controller I-P handling when lrp added last])
 
 ovn_start
@@ -21524,7 +21733,9 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [hv1-vif1.expected])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # When a lport is released on a chassis, ovn-controller was
 # not clearing some of the flowss in the table 33.
 # Make sure that those flows are cleared properly.
@@ -21627,7 +21838,9 @@ AT_CHECK([test ! -z $p1_zoneid])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Symmetric ECMP reply flows])
 ovn_start
 
@@ -21750,7 +21963,9 @@ AT_CHECK([
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # Test option:dynamic_neigh_routers. No static neighbor flows when enabled, and
 # traffic should still work, with the help of dynamic mac_bindings.
 AT_SETUP([ovn -- Dynamic neighbor between LRs])
@@ -21858,7 +22073,9 @@ AT_CHECK([ovn-sbctl find mac ip=10.0.0.2 mac='"00:00:00:00:03:02"' logical_port=
 OVN_CLEANUP([hv1],[hv2])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- lflow cache for conjunctions])
 ovn_start
 net_add n1
@@ -21993,7 +22210,9 @@ AT_CHECK([test 1 = $(as hv1 ovs-ofctl dump-flows br-int table=45 | grep -c "conj
 OVN_CLEANUP([hv1])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Delete Port_Binding and OVS port Incremental Processing])
 ovn_start
 
@@ -22031,8 +22250,10 @@ OVS_WAIT_UNTIL([test x$(as hv1 ovn-appctl -t ovn-controller debug/status) = "xru
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
 # Test dropping traffic destined to router owned IPs.
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- gateway router drop traffic for own IPs])
 ovn_start
 
@@ -22115,7 +22336,9 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep -E "table=21, n_packets=1,.*
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- nb_cfg timestamp])
 ovn_start
 
@@ -22211,7 +22434,9 @@ for i in $(seq 2 $n); do
 done
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ARP replies for SNAT external ips])
 ovn_start
 
@@ -22467,7 +22692,9 @@ test_arp_response 000030303233 $(ip_to_hex 172 16 0 201) hv1 hv2 hv3
 
 OVN_CLEANUP([hv1],[hv2],[hv3])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 # Duplicate ACLs (same match with same action) should work as expected.
 # Conflict ACLs (same match with different actions) behavior is unpredictable
 # (only one of them would work).
@@ -22586,6 +22813,7 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
 # This test cases tests a scenario of ACL confliction with address set update.
 # It is to cover a corner case when flows are re-processed in the I-P
@@ -22691,6 +22919,7 @@ OVN_CHECK_PACKETS([hv1/vif1-tx.pcap], [1.expected])
 OVN_CLEANUP([hv1])
 AT_CLEANUP
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- port bind/unbind change handling with conj flows - IPv6])
 ovn_start
 
@@ -22739,7 +22968,9 @@ grep conjunction | wc -l`])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- I-P of OVS interface changes which belong to non integration bridge])
 ovn_start
 
@@ -22782,6 +23013,7 @@ ovn-sbctl --columns chassis --bare list port_binding sw0-p2
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
 #
 # When multiple encap-ips are configued, make sure the
@@ -22792,6 +23024,7 @@ AT_CLEANUP
 # unchanged.
 #
 #
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multi-vtep SB Chassis encap updates])
 ovn_start
 
@@ -22827,7 +23060,9 @@ AT_CHECK([test "$encap_rec_mvtep" = "$encap_rec_mvtep1"], [0], [])
 
 OVN_CLEANUP([hv1])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load Balancer LS hairpin OF flows])
 ovn_start
 
@@ -23296,7 +23531,9 @@ OVS_WAIT_UNTIL(
 
 OVN_CLEANUP([hv1], [hv2])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- check ovn-northd and ovn-controller version pinning])
 ovn_start
 
@@ -23333,10 +23570,10 @@ AT_CHECK([grep -c $northd_version hv1/ovn-controller.log], [0], [1
 
 # Stop ovn-northd so that we can modify the northd_version.
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as northd-backup
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 check ovn-sbctl set SB_Global . options:northd_internal_version=foo
 
@@ -23443,3 +23680,4 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 AT_CLEANUP
+])
diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 05b17ebced88..d859750f4df6 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -3,10 +3,16 @@ AT_TESTED([ovs-vsctl])
 
 m4_include([m4/compat.m4])
 
-dnl Make AT_SETUP automatically run the ovs_init() shell function
-dnl as the first step in every test.
+dnl Make AT_SETUP automatically do some things for us:
+dnl - Run the ovs_init() shell function as the first step in every test.
+dnl - If NORTHD_TYPE is defined, then append it to the test name and
+dnl   set it as a shell variable as well.
 m4_rename([AT_SETUP], [OVS_AT_SETUP])
-m4_define([AT_SETUP], [OVS_AT_SETUP($@)
+m4_define([AT_SETUP],
+  [OVS_AT_SETUP($@[]m4_ifdef([NORTHD_TYPE], [ -- NORTHD_TYPE]))
+m4_ifdef([NORTHD_TYPE], [[NORTHD_TYPE]=NORTHD_TYPE
+AT_SKIP_IF([test $NORTHD_TYPE = ovn-northd-ddlog && test $TEST_DDLOG = no])
+])dnl
 ovs_init
 ])
 
@@ -312,9 +318,9 @@ dnl to exit.
 m4_define([OVS_APP_EXIT_AND_WAIT],
   [AT_CHECK([test -e $OVS_RUNDIR/$1.pid])
    TMPPID=$(cat $OVS_RUNDIR/$1.pid)
-   AT_CHECK(m4_if([$1],[ovs-vswitchd],
-                  [ovs-appctl --timeout=10 -t $1 exit --cleanup],
-                  [ovs-appctl --timeout=10 -t $1 exit]))
+   AT_CHECK([m4_if([$1],[ovs-vswitchd],
+                   [ovs-appctl --timeout=10 -t $1 exit --cleanup],
+                   [ovs-appctl --timeout=10 -t $1 exit])])
    OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
 
 dnl OVS_APP_EXIT_AND_WAIT_BY_TARGET(TARGET, PIDFILE)
@@ -324,7 +330,7 @@ dnl argument), and then wait for it to exit.
 m4_define([OVS_APP_EXIT_AND_WAIT_BY_TARGET],
   [AT_CHECK([test -e $2])
    TMPPID=$(cat $2)
-   AT_CHECK([ovs-appctl --timeout=10 --target=$1 exit])
+   AT_CHECK([ovs-appctl --timeout=10 --target=[$1] exit])
    OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
 
 dnl on_exit "COMMAND"
diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index d59f7c97ef9a..ee9ce332c4a7 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -1,5 +1,6 @@
 AT_BANNER([system-ovn])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, SNAT and DNAT])
 AT_KEYWORDS([ovnnat])
 
@@ -169,13 +170,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, SNAT and DNAT - IPv6])
 AT_KEYWORDS([ovnnat])
 
@@ -349,13 +352,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, easy SNAT])
 AT_KEYWORDS([ovnnat])
 
@@ -459,13 +464,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 LRs connected via LS, gateway router, easy SNAT - IPv6])
 AT_KEYWORDS([ovnnat])
 
@@ -571,13 +578,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, SNAT and DNAT])
 AT_KEYWORDS([ovnnat])
 
@@ -791,13 +800,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, SNAT and DNAT - IPv6])
 AT_KEYWORDS([ovnnat])
 
@@ -1019,13 +1030,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, SNAT and DNAT - Dual Stack])
 AT_KEYWORDS([ovnnat])
 
@@ -1341,8 +1354,9 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load-balancing])
 AT_KEYWORDS([ovnlb])
 
@@ -1583,12 +1597,14 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load-balancing - IPv6])
 AT_KEYWORDS([ovnlb])
 
@@ -1806,12 +1822,14 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load-balancing - same subnet.])
 AT_KEYWORDS([ovnlb])
 
@@ -1913,12 +1931,14 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load-balancing - same subnet. - IPv6])
 AT_KEYWORDS([ovnlb])
 
@@ -2022,12 +2042,14 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load balancing in gateway router])
 AT_KEYWORDS([ovnlb])
 
@@ -2221,13 +2243,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load balancing in gateway router - IPv6])
 AT_KEYWORDS([ovnlb])
 
@@ -2375,13 +2399,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, load-balancing])
 AT_KEYWORDS([ovnlb])
 
@@ -2544,13 +2570,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, load-balancing - IPv6])
 AT_KEYWORDS([ovnlb])
 
@@ -2715,13 +2743,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- multiple gateway routers, load-balancing - Dual Stack])
 AT_KEYWORDS([ovnlb])
 
@@ -2945,7 +2975,9 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load balancing in router with gateway router port])
 AT_KEYWORDS([ovnlb])
 
@@ -3080,13 +3112,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- load balancing in router with gateway router port - IPv6])
 AT_KEYWORDS([ovnlb])
 
@@ -3221,13 +3255,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DNAT and SNAT on distributed router - N/S])
 AT_KEYWORDS([ovnnat])
 
@@ -3400,13 +3436,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DNAT and SNAT on distributed router - N/S - IPv6])
 AT_KEYWORDS([ovnnat])
 
@@ -3556,13 +3594,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DNAT and SNAT on distributed router - E/W])
 AT_KEYWORDS([ovnnat])
 
@@ -3733,13 +3773,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- DNAT and SNAT on distributed router - E/W - IPv6])
 AT_KEYWORDS([ovnnat])
 
@@ -3915,13 +3957,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- 2 LSs IGMP and MLD])
 AT_SKIP_IF([test $HAVE_TCPDUMP = no])
 AT_KEYWORDS([ovnigmp])
@@ -4074,13 +4118,15 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer health checks])
 AT_KEYWORDS([lb])
 ovn_start
@@ -4275,7 +4321,7 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
@@ -4283,7 +4329,9 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /Service monitor not found.*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load Balancer LS hairpin IPv4])
 AT_SKIP_IF([test $HAVE_NC = no])
 AT_SKIP_IF([test $HAVE_TCPDUMP = no])
@@ -4363,7 +4411,9 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load Balancer LS hairpin IPv6])
 AT_SKIP_IF([test $HAVE_NC = no])
 AT_KEYWORDS([lb])
@@ -4441,8 +4491,9 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 AT_CLEANUP
+])
 
-
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ACL reject])
 AT_SKIP_IF([test $HAVE_NC = no])
 AT_KEYWORDS([lb])
@@ -4694,7 +4745,9 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- IPv6 prefix delegation])
 AT_SKIP_IF([test $HAVE_DIBBLER_SERVER = no])
 AT_SKIP_IF([test $HAVE_TCPDUMP = no])
@@ -4846,15 +4899,17 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
 /.*terminating with signal 15.*/d"])
 AT_CLEANUP
+])
 
 # Tests that when an established connection sends TCP reset,
 # the conntrack entry is not in established state.
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- conntrack TCP reset])
 AT_KEYWORDS([conntrack])
 ovn_start
@@ -4946,7 +5001,7 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
@@ -4954,7 +5009,9 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /Service monitor not found.*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- Load balancer for container ports])
 AT_SKIP_IF([test $HAVE_NC = no])
 AT_KEYWORDS([lb])
@@ -5072,11 +5129,13 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 
 AT_CLEANUP
+])
 
 # When a lport is released on a chassis, ovn-controller was
 # not clearing some of the flowss in the table 33 leading
 # to packet drops if ct() is hit.
 # Make sure that those flows are cleared properly.
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn --Test packet drops due to incorrect flows in physical table 33])
 AT_KEYWORDS([lb])
 
@@ -5157,14 +5216,16 @@ as ovn-nb
 OVS_APP_EXIT_AND_WAIT([ovsdb-server])
 
 as northd
-OVS_APP_EXIT_AND_WAIT([ovn-northd])
+OVS_APP_EXIT_AND_WAIT([NORTHD_TYPE])
 
 as
 OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ECMP symmetric reply])
 AT_KEYWORDS([ecmp])
 
@@ -5308,7 +5369,9 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /connection dropped.*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- controller I-P handling when ovs iface ofport is -1])
 
 ovn_start
@@ -5356,7 +5419,9 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/failed to query port patch-.*/d
 /could not open network device p1*/d"])
 
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- ARP resolution for SNAT IP])
 ovn_start
 OVS_TRAFFIC_VSWITCHD_START()
@@ -5445,7 +5510,9 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
 /.*terminating with signal 15.*/d"])
 AT_CLEANUP
+])
 
+OVN_FOR_EACH_NORTHD([
 AT_SETUP([ovn -- egress qos])
 AT_KEYWORDS([ovn-egress-qos])
 
@@ -5505,3 +5572,4 @@ as
 OVS_TRAFFIC_VSWITCHD_STOP(["/.*error receiving.*/d
 /.*terminating with signal 15.*/d"])
 AT_CLEANUP
+])
\ No newline at end of file
