test.sh 429 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # SUMMARY: Check that the program can be unloaded
  3. # LABELS:
  4. set -ex
  5. # Source libraries. Uncomment if needed/defined
  6. #. "${RT_LIB}"
  7. . "${RT_PROJECT_ROOT}/_lib/lib.sh"
  8. NAME=test
  9. clean_up() {
  10. rm -rf ebpf user ${NAME}.o ${NAME}
  11. exec_vm rm ${NAME} ${NAME}.o
  12. }
  13. trap clean_up EXIT
  14. # Test code goes here
  15. compile_ebpf ${NAME}.ebpf.rs
  16. compile_user ${NAME}.rs
  17. scp_vm ${NAME}.o
  18. scp_vm ${NAME}
  19. exec_vm sudo ./${NAME}