From 115df32c1696a16aee54471ba4cf7c1ef7d69c73 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 26 Mar 2025 19:01:35 +0100 Subject: [PATCH] differentiate between setup(n) and set(v) up --- NEWS | 2 +- src/client/conf-inv.c | 2 +- src/daemon/event.c | 8 ++++---- src/daemon/interfaces-bpf.c | 2 +- src/lib/lldpctl.h | 4 ++-- tests/integration/fixtures/namespaces.py | 2 +- tests/integration/fixtures/programs.py | 2 +- tests/integration/test_dot3.py | 2 +- tests/integration/test_interfaces.py | 14 +++++++------- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index d4105f28..4fb1e298 100644 --- a/NEWS +++ b/NEWS @@ -427,7 +427,7 @@ lldpd (0.7.7) + Add support for "team" driver (alternative to bond devices). + Preliminary support for DTrace/systemtap. + Preliminary support for seccomp (for monitor process). - + Setup chroot inside lldpd instead of relying on init script. + + Set up chroot inside lldpd instead of relying on init script. * Fixes: + Various bugs related to fixed point number handling (for coordinates in LLDP-MED) diff --git a/src/client/conf-inv.c b/src/client/conf-inv.c index b137a18c..f57df2f8 100644 --- a/src/client/conf-inv.c +++ b/src/client/conf-inv.c @@ -46,7 +46,7 @@ cmd_inventory(struct lldpctl_conn_t *conn, struct writer *w, struct cmd_env *env (!strcmp(action, "asset") && (lldpctl_atom_set_str(chassis, lldpctl_k_chassis_med_inventory_asset, cmdenv_get(env, "asset")) == NULL))) { - log_warnx("lldpctl", "Unable to setup inventory. %s", + log_warnx("lldpctl", "Unable to set up inventory. %s", lldpctl_last_strerror(conn)); lldpctl_atom_dec_ref(chassis); return 0; diff --git a/src/daemon/event.c b/src/daemon/event.c index 971500f2..f05bbe77 100644 --- a/src/daemon/event.c +++ b/src/daemon/event.c @@ -178,7 +178,7 @@ levent_snmp_update(struct lldpd *cfg) /* snmp_select_info() can be tricky to understand. We set `block` to 1 to means that we don't request a timeout. snmp_select_info() - will reset `block` to 0 if it wants us to setup a timeout. In + will reset `block` to 0 if it wants us to set up a timeout. In this timeout, `snmp_timeout()` should be invoked. Each FD in `fdset` will need to be watched for reading. If one of @@ -510,7 +510,7 @@ levent_send_now(struct lldpd *cfg) static void levent_init(struct lldpd *cfg) { - /* Setup libevent */ + /* Set up libevent */ log_debug("event", "initialize libevent"); event_set_log_callback(levent_log_cb); if (!(cfg->g_base = event_base_new())) @@ -518,7 +518,7 @@ levent_init(struct lldpd *cfg) log_info("event", "libevent %s initialized with %s method", event_get_version(), event_base_get_method(cfg->g_base)); - /* Setup SNMP */ + /* Set up SNMP */ #ifdef USE_SNMP if (cfg->g_snmp) { agent_init(cfg, cfg->g_snmp_agentx); @@ -539,7 +539,7 @@ levent_init(struct lldpd *cfg) fatalx("event", "unable to setup main timer"); event_active(cfg->g_main_loop, EV_TIMEOUT, 1); - /* Setup unix socket */ + /* Set up unix socket */ struct event *ctl_event; log_debug("event", "register Unix socket"); TAILQ_INIT(&lldpd_clients); diff --git a/src/daemon/interfaces-bpf.c b/src/daemon/interfaces-bpf.c index 2091eafb..5b87e621 100644 --- a/src/daemon/interfaces-bpf.c +++ b/src/daemon/interfaces-bpf.c @@ -45,7 +45,7 @@ ifbpf_phys_init(struct lldpd *cfg, struct lldpd_hardware *hardware) } buffer->len = ETHER_MAX_LEN + BPF_WORDALIGN(sizeof(struct bpf_hdr)); - /* Setup multicast */ + /* Set up multicast */ interfaces_setup_multicast(cfg, hardware->h_ifname, 0); hardware->h_sendfd = fd; /* Send */ diff --git a/src/lib/lldpctl.h b/src/lib/lldpctl.h index 6c293796..8fdfbba9 100644 --- a/src/lib/lldpctl.h +++ b/src/lib/lldpctl.h @@ -245,7 +245,7 @@ int lldpctl_release(lldpctl_conn_t *conn); */ /** - * Setup log handlers. + * Set up log handlers. * * By default, liblldpctl will log to stderr. The following function will * register another callback for this purpose. Messages logged through this @@ -255,7 +255,7 @@ int lldpctl_release(lldpctl_conn_t *conn); void lldpctl_log_callback(void (*cb)(int severity, const char *msg)); /** - * Setup log level. + * Set up log level. * * By default, liblldpctl will only log warnings. The following function allows * to increase verbosity. This function has no effect if callbacks are diff --git a/tests/integration/fixtures/namespaces.py b/tests/integration/fixtures/namespaces.py index 248aff30..29833721 100644 --- a/tests/integration/fixtures/namespaces.py +++ b/tests/integration/fixtures/namespaces.py @@ -230,7 +230,7 @@ class NamespaceFactory(object): with self.namespaces[ns]: mount_proc() mount_sys() - # Also setup the "namespace-dependant" directory + # Also set up the "namespace-dependant" directory self.tmpdir.join("ns").ensure(dir=True) mount_tmpfs(str(self.tmpdir.join("ns")), private=True) diff --git a/tests/integration/fixtures/programs.py b/tests/integration/fixtures/programs.py index de162f63..a2d32b3a 100644 --- a/tests/integration/fixtures/programs.py +++ b/tests/integration/fixtures/programs.py @@ -150,7 +150,7 @@ class LldpdFactory(object): t.join(1) def setup_namespace(self, name): - # Setup privsep. While not enforced, we assume we are running in a + # Set up privsep. While not enforced, we assume we are running in a # throwaway mount namespace. tmpdir = self.tmpdir if self.config.lldpd.privsep.enabled: diff --git a/tests/integration/test_dot3.py b/tests/integration/test_dot3.py index abeb86ef..ff4cf34b 100644 --- a/tests/integration/test_dot3.py +++ b/tests/integration/test_dot3.py @@ -6,7 +6,7 @@ import time @pytest.mark.skipif("'Dot3' not in config.lldpd.features", reason="Dot3 not supported") class TestLldpDot3(object): def test_aggregate(self, lldpd1, lldpd, lldpcli, namespaces, links): - links(namespaces(3), namespaces(2)) # Another link to setup a bond + links(namespaces(3), namespaces(2)) # Another link to set up a bond with namespaces(2): idx = links.bond("bond42", "eth1", "eth3") lldpd() diff --git a/tests/integration/test_interfaces.py b/tests/integration/test_interfaces.py index ce0088ed..60ee661a 100644 --- a/tests/integration/test_interfaces.py +++ b/tests/integration/test_interfaces.py @@ -16,7 +16,7 @@ def test_simple_bridge(lldpd1, lldpd, lldpcli, namespaces, links): def test_remove_bridge(lldpd, lldpcli, namespaces, links): links(namespaces(1), namespaces(2)) - links(namespaces(3), namespaces(1)) # Another link to setup a bridge + links(namespaces(3), namespaces(1)) # Another link to set up a bridge with namespaces(1): links.bridge("br42", "eth0", "eth3") lldpd("-r") @@ -40,7 +40,7 @@ def test_remove_bridge(lldpd, lldpcli, namespaces, links): @pytest.mark.skipif("'Dot1' not in config.lldpd.features", reason="Dot1 not supported") @pytest.mark.parametrize("when", ["before", "after"]) def test_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): - links(namespaces(3), namespaces(2)) # Another link to setup a bridge + links(namespaces(3), namespaces(2)) # Another link to set up a bridge with namespaces(2): if when == "after": lldpd() @@ -62,7 +62,7 @@ def test_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): @pytest.mark.skipif("'Dot1' not in config.lldpd.features", reason="Dot1 not supported") @pytest.mark.parametrize("when", ["before", "after"]) def test_vlan_aware_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): - links(namespaces(3), namespaces(2)) # Another link to setup a bridge + links(namespaces(3), namespaces(2)) # Another link to set up a bridge with namespaces(3): lldpd() with namespaces(2): @@ -96,7 +96,7 @@ def test_vlan_aware_bridge_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, def test_vlan_aware_bridge_filtering( lldpd1, lldpd, lldpcli, namespaces, links, filtering ): - links(namespaces(3), namespaces(2)) # Another link to setup a bridge + links(namespaces(3), namespaces(2)) # Another link to set up a bridge with namespaces(2): links.bridge("br42", "eth1", "eth3", filtering=filtering) links.bridge_vlan("eth1", 100, pvid=True) @@ -121,7 +121,7 @@ def test_vlan_aware_bridge_filtering( @pytest.mark.skipif("'Dot3' not in config.lldpd.features", reason="Dot3 not supported") @pytest.mark.parametrize("when", ["before", "after"]) def test_bond(lldpd1, lldpd, lldpcli, namespaces, links, when): - links(namespaces(3), namespaces(2)) # Another link to setup a bond + links(namespaces(3), namespaces(2)) # Another link to set up a bond with namespaces(2): if when == "after": lldpd() @@ -147,7 +147,7 @@ def test_bond(lldpd1, lldpd, lldpcli, namespaces, links, when): ) @pytest.mark.parametrize("when", ["before", "after"]) def test_team(lldpd1, lldpd, lldpcli, namespaces, links, when): - links(namespaces(3), namespaces(2)) # Another link to setup a bond + links(namespaces(3), namespaces(2)) # Another link to set up a bond with namespaces(2): if when == "after": lldpd() @@ -169,7 +169,7 @@ def test_team(lldpd1, lldpd, lldpcli, namespaces, links, when): @pytest.mark.skipif("'Dot1' not in config.lldpd.features", reason="Dot1 not supported") @pytest.mark.parametrize("when", ["before", "after"]) def test_bond_with_vlan(lldpd1, lldpd, lldpcli, namespaces, links, when): - links(namespaces(3), namespaces(2)) # Another link to setup a bond + links(namespaces(3), namespaces(2)) # Another link to set up a bond with namespaces(2): if when == "after": lldpd() -- 2.39.5