You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/test/cases/020_elf/000_maps/test.sh

25 lines
423 B
Bash

#!/bin/sh
# SUMMARY: Check that maps are correctly represented in ELF files
# LABELS:
set -ex
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
NAME=map_test
clean_up() {
rm -rf ebpf user ${NAME}.o
}
trap clean_up EXIT
# Test code goes here
compile_ebpf ${NAME}.ebpf.rs
readelf --sections ${NAME}.o | grep -q "maps"
readelf --syms ${NAME}.o | grep -q "BAR"
exit 0