Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6115520ybi; Sun, 7 Jul 2019 20:54:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6Le3Jfpx+SCZ/aYp07ic0w2pLceIrsA6anpdgzs3Z/w1RqQVaXlivGa+eSCJiz7lxxNWG X-Received: by 2002:a17:90a:24ac:: with SMTP id i41mr22164230pje.124.1562558072983; Sun, 07 Jul 2019 20:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562558072; cv=none; d=google.com; s=arc-20160816; b=xKsRjw1xwKqSD1gXJ4HopFvOdnda2rhPCV3IOUQODsRg/4UibuJgeQKp2vOyOstAjx d7Qo/c4UMmKCr20aeD8w0iQI/3+BwsTl0CFuIzbMQqpkX22zXelUvzVgUUFuB452h7qu NcYEqi7CMxKMxkWwKrBQYSLIV70Tgldt55rvR86YMebFlwLMvGmSa5U/AwLx9tjL4Kab LxTFcyy+oq+53XixJEuFro0G7p9PjdPHwJjivjBhmGhU37cCC0Yd7Sk29Ha4O7qoOvtd 8lpmQegjJSDGUhN0M2PjdzjQK7XcQFXx7c/ecRYeXJKSY1qKL2i+266myh4g3Oxm1A/K eHqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=IcS6Xjvi7clGPanilxGT096uAfCtib8P8zuBi6xoulY=; b=D9uMBWhAAiVhgVf2qGvByDSF5v06pm3X6jVuQj+BaT7t06LJfzXYM4Hu64ptxmrC77 JnnFRg5fJf8TosHSJluZbSMhNVMZD3OmBhhQAD8NtWCWbEtEDpebODuh/GkbdOknihNF 6SxM7TqAMXOydMtqk+4xvwYXAoXV+Xo/5RBh79jeWVu30jIEYFAeurvODM/7X3alCO0F aC6SYD2HgpzKFExkxe0dGAw0MzoHPQiVXvDVbL2N3ymBfe6O9vn/dfWZ49Stig0hSQ+D +8DdRdlRNH1GXUlOFa3MiW63cYnXcjtM2R3dmKBl7Q7r3FLZ4cMDK9N/Cq6GToB8N5qq 3ohA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si17188462pgi.165.2019.07.07.20.54.08; Sun, 07 Jul 2019 20:54:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbfGHBPo (ORCPT + 99 others); Sun, 7 Jul 2019 21:15:44 -0400 Received: from ozlabs.org ([203.11.71.1]:46577 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727949AbfGHBPn (ORCPT ); Sun, 7 Jul 2019 21:15:43 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 45hnZJ0R8Jz9sN4; Mon, 8 Jul 2019 11:15:35 +1000 (AEST) From: Michael Ellerman To: Aleksa Sarai , Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan Cc: Aleksa Sarai , 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 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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