Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: forwarding: add check_driver() helper

Add a helper to be used to check if the netdevice is backed by specified
driver.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Jiri Pirko and committed by
Paolo Abeni
617198cb 41ad836e

+12
+12
tools/testing/selftests/net/forwarding/lib.sh
··· 283 283 exit $ksft_skip 284 284 fi 285 285 286 + check_driver() 287 + { 288 + local dev=$1; shift 289 + local expected=$1; shift 290 + local driver_name=`driver_name_get $dev` 291 + 292 + if [[ $driver_name != $expected ]]; then 293 + echo "SKIP: expected driver $expected for $dev, got $driver_name instead" 294 + exit $ksft_skip 295 + fi 296 + } 297 + 286 298 if [[ "$CHECK_TC" = "yes" ]]; then 287 299 check_tc_version 288 300 fi