From patchwork Tue Jun 26 21:08:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 10490209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96669602B3 for ; Tue, 26 Jun 2018 21:08:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D0B228474 for ; Tue, 26 Jun 2018 21:08:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DE7A288F4; Tue, 26 Jun 2018 21:08:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B16F028474 for ; Tue, 26 Jun 2018 21:08:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751094AbeFZVIh (ORCPT ); Tue, 26 Jun 2018 17:08:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914AbeFZVIg (ORCPT ); Tue, 26 Jun 2018 17:08:36 -0400 Received: from garbanzo.lan (c-73-71-40-85.hsd1.ca.comcast.net [73.71.40.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25E5426F5B; Tue, 26 Jun 2018 21:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530047316; bh=kOqS/oTbZPsQfne3VyICRHVgPL5w0fvMs0xFHZ2dcoc=; h=From:To:Cc:Subject:Date:From; b=ic7FmeC0+B2FOphUhjj568TCWIbAH1CZ+TnLOv3YLl2uINIhP48fiWURK2Kk7RB9a O/V4O8AfxoiIB5vTHzSTVhcJOucCAM9hU9S7J2tdOiECxRY05pfvnrVMJxHa6Igaxu 51cVBq1FMB4afoL/PKv4FXXhjN2E/SubsuAX3HZI= From: "Luis R. Rodriguez" To: fstests@vger.kernel.org Cc: "Luis R. Rodriguez" Subject: [PATCH] xfstests: fix install target using sudo Date: Tue, 26 Jun 2018 14:08:34 -0700 Message-Id: <20180626210834.24220-1-mcgrof@kernel.org> X-Mailer: git-send-email 2.18.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If you install with: sudo make install Depending on the system, you may see /var/lib/xfstests/tests/ is empty. This is because $(PWD) can expand to be empty on certain systems and so the wildcard finds nothing. PWD is only used on one target, the tests/*/ dir install target. We can fix this by using $(CURDIR) however that does not suffice as we are also using the $(wildcard) and that needs its own careful expansion. This issue is observed on both Fedora and OpenSUSE, but not on Debian. Signed-off-by: Luis R. Rodriguez --- tests/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 2611b3b845f5..084135da0487 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,8 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -TESTS_SUBDIRS = $(sort $(dir $(wildcard $(PWD)/$(TESTS_DIR)/[a-z]*/))) +TEST_DIR = $(dir $(CURDIR)/$(TESTS_DIR)) +TESTS_SUBDIRS = $(sort $(dir $(wildcard $(TEST_DIR)/[a-z]*/))) include $(BUILDRULES)