-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selftests/bpf: avoid generating untracked files when running bpf selftests #8272
base: bpf-next_base
Are you sure you want to change the base?
Conversation
Upstream branch: a7c2051 |
04c6b5e
to
419af5f
Compare
Upstream branch: 8eef6ac |
d2fd56c
to
c131285
Compare
419af5f
to
c0247f7
Compare
Upstream branch: c5d2bac |
c131285
to
3108e2d
Compare
c0247f7
to
ce9b303
Compare
Upstream branch: c5d2bac |
3108e2d
to
ff41bc4
Compare
ce9b303
to
ce2660e
Compare
Upstream branch: c5d2bac |
…tests Currently, when we run the BPF selftests with the following command: 'make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS=""' The command generates untracked files and directories: ''' Untracked files: (use "git add <file>..." to include in what will be committed) tools/testing/selftests/bpfFEATURE-DUMP.selftests tools/testing/selftests/bpffeature/ ''' The core reason is our Makefile(tools/testing/selftests/bpf/Makefile) was written like this: ''' OUTPUT := $(OUTPUT)/ $(eval include ../../../build/Makefile.feature) OUTPUT := $(patsubst %/,%,$(OUTPUT)) ''' This way of assigning values to OUTPUT will never be effective for the variable OUTPUT provided via the command argument and sub makefile called like this(tools/testing/selftests/Makefile): ''' all: ... $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET ''' As stated in the GNU make documentation: ''' An argument that contains '=' specifies the value of a variable: 'v=x' sets the value of the variable v to x. If you specify a value in this way, all ordinary assignments of the same variable in the makefile are ignored; we say they have been overridden by the command line argument. ''' According to GNU make, we use override Directive to fix this issue: ''' If you want to set the variable in the makefile even though it was set with a command argument, you can use an override directive, which is a line that looks like this: override variable := value Link: https://www.gnu.org/software/make/manual/make.html#Override-Directive Fixes: dc3a880 ("selftests/bpf: Adapt OUTPUT appending logic to lower versions of Make") Signed-off-by: Jiayuan Chen <mrpre@163.com>
ff41bc4
to
7901e74
Compare
Pull request for series with
subject: selftests/bpf: avoid generating untracked files when running bpf selftests
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=919079