From 065a3bd1c342cb4dc3852029548526419ca180d7 Mon Sep 17 00:00:00 2001 From: Ruize Tang <1466040111@qq.com> Date: Tue, 10 Dec 2024 10:08:58 +0800 Subject: [PATCH] Avoid inline comments in variable assignments in Makefile --- Makefile | 6 ++++-- test/apps/Makefile | 3 ++- tools/qemu_args.sh | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 309eb9ace..b70a29a6d 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,8 @@ FEATURES ?= # End of auto test features. # Network settings -NETDEV ?= user # Possible values are user,tap +# NETDEV possible values are user,tap +NETDEV ?= user VHOST ?= off # End of network settings @@ -98,7 +99,8 @@ endif ifeq ($(BOOT_PROTOCOL), linux-efi-handover64) CARGO_OSDK_ARGS += --grub-mkrescue=/usr/bin/grub-mkrescue CARGO_OSDK_ARGS += --grub-boot-protocol="linux" -CARGO_OSDK_ARGS += --encoding raw # FIXME: GZIP self-decompression triggers CPU faults +# FIXME: GZIP self-decompression (--encoding gzip) triggers CPU faults +CARGO_OSDK_ARGS += --encoding raw else ifeq ($(BOOT_PROTOCOL), linux-legacy32) CARGO_OSDK_ARGS += --linux-x86-legacy-boot CARGO_OSDK_ARGS += --grub-boot-protocol="linux" diff --git a/test/apps/Makefile b/test/apps/Makefile index 80d2d129a..18ea1be3d 100644 --- a/test/apps/Makefile +++ b/test/apps/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: MPL-2.0 -MAKEFLAGS += --no-builtin-rules # Prevent the implicit rules from compiling ".c" or ".s" files automatically. +# Prevent the implicit rules from compiling ".c" or ".s" files automatically. +MAKEFLAGS += --no-builtin-rules MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH))) diff --git a/tools/qemu_args.sh b/tools/qemu_args.sh index 907b3829a..46a2c973c 100755 --- a/tools/qemu_args.sh +++ b/tools/qemu_args.sh @@ -28,11 +28,11 @@ LMBENCH_TCP_BW_RAND_PORT=${LMBENCH_TCP_BW_PORT:-$(shuf -i 1024-65535 -n 1)} # Optional QEMU arguments. Opt in them manually if needed. # QEMU_OPT_ARG_DUMP_PACKETS="-object filter-dump,id=filter0,netdev=net01,file=virtio-net.pcap" -if [[ "$NETDEV" =~ "user" ]]; then +if [ "$NETDEV" = "user" ]; then echo "[$1] Forwarded QEMU guest port: $SSH_RAND_PORT->22; $NGINX_RAND_PORT->8080 $REDIS_RAND_PORT->6379 $IPERF_RAND_PORT->5201 $LMBENCH_TCP_LAT_RAND_PORT->31234 $LMBENCH_TCP_BW_RAND_PORT->31236" 1>&2 NETDEV_ARGS="-netdev user,id=net01,hostfwd=tcp::$SSH_RAND_PORT-:22,hostfwd=tcp::$NGINX_RAND_PORT-:8080,hostfwd=tcp::$REDIS_RAND_PORT-:6379,hostfwd=tcp::$IPERF_RAND_PORT-:5201,hostfwd=tcp::$LMBENCH_TCP_LAT_RAND_PORT-:31234,hostfwd=tcp::$LMBENCH_TCP_BW_RAND_PORT-:31236" VIRTIO_NET_FEATURES=",mrg_rxbuf=off,ctrl_rx=off,ctrl_rx_extra=off,ctrl_vlan=off,ctrl_vq=off,ctrl_guest_offloads=off,ctrl_mac_addr=off,event_idx=off,queue_reset=off,guest_announce=off,indirect_desc=off" -elif [[ "$NETDEV" =~ "tap" ]]; then +elif [ "$NETDEV" = "tap" ]; then THIS_SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) QEMU_IFUP_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifup.sh QEMU_IFDOWN_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifdown.sh