Fix kernel test script (#14676)

This commit is contained in:
thiagoftsm 2023-03-08 00:30:55 +00:00 committed by GitHub
parent bf428373ab
commit f4fced9b90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -51,15 +51,18 @@ fi
if [ -n "${CONFIG_PATH}" ]; then
GREP='grep'
CAT='cat'
if echo "${CONFIG_PATH}" | grep -q '.gz'; then
GREP='zgrep'
CAT='zcat'
fi
REQUIRED_CONFIG="KPROBES KPROBES_ON_FTRACE HAVE_KPROBES BPF BPF_SYSCALL BPF_JIT"
for required_config in ${REQUIRED_CONFIG}; do
if ! "${GREP}" -q "CONFIG_${required_config}=y" "${CONFIG_PATH}"; then
# Fix issue https://github.com/netdata/netdata/issues/14668
# if ! "${GREP}" -q "CONFIG_${required_config}=y" "${CONFIG_PATH}"; then
if ! { "${CAT}" "${CONFIG_PATH}" | "${GREP}" -q "CONFIG_${required_config}=y" >&2 >/dev/null; } ;then
echo >&2 " Missing Kernel Config: ${required_config}"
exit 1
fi