]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests: rds: Fix TAP-prefixed prints in check_gcov*
authorAllison Henderson <achender@kernel.org>
Thu, 7 May 2026 23:32:12 +0000 (16:32 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2026 17:20:19 +0000 (10:20 -0700)
This patch adds the # prefix to info and warning prints in
the check_gcov* routines.  Since these routines do not exit,
as the other check_* routines do, the output here should be
kept TAP compliant.

Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260507233213.556182-3-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/rds/run.sh

index 4930aed8846b86c5ebe690679b691aca77b30774..424fd57401d886d7c43d7dba04648cfef44fa109 100755 (executable)
@@ -35,7 +35,7 @@ GCOV_CMD=gcov
 check_gcov_env()
 {
        if ! which "$GCOV_CMD" > /dev/null 2>&1; then
-               echo "Warning: Could not find gcov. "
+               echo "Warning: Could not find gcov. "
                GENERATE_GCOV_REPORT=0
                return
        fi
@@ -48,7 +48,7 @@ check_gcov_env()
                GCOV_CMD=gcov-$(gcc -dumpversion)
 
                if ! which "$GCOV_CMD" > /dev/null 2>&1; then
-                       echo "Warning: Could not find an appropriate gcov installation. \
+                       echo "Warning: Could not find an appropriate gcov installation. \
                                gcov version must match gcc version"
                        GENERATE_GCOV_REPORT=0
                        return
@@ -58,11 +58,11 @@ check_gcov_env()
                GCOV_VER=$($GCOV_CMD -v | grep gcov | awk '{print $3}'| \
                        awk 'BEGIN {FS="-"}{print $1}')
                if [ "$GCOV_VER" != "$GCC_VER" ]; then
-                       echo "Warning: Could not find an appropriate gcov installation. \
+                       echo "Warning: Could not find an appropriate gcov installation. \
                                gcov version must match gcc version"
                        GENERATE_GCOV_REPORT=0
                else
-                       echo "Warning: Mismatched gcc and gcov detected.  Using $GCOV_CMD"
+                       echo "Warning: Mismatched gcc and gcov detected.  Using $GCOV_CMD"
                fi
        fi
 }
@@ -71,20 +71,20 @@ check_gcov_env()
 check_gcov_conf()
 {
        if ! grep -x "CONFIG_GCOV_PROFILE_RDS=y" "$kconfig" > /dev/null 2>&1; then
-               echo "INFO: CONFIG_GCOV_PROFILE_RDS should be enabled for coverage reports"
+               echo "INFO: CONFIG_GCOV_PROFILE_RDS should be enabled for coverage reports"
                GENERATE_GCOV_REPORT=0
        fi
        if ! grep -x "CONFIG_GCOV_KERNEL=y" "$kconfig" > /dev/null 2>&1; then
-               echo "INFO: CONFIG_GCOV_KERNEL should be enabled for coverage reports"
+               echo "INFO: CONFIG_GCOV_KERNEL should be enabled for coverage reports"
                GENERATE_GCOV_REPORT=0
        fi
        if grep -x "CONFIG_GCOV_PROFILE_ALL=y" "$kconfig" > /dev/null 2>&1; then
-               echo "INFO: CONFIG_GCOV_PROFILE_ALL should be disabled for coverage reports"
+               echo "INFO: CONFIG_GCOV_PROFILE_ALL should be disabled for coverage reports"
                GENERATE_GCOV_REPORT=0
        fi
 
        if [ "$GENERATE_GCOV_REPORT" -eq 0 ]; then
-               echo "To enable gcov reports, please run "\
+               echo "To enable gcov reports, please run "\
                        "\"tools/testing/selftests/net/rds/config.sh -g\" and rebuild the kernel"
        else
                # if we have the required kernel configs, proceed to check the environment to
@@ -208,7 +208,7 @@ if [[ -n "$LOG_DIR" ]]; then
 fi
 
 set +e
-echo "#running RDS tests..."
+echo "# running RDS tests..."
 "${TRACE_CMD[@]}" python3 "$(dirname "$0")/test.py" "${FLAGS[@]}" -t "$TIMEOUT"
 
 test_rc=$?