From 05d7590a1955e225f63ea6e57d297c520a63b7a1 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sat, 10 Sep 2022 18:21:07 -0500 Subject: [PATCH] scripts/afl-fuzz: skip frequency tuning when unsupported --- scripts/afl-fuzz/fuzz.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/afl-fuzz/fuzz.sh b/scripts/afl-fuzz/fuzz.sh index 8ff950ce..f220d4c0 100755 --- a/scripts/afl-fuzz/fuzz.sh +++ b/scripts/afl-fuzz/fuzz.sh @@ -119,7 +119,9 @@ fi CFLAGS+=" -DLIBDEFLATE_ENABLE_ASSERTIONS" sudo sh -c "echo core > /proc/sys/kernel/core_pattern" -sudo sh -c "echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor" +if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ]; then + sudo sh -c "echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor" +fi NPROC=$(getconf _NPROCESSORS_ONLN)