From patchwork Fri Aug 14 13:43:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bamvor Zhang Jian X-Patchwork-Id: 52441 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id D2E482031F for ; Fri, 14 Aug 2015 13:47:50 +0000 (UTC) Received: by wijp15 with SMTP id p15sf6571745wij.3 for ; Fri, 14 Aug 2015 06:47:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Q+Mukk0J3gp4MLjg526LGnLFWz6xr7COT+jQW9W5vLA=; b=dx04QiHUzSsMFz/3QJRqHjh/DrELYSKAsxfGLj2bObleud0qIQKVFrMXFqLh2+ivL7 Nyb79lH3qMikMOaoJAWCWH1NtqUhTxQCC900t7ASFcc24PEBQn/UrSuvGUVV/UGS+oxk A/tkVT5VpTULSBMJXF04r/S6n3eT1OM6CEv995FbLgqg+9/Uis7bUm0o3kQ4XjWEU0OG 0q7mYWFEXiT/dr35tlZGw6HltZWV/YWVoi4s2C763c4D+6XMclZtjdGDHe7Xmu5b+0hv ENsKQEa1KxXf1ix2fYbRcDJOggdszjzOcCMnJiWB8xVPJhhOeOYad5+bI9Thg/WBkcMr KIYA== X-Gm-Message-State: ALoCoQnVzVzofG7sFX2HWZR8ACIdSXmNZPo6eBHcW4f/fygpXWHvv3ggL9o47pZCIeEW7rqF38tC X-Received: by 10.112.78.101 with SMTP id a5mr9998602lbx.9.1439560070134; Fri, 14 Aug 2015 06:47:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.40 with SMTP id kv8ls361762lac.94.gmail; Fri, 14 Aug 2015 06:47:49 -0700 (PDT) X-Received: by 10.152.21.103 with SMTP id u7mr43413600lae.49.1439560069951; Fri, 14 Aug 2015 06:47:49 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id m8si5997689lah.110.2015.08.14.06.47.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 06:47:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcbn3 with SMTP id bn3so45566221lbc.2 for ; Fri, 14 Aug 2015 06:47:49 -0700 (PDT) X-Received: by 10.152.28.193 with SMTP id d1mr30562102lah.72.1439560069854; Fri, 14 Aug 2015 06:47:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1634657lba; Fri, 14 Aug 2015 06:47:48 -0700 (PDT) X-Received: by 10.68.191.130 with SMTP id gy2mr39199484pbc.124.1439560068666; Fri, 14 Aug 2015 06:47:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ad1si9068367pbc.245.2015.08.14.06.47.47; Fri, 14 Aug 2015 06:47:48 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755264AbbHNNrq (ORCPT + 28 others); Fri, 14 Aug 2015 09:47:46 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:33502 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755227AbbHNNro (ORCPT ); Fri, 14 Aug 2015 09:47:44 -0400 Received: by oio137 with SMTP id 137so44443483oio.0 for ; Fri, 14 Aug 2015 06:47:43 -0700 (PDT) X-Received: by 10.202.185.133 with SMTP id j127mr38350069oif.9.1439560063536; Fri, 14 Aug 2015 06:47:43 -0700 (PDT) Received: from linux-j170.site ([107.191.45.96]) by smtp.gmail.com with ESMTPSA id fx10sm2844558obb.27.2015.08.14.06.47.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 06:47:42 -0700 (PDT) From: Bamvor Jian Zhang To: linux-kernel@vger.kernel.org Cc: broonie@linaro.org, khilman@linaro.org, tyler.baker@linaro.org, bamvor.zhangjian@linaro.org, shuahkh@osg.samsung.com Subject: [PATCH 3/7] selftests: exec: fix for running and installing Date: Fri, 14 Aug 2015 21:43:34 +0800 Message-Id: <1439559818-21666-4-git-send-email-bamvor.zhangjian@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> References: <1439559818-21666-1-git-send-email-bamvor.zhangjian@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bamvor.zhangjian@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Fix three issues in exec testcase: Add RUN_TESTS rules in order to running the testcases in the build directory through "make TARGETS=exec kselftest" Copy symbol link and non-executable file instead of install it, otherwise this test will fail after installation. Exec testcases need a "Makefile" in line 346, otherwise it will be ENOENT instead of EACCES. Signed-off-by: Bamvor Jian Zhang --- tools/testing/selftests/exec/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/exec/Makefile b/tools/testing/selftests/exec/Makefile index 6b76bfd..34966a0 100644 --- a/tools/testing/selftests/exec/Makefile +++ b/tools/testing/selftests/exec/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall +CFLAGS = -Wall -g BINARIES = execveat DEPS = execveat.symlink execveat.denatured script all: $(BINARIES) $(DEPS) @@ -18,11 +18,19 @@ execveat.denatured: execveat $(CC) $(CFLAGS) -o $@ $^ TEST_PROGS := execveat -TEST_FILES := $(DEPS) +TEST_FILES := script include ../lib.mk -override EMIT_TESTS := echo "mkdir -p subdir; (./execveat && echo \"selftests: execveat [PASS]\") || echo \"selftests: execveat [FAIL]\"" +override RUN_TESTS := mkdir -p subdir; (./execveat && echo "selftests: execveat [PASS]") || echo "selftests: execveat [FAIL]" + +override EMIT_TESTS := echo "mkdir -p subdir; touch Makefile; (./execveat && echo \"selftests: execveat [PASS]\") || echo \"selftests: execveat [FAIL]\"" + +override define INSTALL_RULE + mkdir -p $(INSTALL_PATH) + install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) + cp -a execveat.symlink execveat.denatured $(INSTALL_PATH) +endef clean: rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*