<p></p>
<p><b>@miri64</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16228#discussion_r686636138">tests/gnrc_dhcpv6_client/tests-as-root/01-run.py</a>:</p>
<pre style='color:#555'>> +
+def check_ia_pd_addr(ia_pd_addr, global_pfx):
+    """Check if the expected IA_PD address has been assigned"""
+    return ia_pd_addr.startswith(global_pfx)
+
+
+def check_global_addrs(ia_na_addr, ia_pd_addr, global_pfx):
+    """Perform IA_NA check for the first and IA_PD for the second address"""
+    return check_ia_na_addr(ia_na_addr) and check_ia_pd_addr(ia_pd_addr, global_pfx)
+
+
+def test_global_addrs(global_addr_1, global_addr_2, global_pfx):
+    """Assert that one global address is the IA_NA and the other one is the IA_PD address"""
+    result_1 = check_global_addrs(global_addr_1, global_addr_2, global_pfx)
+    result_2 = check_global_addrs(global_addr_2, global_addr_1, global_pfx)
+    assert result_1 != result_2
</pre>
<p>Ahh now I get what you are trying to do</p>
<p>From my testing with</p>
<details><summary>this patch applied</summary>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/tests/gnrc_dhcpv6_client/kea-dhcp6.conf b/tests/gnrc_dhcpv6_client/kea-dhcp6.conf</span>
index 593edcb9d8..a2a8ab429c 100644
<span class="pl-md">--- a/tests/gnrc_dhcpv6_client/kea-dhcp6.conf</span>
<span class="pl-mi1">+++ b/tests/gnrc_dhcpv6_client/kea-dhcp6.conf</span>
<span class="pl-mdr">@@ -23,24 +23,9 @@</span>
     {    "interface": "tapbr0",
          "subnet": "2001:db8::/32",
          "pools": [ { "pool": "2001:db8:1::/64" } ],
<span class="pl-md"><span class="pl-md">-</span>         "pd-pools": [ { "prefix": "2001:db8::",</span>
<span class="pl-md"><span class="pl-md">-</span>                         "prefix-len": 32,</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>         "pd-pools": [ { "prefix": "2001:db8:8000::",</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                         "prefix-len": 33,</span>
                          "delegated-len": 64 } ] }
     ]
<span class="pl-md"><span class="pl-md">-</span>  },</span>
<span class="pl-md"><span class="pl-md">-</span>"Logging":</span>
<span class="pl-md"><span class="pl-md">-</span>{</span>
<span class="pl-md"><span class="pl-md">-</span>  "loggers": [</span>
<span class="pl-md"><span class="pl-md">-</span>    {</span>
<span class="pl-md"><span class="pl-md">-</span>      "name": "kea-dhcp6",</span>
<span class="pl-md"><span class="pl-md">-</span>      "output_options": [</span>
<span class="pl-md"><span class="pl-md">-</span>          {</span>
<span class="pl-md"><span class="pl-md">-</span>            "output": "stderr"</span>
<span class="pl-md"><span class="pl-md">-</span>          }</span>
<span class="pl-md"><span class="pl-md">-</span>      ],</span>
<span class="pl-md"><span class="pl-md">-</span>      "severity": "INFO",</span>
<span class="pl-md"><span class="pl-md">-</span>      "debuglevel": 0</span>
<span class="pl-md"><span class="pl-md">-</span>    }</span>
<span class="pl-md"><span class="pl-md">-</span>  ]</span>
<span class="pl-md"><span class="pl-md">-</span>}</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>  }</span>
 }
<span class="pl-c1">diff --git a/tests/gnrc_dhcpv6_client/tests-as-root/01-run.py b/tests/gnrc_dhcpv6_client/tests-as-root/01-run.py</span>
index 8dec38935c..4177708463 100755
<span class="pl-md">--- a/tests/gnrc_dhcpv6_client/tests-as-root/01-run.py</span>
<span class="pl-mi1">+++ b/tests/gnrc_dhcpv6_client/tests-as-root/01-run.py</span>
<span class="pl-mdr">@@ -57,12 +57,16 @@</span> def extract_global_addresses(child):
 
 def check_ia_na_addr(ia_na_addr):
     """Check if the expected IA_NA address has been assigned"""
<span class="pl-md"><span class="pl-md">-</span>    return IPv6Address(ia_na_addr) in IPv6Network("{}/64".format(IA_NA_ADDRESS_POOL_PREFIX))</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    res = IPv6Address(ia_na_addr) in IPv6Network("{}/64".format(IA_NA_ADDRESS_POOL_PREFIX))</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    print("check_ia_na_addr", ia_na_addr, res)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    return res</span>
 
 
 def check_ia_pd_addr(ia_pd_addr, global_pfx):
     """Check if the expected IA_PD address has been assigned"""
<span class="pl-md"><span class="pl-md">-</span>    return ia_pd_addr.startswith(global_pfx)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    res = ia_pd_addr.startswith(global_pfx)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    print("check_ia_pd_addr", ia_pd_addr, global_pfx, res)</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>    return res</span>
 
 
 def check_global_addrs(ia_na_addr, ia_pd_addr, global_pfx):
<span class="pl-mdr">@@ -72,7 +76,9 @@</span> def check_global_addrs(ia_na_addr, ia_pd_addr, global_pfx):
 
 def test_global_addrs(global_addr_1, global_addr_2, global_pfx):
     """Assert that one global address is the IA_NA and the other one is the IA_PD address"""
<span class="pl-mi1"><span class="pl-mi1">+</span>    print("result_1")</span>
     result_1 = check_global_addrs(global_addr_1, global_addr_2, global_pfx)
<span class="pl-mi1"><span class="pl-mi1">+</span>    print("result_2")</span>
     result_2 = check_global_addrs(global_addr_2, global_addr_1, global_pfx)
     assert result_1 != result_2</pre></div>
<p>(ignore the logging part removal that is because my kea is quite new and not understood by that version anymore)</p>
</details>
<p>I see, that the results could be</p>
<pre><code>assert {"ia_na_check": True, "ia_pd_check": True} != {"ia_na_check": False, "ia_pd_check": False}
</code></pre>
<p>(which makes more sense than <code>ia_pd_check</code> always being <code>False</code>), so the final check actually should be</p>
<div class="highlight highlight-source-python"><pre><span class="pl-k">assert</span> <span class="pl-s1">result_1</span>[<span class="pl-s">"ia_na_check"</span>] <span class="pl-c1">or</span> <span class="pl-s1">result_2</span>[<span class="pl-s">"ia_na_check"</span>]
<span class="pl-k">assert</span> <span class="pl-s1">result_1</span>[<span class="pl-s">"ia_pd_check"</span>] <span class="pl-c1">or</span> <span class="pl-s1">result_2</span>[<span class="pl-s">"ia_pd_check"</span>]</pre></div>
<p>I really recommend changing the prefix for PD (and maybe adopting the check to be similar to the PD one, as the IA_NA's prefix also ends up in the prefix list.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16228#discussion_r686636138">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYFZIYBEFB6RHRPBNNLT4I3MRANCNFSM4ZX5VNFA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYE2GI56WG45QY7B5JDT4I3MRA5CNFSM4ZX5VNFKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFNMJX3Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16228#discussion_r686636138",
"url": "https://github.com/RIOT-OS/RIOT/pull/16228#discussion_r686636138",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>