From patchwork Tue Oct 4 12:06:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1685892 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=2001:1418:10:5::2; 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=qSqagbCK; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=2IFoY9uW; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mhbzh5DDDz1yqn for ; Tue, 4 Oct 2022 23:07:11 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id BC4493CA6BF for ; Tue, 4 Oct 2022 14:07:00 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (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 0856F3C80B3 for ; Tue, 4 Oct 2022 14:06:58 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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-7.smtp.seeweb.it (Postfix) with ESMTPS id 4A14520007A for ; Tue, 4 Oct 2022 14:06:57 +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 503C2218E9; Tue, 4 Oct 2022 12:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1664885217; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vm0kt+Rh3+ir+NYsA0gQB6onv0BzxIzUmyqFOMx2RBU=; b=qSqagbCKkhyG3A7Xn6hH4PSjpoCw175SQh8t69zAXMxUfJAhLK4HzVOpCHg2ryWeJEZQ2d ll3zyWE3YGE/Zg6PtF27/u5hMP5F3Efg5721tWtnuNa0saysq/4lG7HnslOBkHBHJFD3cY C8QfHIiPJ8scBwPtTCEQujObzN0u5Ms= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1664885217; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vm0kt+Rh3+ir+NYsA0gQB6onv0BzxIzUmyqFOMx2RBU=; b=2IFoY9uW8juH17fHQn6PZZ14QIEZl//SOqXgmhGr2WbtxtQy3PFaBVNPfCAzRDEyKmPJbl PCuP7phrugMtfgAA== 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 2C3BD139EF; Tue, 4 Oct 2022 12:06:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id wRMzCeEhPGPLNQAAMHmgww (envelope-from ); Tue, 04 Oct 2022 12:06:57 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 4 Oct 2022 14:06:53 +0200 Message-Id: <20221004120653.23237-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-7.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 autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 1/1] doc: LTP C And Shell Test API Comparison 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: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Deliberately put ndash (–) instead of TODO on missing features, because not everything needs to be implemented. Signed-off-by: Petr Vorel Reviewed-by: Richard Palethorpe --- Do you consider this useful? If yes, should there be links to the doc section? Kind regards, Petr doc/test-writing-guidelines.txt | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/doc/test-writing-guidelines.txt b/doc/test-writing-guidelines.txt index 420ae9c43..7043c3902 100644 --- a/doc/test-writing-guidelines.txt +++ b/doc/test-writing-guidelines.txt @@ -344,3 +344,67 @@ of the stable kernel ABI the associated test must be moved out of staging. This is primarily to help test kernel RCs by avoiding the need to download separate LTP patchsets. + +8 LTP C And Shell Test API Comparison +------------------------------------- + +Comparison of +https://github.com/linux-test-project/ltp/wiki/C-Test-API[C Test API] and +https://github.com/linux-test-project/ltp/wiki/Shell-Test-API[Shell Test API]. + +[options="header"] +|================================================================================ +| C API ('struct tst_test' members) | shell API ('$TST_*' environment variables) +| '.all_filesystems' | 'TST_ALL_FILESYSTEMS' +| '.bufs' | – +| '.caps' | – +| '.child_needs_reinit' | not applicable +| '.cleanup' | 'TST_CLEANUP' +| '.dev_extra_opts' | 'TST_DEV_EXTRA_OPTS' +| '.dev_fs_opts' | 'TST_DEV_FS_OPTS' +| '.dev_fs_type' | 'TST_FS_TYPE' +| '.dev_min_size' | not applicable +| '.format_device' | 'TST_FORMAT_DEVICE' +| '.max_runtime' | – +| '.min_cpus' | not applicable +| '.min_kver' | 'TST_MIN_KVER' +| '.min_mem_avail' | not applicable +| '.mnt_flags' | 'TST_MNT_PARAMS' +| '.mntpoint', '.mnt_data' | 'TST_MNTPOINT' +| '.mount_device' | 'TST_MOUNT_DEVICE' +| '.needs_cgroup_ctrls' | – +| '.needs_checkpoints' | 'NEEDS_CHECKPOINTS' +| '.needs_cmds' | 'TST_NEEDS_CMDS' +| '.needs_devfs' | – +| '.needs_device' | 'TST_NEEDS_DEVICE' +| '.needs_drivers' | 'TST_NEEDS_DRIVERS' +| '.needs_kconfigs' | 'TST_NEEDS_KCONFIGS' +| '.needs_overlay' | +| '.needs_rofs' | – +| '.needs_root' | 'TST_NEEDS_ROOT' +| '.needs_tmpdir' | 'TST_NEEDS_TMPDIR' +| '.options' | 'TST_PARSE_ARGS', 'TST_OPTS' +| '.resource_files' | – +| '.restore_wallclock' | not applicable +| '.sample' | – +| '.save_restore' | – +| '.scall' | not applicable +| '.setup' | 'TST_SETUP' +| '.skip_filesystems' | 'TST_SKIP_FILESYSTEMS' +| '.skip_in_compat' | – +| '.skip_in_lockdown' | – +| '.supported_archs' | not applicable +| '.tags' | – +| '.taint_check' | – +| '.tcnt' | 'TST_CNT' +| '.tconf_msg' | not applicable +| '.test', '.test_all' | 'TST_TESTFUNC' +| '.test_variants' | – +| '.timeout' | 'TST_TIMEOUT' +| '.tst_hugepage' | not applicable +| .format_device | 'TST_DEVICE' +| not applicable | 'TST_NEEDS_KCONFIGS_IFS' +| not applicable | 'TST_NEEDS_MODULE' +| not applicable | 'TST_POS_ARGS' +| not applicable | 'TST_USAGE' +|================================================================================