test.sh 478 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # SUMMARY: Check that a program with multiple maps in the maps section loads
  3. # LABELS:
  4. set -e
  5. # Source libraries. Uncomment if needed/defined
  6. #. "${RT_LIB}"
  7. . "${RT_PROJECT_ROOT}/_lib/lib.sh"
  8. NAME=multimap
  9. clean_up() {
  10. rm -rf ${NAME}.o ${NAME}
  11. exec_vm rm -f ${NAME}.o ${NAME}
  12. }
  13. trap clean_up EXIT
  14. # Test code goes here
  15. compile_c_ebpf "$(pwd)/${NAME}.bpf.c"
  16. compile_user "$(pwd)/${NAME}.rs"
  17. scp_vm ${NAME}.o
  18. scp_vm ${NAME}
  19. exec_vm sudo ./${NAME}
  20. exit 0