tools/testing/selftests/net/fdb_notify.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/fdb_notify.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/fdb_notify.sh- Extension
.sh- Size
- 1909 bytes
- Lines
- 97
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
source lib.sh
ALL_TESTS="
test_dup_bridge
test_dup_vxlan_self
test_dup_vxlan_master
test_dup_macvlan_self
test_dup_macvlan_master
"
do_test_dup()
{
local op=$1; shift
local what=$1; shift
local tmpf
RET=0
tmpf=$(mktemp)
defer rm "$tmpf"
defer_scope_push
bridge monitor fdb &> "$tmpf" &
defer kill_process $!
sleep 0.5
bridge fdb "$op" 00:11:22:33:44:55 vlan 1 "$@"
sleep 0.5
defer_scope_pop
local count=$(grep -c -e 00:11:22:33:44:55 $tmpf)
((count == 1))
check_err $? "Got $count notifications, expected 1"
log_test "$what $op: Duplicate notifications"
}
test_dup_bridge()
{
adf_ip_link_add br up type bridge vlan_filtering 1
do_test_dup add "bridge" dev br self
do_test_dup del "bridge" dev br self
}
test_dup_vxlan_self()
{
adf_ip_link_add br up type bridge vlan_filtering 1
adf_ip_link_add vx up type vxlan id 2000 dstport 4789
adf_ip_link_set_master vx br
do_test_dup add "vxlan" dev vx self dst 192.0.2.1
do_test_dup del "vxlan" dev vx self dst 192.0.2.1
}
test_dup_vxlan_master()
{
adf_ip_link_add br up type bridge vlan_filtering 1
adf_ip_link_add vx up type vxlan id 2000 dstport 4789
adf_ip_link_set_master vx br
do_test_dup add "vxlan master" dev vx master
do_test_dup del "vxlan master" dev vx master
}
test_dup_macvlan_self()
{
adf_ip_link_add dd up type dummy
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.