From patchwork Mon Oct 5 13:30:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1376781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C4hM1387jz9sTR for ; Tue, 6 Oct 2020 00:31:09 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 4801F3C5E21 for ; Mon, 5 Oct 2020 15:31:06 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) by picard.linux.it (Postfix) with ESMTP id 3D6383C2612 for ; Mon, 5 Oct 2020 15:30:36 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id DCEC41000BC0 for ; Mon, 5 Oct 2020 15:30:35 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 85954ADE4; Mon, 5 Oct 2020 13:30:35 +0000 (UTC) From: Cyril Hrubis To: ltp@lists.linux.it Date: Mon, 5 Oct 2020 15:30:48 +0200 Message-Id: <20201005133054.23587-6-chrubis@suse.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201005133054.23587-1-chrubis@suse.cz> References: <20201005133054.23587-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.2 required=7.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-4.smtp.seeweb.it Subject: [LTP] [PATCH 05/11] syscalls: Add a few documentation comments 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: Cyril Hrubis Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Cyril Hrubis So that it shows up in the resulting json file. Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/abort/abort01.c | 16 ++++++++++------ testcases/kernel/syscalls/accept/accept01.c | 8 +++++--- testcases/kernel/syscalls/accept/accept02.c | 7 +++++-- testcases/kernel/syscalls/acct/acct01.c | 5 +++++ testcases/kernel/syscalls/acct/acct02.c | 6 ++++-- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/testcases/kernel/syscalls/abort/abort01.c b/testcases/kernel/syscalls/abort/abort01.c index 9505a5eec..b93324b34 100644 --- a/testcases/kernel/syscalls/abort/abort01.c +++ b/testcases/kernel/syscalls/abort/abort01.c @@ -5,14 +5,18 @@ * 01/02/2003 Port to LTP avenkat@us.ibm.com * 11/11/2002: Ported to LTP Suite by Ananda * 06/30/2001 Port to Linux nsharoff@us.ibm.com - * - * ALGORITHM - * Fork child. Have child abort, check return status. - * - * RESTRICTIONS - * The ulimit for core file size must be greater than 0. */ +/*\ + * [DESCRIPTION] + * Checks that process which called abort() gets killed by SIGIOT and dumps core. + * + * [ALGORITHM] + * - Fork child. + * - Child calls abort. + * - Parent checks return status. +\*/ + #include #include #include diff --git a/testcases/kernel/syscalls/accept/accept01.c b/testcases/kernel/syscalls/accept/accept01.c index 4e30906f2..01d6db84c 100644 --- a/testcases/kernel/syscalls/accept/accept01.c +++ b/testcases/kernel/syscalls/accept/accept01.c @@ -3,11 +3,13 @@ /* * Copyright (c) International Business Machines Corp., 2001 * 07/2001 Ported by Wayne Boyer - * - * Description: - * Verify that accept() returns the proper errno for various failure cases */ +/*\ + * [DESCRIPTION] + * Verify that accept() returns the proper errno for various failure cases. +\*/ + #include #include #include diff --git a/testcases/kernel/syscalls/accept/accept02.c b/testcases/kernel/syscalls/accept/accept02.c index 37ab8b64f..7fb6a494a 100644 --- a/testcases/kernel/syscalls/accept/accept02.c +++ b/testcases/kernel/syscalls/accept/accept02.c @@ -3,7 +3,10 @@ * Copyright (c) 2019 SUSE LLC * Author: Christian Amann */ -/* Test for CVE-2017-8890 +/*\ + * [DESCRIPTION] + * + * Test for CVE-2017-8890 * * In Kernels up to 4.10.15 missing commit 657831ff the multicast * group information of a socket gets copied over to a newly created @@ -16,7 +19,7 @@ * * For more information about this CVE see: * https://www.suse.com/security/cve/CVE-2017-8890/ - */ +\*/ #include #include diff --git a/testcases/kernel/syscalls/acct/acct01.c b/testcases/kernel/syscalls/acct/acct01.c index c161d2a2c..60e81bfad 100644 --- a/testcases/kernel/syscalls/acct/acct01.c +++ b/testcases/kernel/syscalls/acct/acct01.c @@ -7,6 +7,11 @@ /* 12/03/2002 Port to LTP robbiew@us.ibm.com */ /* 06/30/2001 Port to Linux nsharoff@us.ibm.com */ +/*\ + * [DOCUMENTATION] + * Verify that acct() returns proper errno on failure. +\*/ + #include #include #include diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c index 8ee1bfcf8..e718e7df4 100644 --- a/testcases/kernel/syscalls/acct/acct02.c +++ b/testcases/kernel/syscalls/acct/acct02.c @@ -3,7 +3,9 @@ * Copyright (c) SUSE LLC, 2019 * Author: Christian Amann */ -/* +/*\ + * [DOCUMENTATION] + * * This tests if the kernel writes correct data to the * process accounting file. * @@ -19,7 +21,7 @@ * * This is also accidental regression test for: * 4d9570158b626 kernel/acct.c: fix the acct->needcheck check in check_free_space() - */ +\*/ #include #include