Received: by 10.192.165.148 with SMTP id m20csp682105imm; Fri, 4 May 2018 18:16:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq8bCkdeElKTXjHhK5H0gTGXYNqVpbL51NMM6lUp7pjnhz+9Sd5u8t95Gysyh3TgNJ5CafH X-Received: by 2002:a63:78ca:: with SMTP id t193-v6mr12516955pgc.255.1525483004188; Fri, 04 May 2018 18:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525483004; cv=none; d=google.com; s=arc-20160816; b=Hh8MsPqwMxH0XNWhhrAcY/UiafkvFWy+11I1fF53qJ1q5QHyl/u+lSlyQM9T9CFXZN bydF5U87MzMRmQtDIhcxPwv3yxJtEa1zMk2dIxlsulrKzvbmBPOPCjinMYwqA3Pric6Y P4iRaYVzTwymgx5YhLoAXN5aY3N7Iiujl/bzOqV0AC2ZmLOTzg2FFdnvYiejbqZvkoiV xFAgouQnHCNVfb5+X5JJIdNLT5WA18IuaB8imOx0NgYEuCGXvZuZCmCsuuuaJYESzyL7 uyYSyJEr0DNRanScyI4AlZyhGxvtcKniMnlhwe62QS9+OmnMuwZn157oJHL8suTAdJb2 XpIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=ijutXDl2Rd0aJz7A0yyPSLmhYkCQCWV6kDtirGqOf08=; b=CNJA60Shp36eLvRjvqA6g6us3hS080OTxf49lKg3lXH3tG+Z4Aq/OU5Y473QzvmaCQ xi+w23DIqZt7QGrfYMOP3ZwhYko6Io7jBp6lUDvXvCOIWrvoT1jq41iKBTYnhK8o7jSv ZyJH2CUocKvUSlk0FpfyUS/u1hgwS1uUwrKbMZOT54AtsTXj7Okvk2jdOEhXykuVqY5+ 7CC0xv923DsyS2Mot2LrZHE3o5JqSTLU1Z4PD49VvcQ+kLk15pFmVGLgLWAMqo1Jdfu+ 3laGuwISbHxpA9XRCdHkTljGgu6XhVBxZXcHDp0fS3GaumjMyTuU4ppy72fyqxgTXQMi hqcA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si16699752plt.149.2018.05.04.18.16.30; Fri, 04 May 2018 18:16:44 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbeEEBP7 (ORCPT + 99 others); Fri, 4 May 2018 21:15:59 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:50482 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbeEEBP6 (ORCPT ); Fri, 4 May 2018 21:15:58 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 4356D21235; Sat, 5 May 2018 01:15:58 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GYE1duIcci_H; Sat, 5 May 2018 01:15:58 +0000 (UTC) Received: from localhost.localdomain (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id CF99321020; Sat, 5 May 2018 01:15:53 +0000 (UTC) From: "Shuah Khan (Samsung OSG)" To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/24] selftests: ipc: return Kselftest Skip code for skipped tests Date: Fri, 4 May 2018 19:13:16 -0600 Message-Id: <20180505011328.32078-12-shuah@kernel.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180505011328.32078-1-shuah@kernel.org> References: <20180505011328.32078-1-shuah@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When ipc 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 the test is skipped. Signed-off-by: Shuah Khan (Samsung OSG) --- tools/testing/selftests/ipc/msgque.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/ipc/msgque.c b/tools/testing/selftests/ipc/msgque.c index ee9382bdfadc..dac927e82336 100644 --- a/tools/testing/selftests/ipc/msgque.c +++ b/tools/testing/selftests/ipc/msgque.c @@ -196,10 +196,9 @@ int main(int argc, char **argv) int msg, pid, err; struct msgque_data msgque; - if (getuid() != 0) { - printf("Please run the test as root - Exiting.\n"); - return ksft_exit_fail(); - } + if (getuid() != 0) + return ksft_exit_skip( + "Please run the test as root - Exiting.\n"); msgque.key = ftok(argv[0], 822155650); if (msgque.key == -1) { -- 2.14.1