mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 10:47:29 +02:00
ci(mdns): Check mdns sources for std alloc functions
This commit is contained in:
24
.github/workflows/mdns__host-tests.yml
vendored
24
.github/workflows/mdns__host-tests.yml
vendored
@ -35,30 +35,36 @@ jobs:
|
|||||||
# Next we run the pytest (using the console app)
|
# Next we run the pytest (using the console app)
|
||||||
pytest
|
pytest
|
||||||
|
|
||||||
build_afl_host_test_mdns:
|
host_compat_checks:
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
||||||
name: Build AFL host test
|
name: Set of compatibility checks
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest"]
|
idf_ver: ["latest"]
|
||||||
idf_target: ["esp32"]
|
|
||||||
|
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
path: esp-protocols
|
|
||||||
- name: Install Necessary Libs
|
- name: Install Necessary Libs
|
||||||
run: |
|
run: |
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
apt-get install -y libbsd-dev
|
apt-get install -y libbsd-dev
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Test AFL compat build
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
. ${IDF_PATH}/export.sh
|
. ${IDF_PATH}/export.sh
|
||||||
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/tests/test_afl_fuzz_host/
|
cd components/mdns/tests/test_afl_fuzz_host/
|
||||||
make INSTR=off
|
make INSTR=off
|
||||||
|
- name: Test no malloc functions
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd components/mdns
|
||||||
|
for file in $(ls *.c); do
|
||||||
|
cp $file /tmp
|
||||||
|
echo -n "Checking that $file does not call any std allocations directly..."
|
||||||
|
python mem_prefix_script.py $file
|
||||||
|
diff -q $file /tmp/$file || exit 1
|
||||||
|
echo "OK"
|
||||||
|
done
|
||||||
|
Reference in New Issue
Block a user