test: silence SC2329 for indirectly invoked cleanup() functions

shellcheck 0.10+ reports SC2329 ("This function is never invoked") for
the per-testcase cleanup() functions in TEST-75-RESOLVED.sh, which are
only invoked indirectly via trap. The existing SC2317 markers don't
cover it, and inserting a new testcase shuffles which definitions the
heuristic fires on, making pre-existing findings show up as new in
differential CI runs. Extend the markers to SC2317,SC2329, matching
what testcase_dot_strict_per_link_verify() in this file and other test
units already do.
This commit is contained in:
Stefan Agner
2026-09-02 10:41:54 +02:00
parent 908c38f300
commit 6decadbebf
+8 -7
View File
@@ -232,7 +232,7 @@ manual_testcase_01_resolvectl() {
ip link add hoge.foo type dummy
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
ip link del hoge
ip link del hoge.foo
@@ -349,6 +349,7 @@ manual_testcase_02_mdns_llmnr() {
ip link add hoge.foo type dummy
# Cleanup
# shellcheck disable=SC2317,SC2329
cleanup() {
rm -f /run/systemd/resolved.conf.d/90-mdns-llmnr.conf
ip link del hoge
@@ -938,7 +939,7 @@ testcase_08_resolved() {
testcase_09_resolvectl_showcache() {
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
rm -f /run/systemd/resolved.conf.d/90-resolved.conf
rm -f /run/systemd/network/10-dns2.netdev
@@ -1000,7 +1001,7 @@ testcase_10_resolvectl_json() {
local status_json
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
rm -f /run/systemd/resolved.conf.d/90-fallback.conf
systemctl reload systemd-resolved.service
@@ -1171,7 +1172,7 @@ testcase_11_nft() {
# Test resolvectl show-server-state
testcase_12_resolvectl2() {
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
rm -f /run/systemd/resolved.conf.d/90-reload.conf
systemctl reload systemd-resolved.service
@@ -1273,7 +1274,7 @@ testcase_13_varlink_subscribe_dns_configuration() {
fi
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
echo "===== io.systemd.Resolve.Monitor.SubscribeDNSConfiguration output: ====="
cat "$tmpfile"
@@ -1350,7 +1351,7 @@ testcase_13_varlink_subscribe_dns_configuration() {
# Test RefuseRecordTypes
testcase_14_refuse_record_types() {
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
rm -f /run/systemd/resolved.conf.d/90-refuserecords.conf
restart_resolved
@@ -1512,7 +1513,7 @@ testcase_14_refuse_record_types() {
# Test systemd-networkd-wait-online interactions with systemd-resolved
testcase_15_wait_online_dns() {
# Cleanup
# shellcheck disable=SC2317
# shellcheck disable=SC2317,SC2329
cleanup() {
echo "===== journalctl -u $unit ====="
journalctl -b --no-pager --no-hostname --full -u "$unit"