From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6D39C32792 for ; Mon, 30 Sep 2019 20:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C53AB224FE for ; Mon, 30 Sep 2019 20:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729870AbfI3Ui1 (ORCPT ); Mon, 30 Sep 2019 16:38:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:14990 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfI3Ui1 (ORCPT ); Mon, 30 Sep 2019 16:38:27 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8UHWm3l083029 for ; Mon, 30 Sep 2019 13:50:26 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vbkj100vn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Sep 2019 13:50:26 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Sep 2019 18:50:24 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 30 Sep 2019 18:50:22 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8UHnrlG36831614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Sep 2019 17:49:53 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 951914C044; Mon, 30 Sep 2019 17:50:21 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 75D444C04E; Mon, 30 Sep 2019 17:50:21 +0000 (GMT) Received: from dyn-9-152-96-81.boeblingen.de.ibm.com (unknown [9.152.96.81]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 30 Sep 2019 17:50:21 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH v2] selftests: fix prepending $(OUTPUT) to $(TEST_PROGS) From: Ilya Leoshkevich In-Reply-To: Date: Mon, 30 Sep 2019 19:50:21 +0200 Cc: linux-kselftest@vger.kernel.org, Heiko Carstens , Vasily Gorbik Content-Transfer-Encoding: 7bit References: <20190910121813.45742-1-iii@linux.ibm.com> To: shuah X-Mailer: Apple Mail (2.3445.9.1) X-TM-AS-GCONF: 00 x-cbid: 19093017-4275-0000-0000-0000036CA069 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19093017-4276-0000-0000-0000387F2860 Message-Id: <5CE66619-878B-4CC7-8477-32050A131FB4@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-30_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=4 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=914 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909300163 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org > Am 16.09.2019 um 18:18 schrieb shuah : > > On 9/10/19 6:18 AM, Ilya Leoshkevich wrote: >> The current logic prepends $(OUTPUT) only to the first member of >> $(TEST_PROGS). Use $(addprefix) to prepend it to each member. > > Can you please send me the error messages you are seeing so I can see > what is being fixed. linux# make kselftest TARGETS=bpf O=/mnt/linux-build Without the patch: # selftests: bpf: test_libbpf.sh # ./test_libbpf.sh: line 23: ./test_libbpf_open: No such file or directory # test_libbpf: failed at file test_l4lb.o # selftests: test_libbpf [FAILED] With the patch: # selftests: bpf: test_libbpf.sh # selftests: test_libbpf [PASS] What happens is that run_one() does cd `dirname $TEST` dirname is . without the patch, so the test cannot access the files generated in $(OUTPUT). > >> Also, $(OUTPUT) is assumed to end with a / almost everywhere else in >> the kernel, make this the case for kselftest as well. > > Why are these two changes in one patch? Does this fix 1a940687e424? > If so how? I will split the patch in two and resend. Adding / does not fix anything, it just makes the code more uniform w.r.t. the rest of the tree.