From patchwork Fri Feb 11 13:50:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bogdan Lezhepekov X-Patchwork-Id: 1591643 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=eE1YGqVC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JwFP94S9qz9sFq for ; Sat, 12 Feb 2022 00:50:21 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9CBF23C9F03 for ; Fri, 11 Feb 2022 14:50:19 +0100 (CET) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-5.smtp.seeweb.it (in-5.smtp.seeweb.it [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id B57023C9B4B for ; Fri, 11 Feb 2022 14:50:17 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-5.smtp.seeweb.it (Postfix) with ESMTPS id 31BD46010E6 for ; Fri, 11 Feb 2022 14:50:16 +0100 (CET) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 6A3721F3A8; Fri, 11 Feb 2022 13:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1644587416; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=psVWXUYjWqsIOj8zmpFXEYCliHzn0QAG4gJt9VpOyV0=; b=eE1YGqVCHEk9WtqtUq+AJntczMTaysmdVJbAgAno0dGxb7GafIwDNXrhLnDSXcKdtw/VUK 6y1A5CNXwYqBrpxeJ/2yJ84VsDNR0/8Qib+0K2YT1hdun5qVpxXbchS92JAWf+mY5OizOq pEQtUJP31/C7st5nJjX7klJmXlcVm4o= Received: from localhost.de (unknown [10.163.30.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 35017A3B8B; Fri, 11 Feb 2022 13:50:16 +0000 (UTC) To: ltp@lists.linux.it Date: Fri, 11 Feb 2022 15:50:13 +0200 Message-Id: <20220211135013.27443-1-bogdan.lezhepekov@suse.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-5.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH v1] syscalls/swapping01: Use .needs_kconfigs instead of .setup X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Bogdan Lezhepekov via ltp From: Bogdan Lezhepekov Reply-To: Bogdan Lezhepekov Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" needs_kconfigs is more beneficial for docparser Signed-off-by: Bogdan Lezhepekov --- testcases/kernel/mem/swapping/swapping01.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/testcases/kernel/mem/swapping/swapping01.c b/testcases/kernel/mem/swapping/swapping01.c index 3b4f0a61a..f6133cc0d 100644 --- a/testcases/kernel/mem/swapping/swapping01.c +++ b/testcases/kernel/mem/swapping/swapping01.c @@ -155,18 +155,15 @@ static void check_swapping(void) SAFE_WAITPID(pid, &status, 0); } -static void setup(void) -{ - if (access("/proc/swaps", F_OK)) - tst_brk(TCONF, "swap not supported by kernel"); -} - static struct tst_test test = { .needs_root = 1, .forks_child = 1, .min_mem_avail = 10, .test_all = test_swapping, - .setup = setup, + .needs_kconfigs = (const char *[]) { + "CONFIG_SWAP=y", + NULL + }, .tags = (const struct tst_tag[]) { {"linux-git", "50a15981a1fa"}, {}