git: 6ae89b2f152f - main - aft_python: fix incorrect ndp use

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Thu, 08 May 2025 13:10:47 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=6ae89b2f152f9770646bdd66e53df702b99eb0ad

commit 6ae89b2f152f9770646bdd66e53df702b99eb0ad
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-05-07 15:29:17 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-05-08 13:10:26 +0000

    aft_python: fix incorrect ndp use
    
    If we want to clear a flag we have to include '--' before the flag we clear,
    otherwise ndp will misparse our command (the getopt call will interpret it as
    another option, and reject it).
    
    This caused spurious errors at the end of every atf_python test case such as:
    
            ============================== 1 passed in 7.26s ===============================
            usage: ndp [-nt] hostname
                   ndp [-nt] -a | -c | -p | -r | -H | -P | -R
                   ndp [-nt] -A wait
                   ndp [-nt] -d hostname
                   ndp [-nt] -f filename
                   ndp [-nt] -i interface [flags...]
                   ndp [-nt] -I [interface|delete]
                   ndp [-nt] -s nodename etheraddr [temp] [proxy]
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 tests/atf_python/sys/net/vnet.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py
index 6da5f2625990..68c8ce4e0cba 100644
--- a/tests/atf_python/sys/net/vnet.py
+++ b/tests/atf_python/sys/net/vnet.py
@@ -134,7 +134,7 @@ class VnetInterface(object):
         self.run_cmd(cmd)
 
     def enable_ipv6(self):
-        cmd = "/usr/sbin/ndp -i {} -disabled".format(self.name)
+        cmd = "/usr/sbin/ndp -i {} -- -disabled".format(self.name)
         self.run_cmd(cmd)
 
     def has_tentative(self) -> bool: