Received: by 10.192.165.148 with SMTP id m20csp3673925imm; Mon, 7 May 2018 17:05:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPW57BLZb7knaFtKmvMyf3w/82pUGZZ23a5hhjg5vBl2XUlO9l/DlxUskjvjJeZeYgUiya X-Received: by 10.98.67.83 with SMTP id q80mr37983699pfa.228.1525737931009; Mon, 07 May 2018 17:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525737930; cv=none; d=google.com; s=arc-20160816; b=W9TYN06xkwn33qe9/jgMhvHvJZDftyxlNwKSVR7caqqAsIKf3KOlI8HsL200jKLE7C DVHqkTBmouLLxmYHXoN8EhkeSxf3hmFwVgqccM2w9Tg0KGpXvnH6pKw9VYkl3YQk2xzW ChqUUkkwKlSV8punUeM4ax/lJZE8BZ0xyz5yoSRyqxiqBDCKneaFT9TunAIDR73vcfPc ZdrlEZOXPIKPq0uHfGzbXyX1G0nhuobVYWrO/FHM7DqAe0fVd2UPI/ruqfEJx4pJhSQ2 cP7TBckEJ90YdsbL5QImd1ObB48jg6JIadu5+u/cYt1Z3q7USnVQ/pQEWUKMqe2vuipO PcrA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=yM98/wLREI7C85f+NYDLk9ISymAxFsObl/xuhRRJMsg=; b=QdeX8/lISq0+X/w4EU9wZVrtuQYstxkNyJ1G9pvWMTeanOjTBuDSvyiCTDHeiJkXfI 5AwBxUIPinU7NZe6HgN40aXkrzGf66JJm0e1Xzz8qN8b2NOYOefMIVlndLRo6Jiv2ddI 1MVi6c/MTA5KzrOZnKhqB7IW14rKaDCON2/ipiWmqKwbUC6q0QAJ++DaHWEF2RzymWrE 5YfA+9zrjg54N0kwkuXokKPMKo0nWB+zBnbenZv2oOdPc6Q2lY/3SmSdmjToWTLwIJQs jIRNUf+5YqnYnGZMx5pIJJ20+/us3sDNGLjRpkDda2ILLFRN6rN2US8a7R62meg381tD 40EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i/os7Qfe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10-v6si17991762pge.245.2018.05.07.17.05.15; Mon, 07 May 2018 17:05:30 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i/os7Qfe; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753425AbeEHADq (ORCPT + 99 others); Mon, 7 May 2018 20:03:46 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:36040 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbeEHADo (ORCPT ); Mon, 7 May 2018 20:03:44 -0400 Received: by mail-pl0-f67.google.com with SMTP id v24-v6so1088543plo.3; Mon, 07 May 2018 17:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yM98/wLREI7C85f+NYDLk9ISymAxFsObl/xuhRRJMsg=; b=i/os7QfeLDIQfL+1bJf/0oaDYZ5Bp8cu3berbbn8P/kNJNnx1RmEj4iBAaKhjerSnk ovgh3A/YQaIhvrqMfG5k9vbAd1zs4cFRytrN/zZ4CqhGEfOIxQ64/msimW3sbsZOMv8S 3OQ0BLlXx/8x6ZVJte5cTqu3bWMyUR2agxUtCE1ZP5qlalU4eDzLCGvEi9kyfjD0IABa IGlP1fRN/WyJ5ALSTibwJhjhcpwMhWEcD2ZDCU8BkITyT7s2g3kyv3E+81/N2p3PybQR 1/tDBL+LYDtS7Im7ahvK6rVP0yfcy1oWrT8WJK5YZf6TXdPo7Kfn0cmd/2I476asRgwF cZrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yM98/wLREI7C85f+NYDLk9ISymAxFsObl/xuhRRJMsg=; b=G4R80PMK3KRNkF8A+M/OvdNuOcVWdnyntgNH8kSaT4I01hF/Bdeb7LgCBiPDLaMpIQ 2V83EkAX89fUlN2/FUhkfmjJWcH1yjFlnsbYBDbZKHZasV2ZI2R0KxGmODac1ibox722 ZXP2x3mugzWY9GY4/fy+cK0UN3MOHGjJdV6Q5orEsP51rmUM3ChWekh4wHzY9Z+VtQD3 J1pECmMcTqyeyU9K9FDROF3T/lusC+lqr0th76sI453GLghechEn5YtuGyOXCX+19gHJ Bar235kP1onMIPraDEe5Rs1ySFQyCevynU6Lgy8NsM38HYq8qO6WtLTpM0axOpN7X809 POMg== X-Gm-Message-State: ALQs6tAUcggb7aiTBT5ek4lEs/K9nAjg4i6nIv92Fqu82uT7m5J/0LnF kCNc1FOzbXJHhfiRV3WUgA2lmPnj X-Received: by 2002:a17:902:b942:: with SMTP id h2-v6mr40302880pls.312.1525737823974; Mon, 07 May 2018 17:03:43 -0700 (PDT) Received: from smuckle.san.corp.google.com ([2620:15c:2d:3:fa74:b312:5fef:6cbf]) by smtp.gmail.com with ESMTPSA id g3-v6sm27300980pgr.34.2018.05.07.17.03.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 May 2018 17:03:42 -0700 (PDT) Subject: Re: [PATCH 06/24] selftests: exec: return Kselftest Skip code for skipped tests To: "Shuah Khan (Samsung OSG)" Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180505011328.32078-1-shuah@kernel.org> <20180505011328.32078-6-shuah@kernel.org> From: Steve Muckle Message-ID: Date: Mon, 7 May 2018 17:03:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180505011328.32078-6-shuah@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/04/2018 06:13 PM, Shuah Khan (Samsung OSG) wrote: > When execveat test is skipped because of unmet dependencies and/or > unsupported configuration, it exits with error which is treated as > a fail by the Kselftest framework. This leads to false negative > result even when the test could not be run. > > Change it to return kselftest skip code when a test gets skipped to > clearly report that the test could not be run. > > Change it to use ksft_exit_skip() when kernel doesn't support execveat. > > Signed-off-by: Shuah Khan (Samsung OSG) > --- > tools/testing/selftests/exec/execveat.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tools/testing/selftests/exec/execveat.c b/tools/testing/selftests/exec/execveat.c > index 67cd4597db2b..47cbf54d0801 100644 > --- a/tools/testing/selftests/exec/execveat.c > +++ b/tools/testing/selftests/exec/execveat.c > @@ -20,6 +20,8 @@ > #include > #include > > +#include "../kselftest.h" > + > static char longpath[2 * PATH_MAX] = ""; > static char *envp[] = { "IN_TEST=yes", NULL, NULL }; > static char *argv[] = { "execveat", "99", NULL }; > @@ -249,8 +251,8 @@ static int run_tests(void) > errno = 0; > execveat_(-1, NULL, NULL, NULL, 0); > if (errno == ENOSYS) { > - printf("[FAIL] ENOSYS calling execveat - no kernel support?\n"); > - return 1; > + ksft_exit_skip( > + "ENOSYS calling execveat - no kernel support?\n"); > } > > /* Change file position to confirm it doesn't affect anything */ > LGTM. thanks, Steve