1#!/usr/bin/env python3 2# SPDX-License-Identifier: GPL-2.0 3 4from lib.py import ksft_run, ksft_pr, ksft_eq, ksft_ge, NetdevFamily 5 6 7def empty_check(nf) -> None: 8 devs = nf.dev_get({}, dump=True) 9 ksft_ge(len(devs), 1) 10 11 12def lo_check(nf) -> None: 13 lo_info = nf.dev_get({"ifindex": 1}) 14 ksft_eq(len(lo_info['xdp-features']), 0) 15 ksft_eq(len(lo_info['xdp-rx-metadata-features']), 0) 16 17 18def main() -> None: 19 nf = NetdevFamily() 20 ksft_run([empty_check, lo_check], args=(nf, )) 21 22 23if __name__ == "__main__": 24 main() 25