Commit 3d6ee575 authored by Uday Shankar's avatar Uday Shankar Committed by Jens Axboe
Browse files

selftests: ublk: kublk: build with -Werror iff WERROR!=0



Compiler warnings can catch bugs at compile time; thus, heeding them is
usually a good idea. Turn warnings into errors by default for the kublk
build so that anyone making changes is forced to heed them. Compiler
warnings can also sometimes produce annoying false positives, so provide
a flag WERROR that the developer can use as follows to have the build
and selftests run go through even if there are warnings:

make WERROR=0 TARGETS=ublk kselftest

Signed-off-by: default avatarUday Shankar <ushankar@purestorage.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250429-ublk_selftests-v2-1-e970b6d9e4f4@purestorage.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 194df9f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

CFLAGS += -O3 -Wl,-no-as-needed -Wall -I $(top_srcdir)
ifneq ($(WERROR),0)
	CFLAGS += -Werror
endif

LDLIBS += -lpthread -lm -luring

TEST_PROGS := test_generic_01.sh