From patchwork Tue Jun 20 12:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1797273 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=l1Mv4BEu; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=va7p++M8; 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)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qllck3sJSz20WT for ; Tue, 20 Jun 2023 22:02:30 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 62DB63CE0FE for ; Tue, 20 Jun 2023 14:02:28 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (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 3B7B03CACC1 for ; Tue, 20 Jun 2023 14:02:04 +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-2.smtp.seeweb.it (Postfix) with ESMTPS id 3E668600665 for ; Tue, 20 Jun 2023 14:02:03 +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 3A8BF218B0; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=yHlPpeT4lqkF7u0R6oL6jjMgCfgDIAb4svty8/qd5sE=; b=l1Mv4BEueJ1gqLte0WqNhZRgZR8KJOZ1tpSUEk92iTwxhDu95MihjFoeN3ZwS6bgRykAdt OXfEJu7Qj0SqzAue8nSO86MBJ3f7qhly/Vf+RoZ0mPxjYlFw1atfmgGuY87KBz4v0KVU6o DAzap8ms83ugJGiwKaQYXSIdTdqC/58= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=yHlPpeT4lqkF7u0R6oL6jjMgCfgDIAb4svty8/qd5sE=; b=va7p++M8lamkbOvRvJyEFU5aa/zwSLIDv1v137J3CBsrYhzY/hZt8EnUvNexPuUI29nYJW SWyYkp8XZAldRrBQ== 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 088E1133A9; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8I+dADuVkWSQDAAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:02:03 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 20 Jun 2023 14:01:57 +0200 Message-Id: <20230620120159.320052-2-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230620120159.320052-1-pvorel@suse.cz> References: <20230620120159.320052-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-2.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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] ioprio: Move fallback constants and structs to LAPI header 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: Niklas Cassel Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Originally lapi headers were only for common headers, for fallback constants and structs usable only in test for particular subsystem, we mix them together with other helper functions in header placed in the test directory. But later we started to move to lapi also these fallbacks (e.g. fanotify.h in a05dbc4fa). + Remove unused headers in the tests. Signed-off-by: Petr Vorel Reviewed-by: Niklas Cassel --- include/lapi/ioprio.h | 47 +++++++++++++++++++ testcases/kernel/syscalls/ioprio/ioprio.h | 42 ++--------------- .../kernel/syscalls/ioprio/ioprio_get01.c | 3 -- .../kernel/syscalls/ioprio/ioprio_set01.c | 3 -- .../kernel/syscalls/ioprio/ioprio_set02.c | 3 -- .../kernel/syscalls/ioprio/ioprio_set03.c | 3 -- 6 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 include/lapi/ioprio.h diff --git a/include/lapi/ioprio.h b/include/lapi/ioprio.h new file mode 100644 index 000000000..871aa0278 --- /dev/null +++ b/include/lapi/ioprio.h @@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (c) 2019 Linus Walleij + */ + +#ifndef LAPI_IOPRIO_H__ +#define LAPI_IOPRIO_H__ + +#include "config.h" + +#ifdef HAVE_LINUX_IOPRIO_H +# include +#else + +enum { + IOPRIO_CLASS_NONE = 0, + IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE, + IOPRIO_CLASS_IDLE, +}; + +enum { + IOPRIO_WHO_PROCESS = 1, + IOPRIO_WHO_PGRP, + IOPRIO_WHO_USER, +}; + +# define IOPRIO_CLASS_SHIFT (13) +# define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) + +# define IOPRIO_PRIO_CLASS(data) ((data) >> IOPRIO_CLASS_SHIFT) +# define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data) + +#endif + +/* The RT and BE I/O priority classes have 8 priority levels 0..7 */ +#ifdef IOPRIO_NR_LEVELS +# define IOPRIO_PRIO_NUM IOPRIO_NR_LEVELS +#else +# define IOPRIO_PRIO_NUM 8 +#endif + +#ifndef IOPRIO_PRIO_LEVEL +# define IOPRIO_PRIO_LEVEL(data) ((data) & IOPRIO_PRIO_MASK) +#endif + +#endif /* LAPI_IOPRIO_H__ */ diff --git a/testcases/kernel/syscalls/ioprio/ioprio.h b/testcases/kernel/syscalls/ioprio/ioprio.h index 4d4828807..dbe27c15f 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio.h +++ b/testcases/kernel/syscalls/ioprio/ioprio.h @@ -1,48 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (c) 2019 Linus Walleij + * Copyright (c) 2023 Linux Test Project */ #ifndef LTP_IOPRIO_H #define LTP_IOPRIO_H -#include "config.h" - -#ifdef HAVE_LINUX_IOPRIO_H -# include -#else - -enum { - IOPRIO_CLASS_NONE = 0, - IOPRIO_CLASS_RT, - IOPRIO_CLASS_BE, - IOPRIO_CLASS_IDLE, -}; - -enum { - IOPRIO_WHO_PROCESS = 1, - IOPRIO_WHO_PGRP, - IOPRIO_WHO_USER, -}; - -# define IOPRIO_CLASS_SHIFT (13) -# define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) - -# define IOPRIO_PRIO_CLASS(data) ((data) >> IOPRIO_CLASS_SHIFT) -# define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data) - -#endif - -/* The RT and BE I/O priority classes have 8 priority levels 0..7 */ -#ifdef IOPRIO_NR_LEVELS -# define IOPRIO_PRIO_NUM IOPRIO_NR_LEVELS -#else -# define IOPRIO_PRIO_NUM 8 -#endif - -#ifndef IOPRIO_PRIO_LEVEL -# define IOPRIO_PRIO_LEVEL(data) ((data) & IOPRIO_PRIO_MASK) -#endif +#include "lapi/ioprio.h" +#include "lapi/syscalls.h" static const char * const to_class_str[] = { [IOPRIO_CLASS_NONE] = "NONE", @@ -106,4 +72,4 @@ static inline void ioprio_check_setting(int class, int prio, int report) newprio); } -#endif +#endif /* LTP_IOPRIO_H */ diff --git a/testcases/kernel/syscalls/ioprio/ioprio_get01.c b/testcases/kernel/syscalls/ioprio/ioprio_get01.c index 6e822434e..ceac5a758 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_get01.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_get01.c @@ -6,11 +6,8 @@ * Basic ioprio_get() test. Gets the current process I/O priority and * checks that the values are sane. */ -#include -#include #include "tst_test.h" -#include "lapi/syscalls.h" #include "ioprio.h" static void run(void) diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set01.c b/testcases/kernel/syscalls/ioprio/ioprio_set01.c index 19953ba36..243337bd2 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set01.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set01.c @@ -7,11 +7,8 @@ * bumps it up one notch, then down two notches and checks that the * new priority is reported back correctly. */ -#include -#include #include "tst_test.h" -#include "lapi/syscalls.h" #include "ioprio.h" static int orig_class; diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set02.c b/testcases/kernel/syscalls/ioprio/ioprio_set02.c index 328a130cb..0faf03767 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set02.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set02.c @@ -7,11 +7,8 @@ * Tests to set all 8 priority levels for best effort priority, then * switches to test all 8 priority levels for idle priority. */ -#include -#include #include "tst_test.h" -#include "lapi/syscalls.h" #include "ioprio.h" static void run(void) diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set03.c b/testcases/kernel/syscalls/ioprio/ioprio_set03.c index d6b44df85..b67887205 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set03.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set03.c @@ -6,11 +6,8 @@ * Negative ioprio_set() test. Test some non-working priorities to make * sure they don't work. */ -#include -#include #include "tst_test.h" -#include "lapi/syscalls.h" #include "ioprio.h" static void run(void) From patchwork Tue Jun 20 12:01:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1797270 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=viNG3+qP; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=Ivl78fKM; 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)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QllcL1h9pz20WT for ; Tue, 20 Jun 2023 22:02:09 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 80D853CC493 for ; Tue, 20 Jun 2023 14:02:06 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) (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 DF26B3CACC1 for ; Tue, 20 Jun 2023 14:02:04 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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-6.smtp.seeweb.it (Postfix) with ESMTPS id 2C7A71400BC9 for ; Tue, 20 Jun 2023 14:02:03 +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-out2.suse.de (Postfix) with ESMTPS id 70CD31F38A; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=E/Ew6eD339fWI1bgNvMF0bYZJWt1nrBsQKKLqLaONTE=; b=viNG3+qPAp01zDco9tFfACIQ6SSKzTBVcu2BB+nrqFIDnKu6Y+nx8hP38zLrhkG+8cDynd LMU48oDPDx6jimaHosyQJhlX21SQuDBV8VhZhQvdMOdK6WaZcP2VUIBaqror+jVGsiTi6f sq+/29aOSxbwx17JhmMCfx6Ze9yhr3A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=E/Ew6eD339fWI1bgNvMF0bYZJWt1nrBsQKKLqLaONTE=; b=Ivl78fKMJrS25nH0hJnSr6DgHPvKCs3WK0R3cNRa7BYdm3yhUNQDVtUxWdgxHvvMHTmouO YJ/GCCOIkXqxjkAQ== 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 456C6133A9; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4HaUDzuVkWSQDAAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:02:03 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 20 Jun 2023 14:01:58 +0200 Message-Id: <20230620120159.320052-3-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230620120159.320052-1-pvorel@suse.cz> References: <20230620120159.320052-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 at in-6.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 shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-6.smtp.seeweb.it Subject: [LTP] [PATCH 2/3] ioprio: Add docparse markers 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: Niklas Cassel Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Petr Vorel Reviewed-by: Niklas Cassel --- testcases/kernel/syscalls/ioprio/ioprio_get01.c | 6 +++++- testcases/kernel/syscalls/ioprio/ioprio_set01.c | 6 +++++- testcases/kernel/syscalls/ioprio/ioprio_set02.c | 6 +++++- testcases/kernel/syscalls/ioprio/ioprio_set03.c | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/syscalls/ioprio/ioprio_get01.c b/testcases/kernel/syscalls/ioprio/ioprio_get01.c index ceac5a758..f1325be31 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_get01.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_get01.c @@ -1,8 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2019 Linus Walleij + * Copyright (c) 2023 Linux Test Project + */ + +/*\ + * [Description] * - * Description: * Basic ioprio_get() test. Gets the current process I/O priority and * checks that the values are sane. */ diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set01.c b/testcases/kernel/syscalls/ioprio/ioprio_set01.c index 243337bd2..0868cea7c 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set01.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set01.c @@ -1,8 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2019 Linus Walleij + * Copyright (c) 2019-2023 Linux Test Project + */ + +/*\ + * [Description] * - * Description: * Basic ioprio_set() test. Gets the current process I/O priority and * bumps it up one notch, then down two notches and checks that the * new priority is reported back correctly. diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set02.c b/testcases/kernel/syscalls/ioprio/ioprio_set02.c index 0faf03767..37db7bf42 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set02.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set02.c @@ -1,8 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2019 Linus Walleij + * Copyright (c) 2023 Linux Test Project + */ + +/*\ + * [Description] * - * Description: * Extended ioprio_set() test. * Tests to set all 8 priority levels for best effort priority, then * switches to test all 8 priority levels for idle priority. diff --git a/testcases/kernel/syscalls/ioprio/ioprio_set03.c b/testcases/kernel/syscalls/ioprio/ioprio_set03.c index b67887205..6efcacc1c 100644 --- a/testcases/kernel/syscalls/ioprio/ioprio_set03.c +++ b/testcases/kernel/syscalls/ioprio/ioprio_set03.c @@ -1,8 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2019 Linus Walleij + * Copyright (c) 2023 Linux Test Project + */ + +/*\ + * [Description] * - * Description: * Negative ioprio_set() test. Test some non-working priorities to make * sure they don't work. */ From patchwork Tue Jun 20 12:01:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1797272 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=awd6CW88; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=yR5l5fqy; 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 4QllcW47LKz20WT for ; Tue, 20 Jun 2023 22:02:19 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 16EDA3CACDF for ; Tue, 20 Jun 2023 14:02:17 +0200 (CEST) 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 [IPv6:2001:4b78:1:20::5]) (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 439B93CACDF for ; Tue, 20 Jun 2023 14:02:04 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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 43AFC600858 for ; Tue, 20 Jun 2023 14:02:04 +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-out2.suse.de (Postfix) with ESMTPS id AA4921F88C; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=gUH9QcONMBimCFf4RaLsOOC9KoV/LFG4lNx33z7Zohk=; b=awd6CW88dB+3jb/9v1CE+bmUil0gFwuMF1N1D4OGpzoB0tx4wdkBNoy7I/3qeGPmTOwptC cEuLxdwqyS9w3VoiLIydGV9bBGDZvIKe1zaMPTkY2NRfMt3fQRk0Q3RBGBHaDT5F97LhG2 Lrg2qgXU463r/NuBlzFhNVy3rGMqa3Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1687262523; 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: in-reply-to:in-reply-to:references:references; bh=gUH9QcONMBimCFf4RaLsOOC9KoV/LFG4lNx33z7Zohk=; b=yR5l5fqyYQ4xP1WcbPoR/d+PETrTvYHCPVk1M7EWbNCR8YNkivs15XhgiVwb5f+GeQXFow co4KVz4cPHW3b7AQ== 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 7732F139C7; Tue, 20 Jun 2023 12:02:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4NgMHDuVkWSQDAAAMHmgww (envelope-from ); Tue, 20 Jun 2023 12:02:03 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 20 Jun 2023 14:01:59 +0200 Message-Id: <20230620120159.320052-4-pvorel@suse.cz> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230620120159.320052-1-pvorel@suse.cz> References: <20230620120159.320052-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.1 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_SOFTFAIL, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-5.smtp.seeweb.it Subject: [LTP] [PATCH 3/3] utils: Remove unused ioprio.h 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: Niklas Cassel Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" It was added in 0a1e45f09 (in 2009), but even then it was not needed. Signed-off-by: Petr Vorel Reviewed-by: Niklas Cassel --- testcases/kernel/syscalls/utils/ioprio.h | 46 ------------------------ 1 file changed, 46 deletions(-) delete mode 100644 testcases/kernel/syscalls/utils/ioprio.h diff --git a/testcases/kernel/syscalls/utils/ioprio.h b/testcases/kernel/syscalls/utils/ioprio.h deleted file mode 100644 index 07220945c..000000000 --- a/testcases/kernel/syscalls/utils/ioprio.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef __IOPRIO_H__ -#define __IOPRIO_H__ - -//---------------------------------------------------------------------------- -// Copy of the 2.6.18 kernel header (linux/ioprio.h) -// - -/* - * Gives us 8 prio classes with 13-bits of data for each class - */ -#define IOPRIO_BITS (16) -#define IOPRIO_CLASS_SHIFT (13) -#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) - -#define IOPRIO_PRIO_CLASS(mask) ((mask) >> IOPRIO_CLASS_SHIFT) -#define IOPRIO_PRIO_DATA(mask) ((mask) & IOPRIO_PRIO_MASK) -#define IOPRIO_PRIO_VALUE(class, data) (((class) << IOPRIO_CLASS_SHIFT) | data) - -#define ioprio_valid(mask) (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE) - -/* - * These are the io priority groups as implemented by CFQ. RT is the realtime - * class, it always gets premium service. BE is the best-effort scheduling - * class, the default for any process. IDLE is the idle scheduling class, it - * is only served when no one else is using the disk. - */ -enum { - IOPRIO_CLASS_NONE, - IOPRIO_CLASS_RT, - IOPRIO_CLASS_BE, - IOPRIO_CLASS_IDLE, -}; - -/* - * 8 best effort priority levels are supported - */ -#define IOPRIO_BE_NR (8) - -enum { - IOPRIO_WHO_PROCESS = 1, - IOPRIO_WHO_PGRP, - IOPRIO_WHO_USER, -}; -//----------------------------------------------------------------------------- - -#endif /* __IOPRIO_H__ */