From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Michael Ellerman Subject: Re: [PATCH v9 10/10] selftests: add openat2(2) selftests In-Reply-To: <20190706145737.5299-11-cyphar@cyphar.com> References: <20190706145737.5299-1-cyphar@cyphar.com> <20190706145737.5299-11-cyphar@cyphar.com> Date: Mon, 08 Jul 2019 11:15:35 +1000 Message-ID: <878st9iax4.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-arch-owner@vger.kernel.org List-ID: To: Aleksa Sarai , Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan Cc: Eric Biederman , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Kees Cook , Jann Horn , Christian Brauner , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Aleksa Sarai , Linus Torvalds , containers@lists.linux-foundation.org, linux-alpha@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Hi Aleksa, A few minor comments below. Aleksa Sarai writes: > diff --git a/tools/testing/selftests/openat2/Makefile b/tools/testing/selftests/openat2/Makefile > new file mode 100644 > index 000000000000..8235a49928f6 > --- /dev/null > +++ b/tools/testing/selftests/openat2/Makefile > @@ -0,0 +1,12 @@ > +# SPDX-License-Identifier: GPL-2.0 > + > +CFLAGS += -Wall -O2 -g > +TEST_GEN_PROGS := linkmode_test resolve_test rename_attack_test > + > +include ../lib.mk > + > +$(OUTPUT)/linkmode_test: linkmode_test.c helpers.o > +$(OUTPUT)/rename_attack_test: rename_attack_test.c helpers.o > +$(OUTPUT)/resolve_test: resolve_test.c helpers.o You don't need to tell make that foo depends on foo.c. Also if you make the dependency be on helpers.c then you won't get an intermediate helpers.o, and then you don't need to clean it. So the above three lines could just be: $(TEST_GEN_PROGS): helpers.c > +EXTRA_CLEAN = helpers.o $(wildcard /tmp/ksft-openat2-*) If you follow my advice above you don't need helpers.o in there. Deleting things from /tmp is also a bit fishy on shared machines, ie. it will error if those files happen to be owned by another user. cheers