| 1 | |
| 2 | |
| 3 |
|
| 4 | from os import path
|
| 5 | from devmem_lib import (setup_test, run_rx, run_tx, run_tx_chunks, run_rx_hds,
|
| 6 | run_rx_large_niov)
|
| 7 | from lib.py import ksft_run, ksft_exit, ksft_disruptive
|
| 8 | from lib.py import NetDrvEpEnv
|
| 9 |
|
| 10 |
|
| 11 | @ksft_disruptive
|
| 12 | def check_rx(cfg) -> None:
|
| 13 |
|
| 14 | run_rx(cfg)
|
| 15 |
|
| 16 |
|
| 17 | @ksft_disruptive
|
| 18 | def check_tx(cfg) -> None:
|
| 19 |
|
| 20 | run_tx(cfg)
|
| 21 |
|
| 22 |
|
| 23 | @ksft_disruptive
|
| 24 | def check_tx_chunks(cfg) -> None:
|
| 25 |
|
| 26 | run_tx_chunks(cfg)
|
| 27 |
|
| 28 |
|
| 29 | def check_rx_hds(cfg) -> None:
|
| 30 |
|
| 31 | run_rx_hds(cfg)
|
| 32 |
|
| 33 |
|
| 34 | def check_rx_large_niov(cfg) -> None:
|
| 35 |
|
| 36 | run_rx_large_niov(cfg)
|
| 37 |
|
| 38 |
|
| 39 | def main() -> None:
|
| 40 |
|
| 41 | with NetDrvEpEnv(__file__) as cfg:
|
| 42 | setup_test(cfg, path.abspath(path.dirname(__file__) + "/ncdevmem"))
|
| 43 | ksft_run([check_rx, check_tx, check_tx_chunks, check_rx_hds,
|
| 44 | check_rx_large_niov],
|
| 45 | args=(cfg,))
|
| 46 | ksft_exit()
|
| 47 |
|
| 48 |
|
| 49 | if __name__ == "__main__":
|
| 50 | main()
|