From patchwork Tue Sep 6 09:26:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1674625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=m8nUnuqd; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=SPTMO5MA; dkim-atps=neutral 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 ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MMKlT4pybz1yhd for ; Tue, 6 Sep 2022 19:26:45 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 545743CA6CB for ; Tue, 6 Sep 2022 11:26:43 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 66EB33C285E for ; Tue, 6 Sep 2022 11:26:22 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (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-3.smtp.seeweb.it (Postfix) with ESMTPS id 50B451A00E1A for ; Tue, 6 Sep 2022 11:26:20 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2AA4A33B8A; Tue, 6 Sep 2022 09:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1662456380; 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=fWWG+sF3qN8pghQuQc/pO95cf6GxZSSH+gxxk9D43UA=; b=m8nUnuqdtninODes6SGH1zwOIYwhTyKs9ynJ7gWPDplfg5yvearh4kpJx0Egj+MrB9cn2V rqrgWEgYGe2fBFLBsg3T3nbsLVNjzAIsiSvFBklxK/ID0SYE0OC6tgx7KRaH22QNYriyXs u4O9QrllEfImsBMR1EjGJlaXXwr4QNg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1662456380; 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=fWWG+sF3qN8pghQuQc/pO95cf6GxZSSH+gxxk9D43UA=; b=SPTMO5MApD9F9iEvQkS+yyvG+05L6EXdeGZMEJ1XiJ/epN9w0hJfXpOC8sauRdylQvOkNL d9QkAc7PkEj6GOAg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id DE2E113A93; Tue, 6 Sep 2022 09:26:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wsRnMzsSF2NTawAAMHmgww (envelope-from ); Tue, 06 Sep 2022 09:26:19 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 6 Sep 2022 11:26:12 +0200 Message-Id: <20220906092615.15116-1-pvorel@suse.cz> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-3.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_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 0/3] fanotify{14,20}: cleanup 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: , Cc: Jan Kara , Matthew Bobrowski Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Hi, just an example how to further cleanup fanotify tests by using test macros from include/tst_test_macros.h. This can wait till Amir's FAN_MARK_IGNORE patchset [1] is merged (unless there is going to be v2). fanotify20 is an example what I'd address in the code, fanotify14 just uses newly added TST_EXP_FD_ERRNO() (more cleanup here and actually in other tests could be done). I also admit code in include/tst_test_macros.h is a bit hard to read due being macro. We should probably add some documentation to it. Kind regards, Petr [1] https://lore.kernel.org/ltp/20220905154239.2652169-1-amir73il@gmail.com/ Petr Vorel (3): tst_test_macros: Add TST_EXP_FD_ERRNO fanotify20: Simplify code fanotify14: Use TST_EXP_FD_ERRNO() include/tst_test_macros.h | 10 ++ .../kernel/syscalls/fanotify/fanotify14.c | 118 +++++------------- .../kernel/syscalls/fanotify/fanotify20.c | 81 +++--------- 3 files changed, 62 insertions(+), 147 deletions(-)