From patchwork Wed Feb 21 21:52:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 129137 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1087549ljc; Wed, 21 Feb 2018 13:54:01 -0800 (PST) X-Google-Smtp-Source: AH8x227E5jlf/InfFImy06uMGH9YghHx3RNgxaHBS4hmUg2SoumrBudv2ONrQSmJXpxuzA4k0PnX X-Received: by 2002:a17:902:b408:: with SMTP id x8-v6mr1531004plr.362.1519250040938; Wed, 21 Feb 2018 13:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519250040; cv=none; d=google.com; s=arc-20160816; b=MTm/UHvFr6H4mXEckRhvR6mo0PyIeKFD9kVywx242hk148Oj3ofNXjvwi57AJvSIV+ TFI9xKzveuXpMBTrfO6oqVOUPexxt2X6I4U2gGXtEPYSBCPopODxV4BkdFdtmogJg0eL lo2diLj9ZNalX4X2jX23//ntdYva8pLuLIrX98DgtJ4V9vG2Fzcisw9185n3YSyQyLMt yLSzgNS36CVNDH8q0ay4KWHIfWBT4cYks1Kd5em7dgR3n7dFiSdZ7qzj1ChZTRcvq7NX klHTkK6dVYW7TcycgN8ikv8kPdkmn+WoAQbAD9r69aS7HhlOERYrqSOnCNai1PjXGDKf Ibkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ctVxc9sZ+iSJ6PoUJLMUygSrS0HB/kwFZr/MJdBi3Z4=; b=mqicRg0HUcxifReNKczIYEO2DVh2xgSJvA9c9aO4lAHvHw4Kn7KIT2/pQAJwZooXNm n5KYWVCmymQJMcUBp4aDRyjwVk89eb0R6gyQTvgxy72CXaQ2OhB4KKU02z/Khidf+xFA GD3pI1JYeOhVHCd4yyy6ML8vH8BR5StLvE+p9fBvvREo5mVcuNudAUP1Q8fp8nBMZ+GO Hlp5rRBj9mDNS1syS6a8YK9yyOZJApF3cf2jmXpqbEOkcRk0eJ04QARgS1qC+63vd0Sj or+BSUmedw1StaN7YG6G4Qi7cI9JGfvb8ZmtmODF5lTMMFEfKpM3c4DfW7I/Lqi38jFZ 1MUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GHfgxZ5l; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si2521565pgv.255.2018.02.21.13.54.00; Wed, 21 Feb 2018 13:54:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GHfgxZ5l; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750738AbeBUVx7 (ORCPT + 5 others); Wed, 21 Feb 2018 16:53:59 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:33698 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbeBUVx6 (ORCPT ); Wed, 21 Feb 2018 16:53:58 -0500 Received: by mail-oi0-f66.google.com with SMTP id j81so341423oia.0 for ; Wed, 21 Feb 2018 13:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=SF+YKJsYglDXHDBeycpleU8LpeYfvDAtm0usZvNRtlc=; b=GHfgxZ5lPaDO7ZDzXtdnX4flsq7NphTIfprGeAtp7DFdZ1tnKfPhDJ5IwTJpIwU8r+ fkek2kjbO40tmlCoE585OgBaHDMBuzASn2igQ+KCgY4g92w1hDX/HqxiKLrde9U5QA4o kUakmC4r6SWJ/SxuXx12eBTEhQT8BkMoStn+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=SF+YKJsYglDXHDBeycpleU8LpeYfvDAtm0usZvNRtlc=; b=bP/64Krq3KRluxakAEhTWa4Qhk2vgg4ZHYClY8LUJxuzFuoHrjbXADmFB7ujmDn5JG GB7/sTJDXQVNTkBiIWAsTUPiZPaES3rSeUed0SVgPm/KgVjW/wkgfG0JRFYuP1PNn3gP ixSkqIXFCrxij9M9ew4vFDSxsXnBeB9rbKzdutgU9x087izgaenh0wfPQ/M/JYui1XKv 7DGeGtM1A6JYg4dQ/SsKmHTW4zxFbHSgkB6sKD/8nQ6vpSiin+hBYyMu0bvJx6IpNaCh epYquiBrT0FUHJhVAhlvKov0/nUcLtR1rz3rvbO4jkhxjAIWaiDeTOozwaJ3i+X5rVGV GRcQ== X-Gm-Message-State: APf1xPD3EHb1Y9MVvzCzAYM7X4mP6AkSE0W+Esb5mhprc4vMNja/3pft 949WSel2l1hpKfuJkR7L1pcW+Q== X-Received: by 10.202.226.7 with SMTP id z7mr1519532oig.2.1519250038072; Wed, 21 Feb 2018 13:53:58 -0800 (PST) Received: from aura.cortijodelrio.net (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id u6sm4134067otb.69.2018.02.21.13.53.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 13:53:56 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: Fathi Boudra , Bamvor Jian Zhang , Bartosz Golaszewski , Shuah Khan , linux-gpio@vger.kernel.org (open list:GPIO MOCKUP DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] selftests: gpio: restructure Makefile Date: Wed, 21 Feb 2018 15:52:43 -0600 Message-Id: <1519249964-1630-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Fathi Boudra Signed-off-by: Fathi Boudra --- tools/testing/selftests/gpio/Makefile | 36 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 19 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 1bbb475..6890f61 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -1,31 +1,29 @@ # SPDX-License-Identifier: GPL-2.0 +CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ +LDLIBS += -lmount -I/usr/include/libmount + TEST_PROGS := gpio-mockup.sh -TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) -BINARIES := gpio-mockup-chardev -EXTRA_PROGS := ../gpiogpio-event-mon ../gpiogpio-hammer ../gpiolsgpio -EXTRA_DIRS := ../gpioinclude/ -EXTRA_OBJS := ../gpiogpio-event-mon-in.o ../gpiogpio-event-mon.o -EXTRA_OBJS += ../gpiogpio-hammer-in.o ../gpiogpio-utils.o ../gpiolsgpio-in.o -EXTRA_OBJS += ../gpiolsgpio.o +TEST_FILES := gpio-mockup-sysfs.sh +TEST_PROGS_EXTENDED := gpio-mockup-chardev -include ../lib.mk +GPIODIR := ../../../gpio +GPIOOBJ := gpio-utils.o +GPIOINC := gpio.h -all: $(BINARIES) +all: $(GPIOINC) $(TEST_PROGS_EXTENDED) override define CLEAN - $(RM) $(BINARIES) $(EXTRA_PROGS) $(EXTRA_OBJS) - $(RM) -r $(EXTRA_DIRS) + $(RM) $(TEST_PROGS_EXTENDED) + $(MAKE) -C $(GPIODIR) clean endef -CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ -LDLIBS += -lmount -I/usr/include/libmount - -$(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h +include ../lib.mk -../../../gpio/gpio-utils.o: - make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio +$(TEST_PROGS_EXTENDED): $(GPIODIR)/$(GPIOOBJ) -../../../../usr/include/linux/gpio.h: - make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/ +$(GPIODIR)/$(GPIOOBJ): + $(MAKE) -C $(GPIODIR) +$(GPIOINC): + $(MAKE) -C ../../../.. headers_install From patchwork Wed Feb 21 21:52:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 129138 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1087806ljc; Wed, 21 Feb 2018 13:54:24 -0800 (PST) X-Google-Smtp-Source: AH8x225D4dszPRf82dxDoHINEqKhg++rAAWd9QZuCZUfHs61aZtAgAB/zz/+DCJ3E5PrlRwg/yDe X-Received: by 10.101.87.132 with SMTP id b4mr3761003pgr.282.1519250064708; Wed, 21 Feb 2018 13:54:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519250064; cv=none; d=google.com; s=arc-20160816; b=KTt8t44QqPFq5JzaTBtgNSkTiEtA/DAW780Yd0uLcdhcUESYiQWmN5jDmNRT/Ikeeb OmV3GsfzGy4i/nEEPTefBD8xtrBf/WedYqil188RXO9A5bA3CdKVxBvXXMBqM59RL/cs 5GMdXoD5zddI4LBGUnbVPHWHQAMg2fY/kj4HJFOO4VKaVASHQzvSPFVcoP4LqC2Vi4oH rDEVKg3nWrpbbGmYYYHKFOBbW5MBJSP0SVTP57ylQ1SmluvXjRcA+REgdtL+6cK/qZDj eYeuN4aNoF8uktOyk/8L6vfWFbD9LL30RRoF4BgSdGVuU/1tqWxT81qwhh11VjN0zHFe uPuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=3HyrjacNdQRKxYGPThRq0lf0RSnOE0a152+SZk1KDUs=; b=OpdAJF5bCe+Xgig/yhslG/ud+EELXB9XYiWO7pzRIpK/bvVmYqrtr/UlDW7Sbpcu27 8a+NmgQqix7xJ3pnduQXSCVrN7q4Rc8XzCTbC/+gTVas6upkP94lDRjbOFDOd8NeXJRW FphHZGqTtObnzcc4UCuFoQn9gvJQDfZTqmPve5Hs/Pohg0DRwozV4IhEWCVPwSz++f8h c6SlMy/fx9+ePvY4IS5raw6Q4vJh1XgfLogTLA9tazP6AItfPkWD+TB+ZpWCHAx1WC8Q kSok5IvoNcc0S4ZOW86rbcBUp4JPOrFyAUE6lHZQMcnTESdITyau21XHYcjb/vomRiHS imFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=M9mNIc4l; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si1852664plt.429.2018.02.21.13.54.24; Wed, 21 Feb 2018 13:54:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=M9mNIc4l; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751000AbeBUVyX (ORCPT + 5 others); Wed, 21 Feb 2018 16:54:23 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:40881 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751158AbeBUVyW (ORCPT ); Wed, 21 Feb 2018 16:54:22 -0500 Received: by mail-oi0-f67.google.com with SMTP id c12so2267118oic.7 for ; Wed, 21 Feb 2018 13:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y3+IH/eVFKs1T+qdI4ogGjCJGbdNfq3E3z6SZkCBadA=; b=M9mNIc4lAGiILPwR514ngI6RTIatnVE6cvay4mIE1fewcsiPHFWUC8cDHH5f1y/Ugi vS7povtC+1qqQ5XtGaQkUbUspmhNSbIfb40mmBkSZ3+dUb/47xIiPp07U8ztJ/q58rNH cdbVIA+fMF7jthjX8fOqYxOHjYw1zUeg7zj9w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y3+IH/eVFKs1T+qdI4ogGjCJGbdNfq3E3z6SZkCBadA=; b=dywenDaSCUmcqmZCNFqh+kE42oxwzTyRR0w/nuigUR41B6BUnna4YuVAKKL5x097/G ThnbuH8Pse4m8E2xyK9Z9Dy7Yqo16GPEm6nfYJ/UeWzNO1D2bE2ufrJT2EMMnnR3wxy3 1NdK3Qtu0O7fS5g/AKLG230USvg4O5+CQoQ3fOxjD9YV8PnHZBVOUy1AMEA+PhkMXzqI U9ybmPG+gpf48xKhd6kd9NxtWUjUpMUt/i0ap07CvJGA+LB3la7QOz8Qf8LyhsYoSEy/ VRvs0L9wyeS8BkmRw1D2LTmV0oS3eDx3ngf57za3Yf0Pw4r47EZvqY2LEvUVLMS2FUv7 nZGg== X-Gm-Message-State: APf1xPDoLam2VWjhAFMM1uEvS309GgYxPnIzJOdH/QA8OMZmQvBKPMWg eyB6LySmaPt3RqaRD8aW/9FQVA== X-Received: by 10.202.84.132 with SMTP id i126mr2969548oib.295.1519250061974; Wed, 21 Feb 2018 13:54:21 -0800 (PST) Received: from aura.cortijodelrio.net (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id u6sm4134067otb.69.2018.02.21.13.54.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 13:54:20 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Bamvor Jian Zhang , Bartosz Golaszewski , Shuah Khan , linux-gpio@vger.kernel.org (open list:GPIO MOCKUP DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] selftests/gpio: Fix OUTPUT directory in Makefile Date: Wed, 21 Feb 2018 15:52:44 -0600 Message-Id: <1519249964-1630-2-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519249964-1630-1-git-send-email-daniel.diaz@linaro.org> References: <1519249964-1630-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When simply running `make' from the selftests top dir, this error shows up: cc -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid gpio-mockup-chardev.c ../../../gpio/gpio-utils.o -lmount -o gpio-mockup-chardev cc: error: ../../../gpio/gpio-utils.o: No such file or directory : recipe for target 'gpio-mockup-chardev' failed make[1]: *** [gpio-mockup-chardev] Error 1 because the output directory is set to "selftests/gpio" and all binaries built from ../../../gpio/ end up there. In fact, they appear as, exempli gratia: * gpiogpio-event-mon * gpiogpio-hammer * gpioinclude/ * gpiolsgpio which is wrong, as it's missing directory separator somewhere. This patch sets straight the output directory when building ../../../gpio/ so that binaries don't cross paths. Signed-off-by: Daniel Díaz --- tools/testing/selftests/gpio/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 6890f61..46a131a 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -7,7 +7,7 @@ TEST_PROGS := gpio-mockup.sh TEST_FILES := gpio-mockup-sysfs.sh TEST_PROGS_EXTENDED := gpio-mockup-chardev -GPIODIR := ../../../gpio +GPIODIR := $(realpath ../../../gpio) GPIOOBJ := gpio-utils.o GPIOINC := gpio.h @@ -15,7 +15,7 @@ all: $(GPIOINC) $(TEST_PROGS_EXTENDED) override define CLEAN $(RM) $(TEST_PROGS_EXTENDED) - $(MAKE) -C $(GPIODIR) clean + $(MAKE) -C $(GPIODIR) OUTPUT=$(GPIODIR)/ clean endef include ../lib.mk @@ -23,7 +23,7 @@ include ../lib.mk $(TEST_PROGS_EXTENDED): $(GPIODIR)/$(GPIOOBJ) $(GPIODIR)/$(GPIOOBJ): - $(MAKE) -C $(GPIODIR) + $(MAKE) OUTPUT=$(GPIODIR)/ -C $(GPIODIR) $(GPIOINC): $(MAKE) -C ../../../.. headers_install