From patchwork Tue Apr 29 10:44:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= X-Patchwork-Id: 2078870 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=lists.linux.it header.i=@lists.linux.it header.a=rsa-sha256 header.s=picard header.b=XeCFO0ZB; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=JM5jgAwv; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZmxmZ1gFlz1yMg for ; Tue, 29 Apr 2025 20:45:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.linux.it; i=@lists.linux.it; q=dns/txt; s=picard; t=1745923549; h=date : mime-version : message-id : references : in-reply-to : to : subject : list-id : list-unsubscribe : list-archive : list-post : list-help : list-subscribe : from : reply-to : cc : content-type : content-transfer-encoding : sender : from; bh=5z1P//ZzgveuQkEC9ZnCluyPkgfK8ITlGpmml7VYqME=; b=XeCFO0ZBP8MNa9cAN+iIO5WkhnZ70HHQ/QZTgqnRssRq9HLcxTy07JfK35U7JodNmyG/t Tt55VtmgHRGUAjTjXzXoReE1+HezolFL54cIU+HtAVT+Xx3AJtS9Ntpn9gX9845mfh2bEjV IG0sdnNgpBsFhgoUiOUF/1Q34tVIocU= Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 602403C06A7 for ; Tue, 29 Apr 2025 12:45:49 +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 [217.194.8.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id A78443CBC26 for ; Tue, 29 Apr 2025 12:44:40 +0200 (CEST) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 C5A8A600290 for ; Tue, 29 Apr 2025 12:44:39 +0200 (CEST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-acb5ec407b1so956096666b.1 for ; Tue, 29 Apr 2025 03:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1745923478; x=1746528278; darn=lists.linux.it; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=0al2jg89iG9w2m3089+vb73dZPinCv0nqGJlC0Y1j34=; b=JM5jgAwvmvnymo/FjYHsvWXqJCrOhvuCzrgmhinQ0QBE2PctPp+EzgF+qIMvsmSqXK gUDihl3U4QvEjYNPuVbbYGFZi7/Siw5BRKaYUqudYUPBrD7J67d84gmyv1a7QPy86D0I 4FGEtVCX61K6jpZWGfuegtcJHPuxaqAvNH0UCAhs9eCUapYi8XS533TnsdxERZ+2umB0 Dewaul0mGdNnGfxQRtAm5tVwtbVYnapP/WqdycrabsERFnt6YUoSSPQ7InAx/DeBD1YF DtBA9PPdILzEEvNeuxO4h7uwReDNL+lKXf3nFIx3kykoHdGyl6rLHs5+xCDPM9gNG8wG CtLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745923478; x=1746528278; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0al2jg89iG9w2m3089+vb73dZPinCv0nqGJlC0Y1j34=; b=cdyOZgNVGhQ9z7TFdx4q7aK5NUG/E8XQGrnbUJI3olBLJzyGVPITwXDy3VHnb1Ic5b ins5qkEu2hBzeB0xkRsyPErZKln/7Xu0JVw8CcvGE959SY2DjTVjVcoRVvIfN4juxOse ytYwKJVa0+qwAcXsm8Og7wf19hrvNIy3uYH3npvvMtZCkZYZcVuyfHEKjgxzfq/0h1tx BKXp97tYmDot7VtAHmrIzI8jf4qiB8XfPk6EclWxr/O9jpaEDisAR6bN9hR/NK39i4E1 QUn05yW35VFGdIRBY4x/sbNyQ1yhhFpKVIgZ9MvPURgfo/umHZBNeQQJ56P5L+0d3WvW BS2Q== X-Gm-Message-State: AOJu0YzU0F0CioqBYmE2Xf0neSvedpw0L7xpDH7/O1JwX/Ka+Pb4PNBs 0tnyHZ3hfMHuLkL/FddNCLuXQevkAfwDmHwWOJSR24lHewnINFdo1qX+o25Ud6FzkMhUTKXS/ov a X-Gm-Gg: ASbGncu2omM1AQXfYN9hxPBK2t5aK0LyOipwDXRDEGEfLYSgLrjRDbPUdU8Oz1mwrAg L7vSoki1gAcIf1mGCdQUllnmYo5MCDVdVhO9qFtqx2MxxofR56Rg97VtI+l9htvInWFVMEtDFXY M0OUsrys15u1ngEvrDFJGsggwDeonw/A4MIsNcquKmtUk8aj5ARwFP5bImg+RT9wh0bMwfpt8LY taNGRmUS29Qwbcr3vfYZ2CERgChwUvyyUilCLaulZVID6gXXE9fWBWiCf6QeMf+tfuEOVoopsdA xTiWCn+yQVhXlbEFKIPvK75Cx7liMQ== X-Google-Smtp-Source: AGHT+IFRiewLamILL+maddqxHweeZCFbmLnzBZq3SckrQ3hbRxIrqlfJF7Y+8A56TAIagjyhXqDn5Q== X-Received: by 2002:a17:907:9803:b0:acb:7104:353a with SMTP id a640c23a62f3a-ace8493c612mr1001393766b.34.1745923478210; Tue, 29 Apr 2025 03:44:38 -0700 (PDT) Received: from localhost ([179.228.213.210]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-309ef061acdsm10861178a91.16.2025.04.29.03.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Apr 2025 03:44:37 -0700 (PDT) Date: Tue, 29 Apr 2025 07:44:25 -0300 MIME-Version: 1.0 Message-Id: <20250429-conversions-modify_ldt-v9-3-97e4664c25c5@suse.com> References: <20250429-conversions-modify_ldt-v9-0-97e4664c25c5@suse.com> In-Reply-To: <20250429-conversions-modify_ldt-v9-0-97e4664c25c5@suse.com> To: Linux Test Project X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=11577; i=rbm@suse.com; h=from:subject:message-id; bh=ZeO5N/jMh+HRcqBvaKWwEQyJHKygJndKujjI/yK0/m4=; b=owEBbQKS/ZANAwAIAckLinxjhlimAcsmYgBoEK2JQoRKdcjsC5OP+JLagSU7sekOGSUbcrKUN u0FcuUTluuJAjMEAAEIAB0WIQQDCo6eQk7jwGVXh+HJC4p8Y4ZYpgUCaBCtiQAKCRDJC4p8Y4ZY pgNFEACSg0Cv7bCTs9Bl+yjhlaW2UPRbS6GlXjrqnkPCqC8VoetP+kZXnDKHuGx4CPq/vowEltI XqNQ6THP2BJqgbRXMXWMqwkXsEEenboC/GP4XY6gOPi7RGqOGq4/ocE/cdgL0fnxVwtPMER594K nwZiN3CJMgn0A43oJHuZxh40EqlhUQKiPDqLU7RJQ8je+AfL7yx2xWdkejWW2mxwhMV6w2ypGyv pdkO+efidGAXHLWVJ+iIIfg/bwc98GG1GE+cBDPrzVFeewKY50Bm2+yXcPL7s/xg+ky9h95THDv AkPRcrxAQBC/5fx7Qe3hk4Ap+/KHXLkiKu3/uhnnHBtPn/iMYwaGiZOh5tVJDNAUxBNH3SSPAvt cSZ2QceM2q9BbGhN/zgVpPbJFWUGYrmv9QobrRqQBJIQgj0MgTnxOC60De1FLBH0JYLGUgyCmva WnXYTzL+qpjDrbpMBwzGUS99apV/9dvht/+VrdpRnP1avehaf3hg9bJbMfTxlz+8V7UEC2s5ekc OE7HTkxbbKZVZklR67cb5UWpyNYYJ7b7L0RIxdIDU45bu2qLTe/l1J27SHcrKtAEd2SDPYdCpxE rr1LreIWzSt347yiNBzvyHDLz6938SHFF6CfG8xXrgOQOWbKnpKm/2mobqaZ9UKhkW2OGNQiaOl aksQ9PikbCz0hhw== X-Developer-Key: i=rbm@suse.com; a=openpgp; fpr=030A8E9E424EE3C0655787E1C90B8A7C638658A6 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 shortcircuit=no autolearn=disabled version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on in-5.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.7 at in-5.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v9 3/3] syscalls/modify_ldt01: Refactor into new API 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: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re_via_ltp?= From: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Reply-To: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Cc: =?utf-8?q?Ricardo_B=2E_Marli=C3=A8re?= Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Ricardo B. Marlière Now that we're using the wrapped modify_ldt() from the lapi/ldt.h which uses tst_syscall(), it does not make sense to keep the first block of the original test which simply checked for ENOSYS. Also, merge modify_ldt03 into modify_ldt01 and extend the test to cover all the errors from the manual page. Reviewed-by: Andrea Cervesato Signed-off-by: Ricardo B. Marlière --- runtest/syscalls | 1 - testcases/kernel/syscalls/modify_ldt/.gitignore | 5 +- .../kernel/syscalls/modify_ldt/modify_ldt01.c | 264 +++++---------------- .../kernel/syscalls/modify_ldt/modify_ldt03.c | 105 -------- 4 files changed, 58 insertions(+), 317 deletions(-) diff --git a/runtest/syscalls b/runtest/syscalls index 57338297a33b47075a3f801871753cc76b073bfa..d72f9c17f62f5d236c30170ae9ce6e159f19fa2e 100644 --- a/runtest/syscalls +++ b/runtest/syscalls @@ -847,7 +847,6 @@ mmap21_02 mmap21 modify_ldt01 modify_ldt01 modify_ldt02 modify_ldt02 -modify_ldt03 modify_ldt03 mount01 mount01 mount02 mount02 diff --git a/testcases/kernel/syscalls/modify_ldt/.gitignore b/testcases/kernel/syscalls/modify_ldt/.gitignore index c0b8bbf5875af453b4880ef4b717fdb40d109ee7..c8817b2c3a811afdf40841dc1b81e4b2c034e7d8 100644 --- a/testcases/kernel/syscalls/modify_ldt/.gitignore +++ b/testcases/kernel/syscalls/modify_ldt/.gitignore @@ -1,3 +1,2 @@ -/modify_ldt01 -/modify_ldt02 -/modify_ldt03 +modify_ldt01 +modify_ldt02 diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c index 684e53772414ae468b4f168578596eabb27ef18b..e087b0a4e99355bbaab67c5324a6ba12bde36910 100644 --- a/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c +++ b/testcases/kernel/syscalls/modify_ldt/modify_ldt01.c @@ -1,230 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* - * - * Copyright (c) International Business Machines Corp., 2001 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Copyright (c) International Business Machines Corp., 2001 + * 07/2001 Ported by Wayne Boyer + * Copyright (c) 2025 SUSE LLC Ricardo B. Marlière */ -/* - * NAME - * modify_ldt01.c - * - * DESCRIPTION - * Testcase to check the error conditions for modify_ldt(2) - * - * CALLS - * modify_ldt() - * - * ALGORITHM - * block1: - * Invoke modify_ldt() with a func value which is neither - * 0 or 1. Verify that ENOSYS is set. - * block2: - * Invoke mprotect() with ptr == NULL. Verify that EINVAL - * is set. - * block3: - * Create an LDT segment. - * Try to read from an invalid pointer. - * Verify that EFAULT is set. - * - * USAGE - * modify_ldt01 - * - * HISTORY - * 07/2001 Ported by Wayne Boyer +/*\ + * Verify that modify_ldt() calls: * - * RESTRICTIONS - * None + * - Fails with EFAULT, when reading (func=0) from an invalid pointer + * - Passes when reading (func=0) from a valid pointer + * - Fails with EINVAL, when writing (func=1) to an invalid pointer + * - Fails with EINVAL, when writing (func=1) with an invalid bytecount value + * - Fails with EINVAL, when writing (func=1) an entry with invalid values + * - Fails with EINVAL, when writing (func=0x11) an entry with invalid values */ -#include "config.h" -#include "test.h" +#include "tst_test.h" -TCID_DEFINE(modify_ldt01); -int TST_TOTAL = 1; - -#if defined(__i386__) && defined(HAVE_MODIFY_LDT) - -#ifdef HAVE_ASM_LDT_H -#include -#endif -extern int modify_ldt(int, void *, unsigned long); - -#include -#include - -/* Newer ldt.h files use user_desc, instead of modify_ldt_ldt_s */ -#ifdef HAVE_STRUCT_USER_DESC -typedef struct user_desc modify_ldt_s; -#elif HAVE_STRUCT_MODIFY_LDT_LDT_S -typedef struct modify_ldt_ldt_s modify_ldt_s; -#else -typedef struct modify_ldt_ldt_t { - unsigned int entry_number; - unsigned long int base_addr; - unsigned int limit; - unsigned int seg_32bit:1; - unsigned int contents:2; - unsigned int read_exec_only:1; - unsigned int limit_in_pages:1; - unsigned int seg_not_present:1; - unsigned int useable:1; - unsigned int empty:25; -} modify_ldt_s; -#endif - -int create_segment(void *, size_t); -void cleanup(void); -void setup(void); - -int main(int ac, char **av) -{ - int lc; +#ifdef __i386__ +#include "common.h" +static void *ptr; +static char *buf; +static struct user_desc invalid_entry; +static struct tcase { + int tfunc; void *ptr; - int retval, func; - - int seg[4]; - - tst_parse_opts(ac, av, NULL, NULL); - - setup(); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - /* reset tst_count in case we are looping */ - tst_count = 0; - - /* - * Check for ENOSYS. - */ - ptr = malloc(10); - func = 100; - retval = modify_ldt(func, ptr, sizeof(ptr)); - if (retval < 0) { - if (errno != ENOSYS) { - tst_resm(TFAIL, "modify_ldt() set invalid " - "errno, expected ENOSYS, got: %d", - errno); - } else { - tst_resm(TPASS, - "modify_ldt() set expected errno"); - } - } else { - tst_resm(TFAIL, "modify_ldt error: " - "unexpected return value %d", retval); - } - - free(ptr); - - /* - * Check for EINVAL - */ - ptr = 0; - - retval = modify_ldt(1, ptr, sizeof(ptr)); - if (retval < 0) { - if (errno != EINVAL) { - tst_resm(TFAIL, "modify_ldt() set invalid " - "errno, expected EINVAL, got: %d", - errno); - } else { - tst_resm(TPASS, - "modify_ldt() set expected errno"); - } - } else { - tst_resm(TFAIL, "modify_ldt error: " - "unexpected return value %d", retval); - } - - /* - * Create a new LDT segment. - */ - if (create_segment(seg, sizeof(seg)) == -1) { - tst_brkm(TBROK, cleanup, "Creation of segment failed"); - } - - /* - * Check for EFAULT - */ - ptr = sbrk(0); - - retval = modify_ldt(0, ptr + 0xFFF, sizeof(ptr)); - if (retval < 0) { - if (errno != EFAULT) { - tst_resm(TFAIL, "modify_ldt() set invalid " - "errno, expected EFAULT, got: %d", - errno); - } else { - tst_resm(TPASS, - "modify_ldt() set expected errno"); - } - } else { - tst_resm(TFAIL, "modify_ldt error: " - "unexpected return value %d", retval); - } - } - cleanup(); - tst_exit(); -} - -/* - * create_segment() - - */ -int create_segment(void *seg, size_t size) + unsigned long bytecount; + int exp_errno; +} tcases[] = { + { 0, &ptr, sizeof(ptr), EFAULT }, + { 0, &buf, sizeof(buf), 0 }, + { 1, (void *)0, 0, EINVAL }, + { 1, &buf, sizeof(struct user_desc) - 1, EINVAL }, + { 1, &invalid_entry, sizeof(struct user_desc), EINVAL }, + { 0x11, &invalid_entry, sizeof(struct user_desc), EINVAL }, +}; + +void run(unsigned int i) { - modify_ldt_s entry; - - entry.entry_number = 0; - entry.base_addr = (unsigned long)seg; - entry.limit = size; - entry.seg_32bit = 1; - entry.contents = 0; - entry.read_exec_only = 0; - entry.limit_in_pages = 0; - entry.seg_not_present = 0; + struct tcase *tc = &tcases[i]; - return modify_ldt(1, &entry, sizeof(entry)); + if (tc->exp_errno) + TST_EXP_FAIL(modify_ldt(tc->tfunc, tc->ptr, tc->bytecount), + tc->exp_errno); + else + TST_EXP_POSITIVE(modify_ldt(tc->tfunc, tc->ptr, tc->bytecount)); } void setup(void) { + int seg[4]; - tst_sig(FORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; -} + create_segment(seg, sizeof(seg)); -void cleanup(void) -{ + invalid_entry.contents = 3; + invalid_entry.seg_not_present = 0; + ptr = sbrk(0) + 0xFFF; + tcases[0].ptr = ptr; } -#elif HAVE_MODIFY_LDT -int main(void) -{ - tst_brkm(TCONF, - NULL, - "modify_ldt is available but not tested on the platform than __i386__"); -} +static struct tst_test test = { + .test = run, + .tcnt = ARRAY_SIZE(tcases), + .setup = setup, + .bufs = + (struct tst_buffers[]){ + { &buf, .size = sizeof(struct user_desc) }, + {}, + }, +}; #else -int main(void) -{ - tst_resm(TINFO, "modify_ldt01 test only for ix86"); - tst_exit(); -} - -#endif /* defined(__i386__) */ +TST_TEST_TCONF("Test supported only on i386"); +#endif /* __i386__ */ diff --git a/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c b/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c deleted file mode 100644 index 01730e0e14ae98a934e7b66c9058454506bbe064..0000000000000000000000000000000000000000 --- a/testcases/kernel/syscalls/modify_ldt/modify_ldt03.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014 Fujitsu Ltd. - * Author: Zeng Linggang - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU General Public License along - * with this program. - */ -/* - * DESCRIPTION - * Basic test for modify_ldt(2) using func=0 argument. - */ - -#include "config.h" -#include "test.h" - -char *TCID = "modify_ldt03"; -int TST_TOTAL = 1; - -#if defined(__i386__) && defined(HAVE_MODIFY_LDT) - -#ifdef HAVE_ASM_LDT_H -# include -#endif -extern int modify_ldt(int, void *, unsigned long); - -#include -#include -#include -#include -#include "safe_macros.h" - -#ifdef HAVE_STRUCT_USER_DESC -# define SIZE sizeof(struct user_desc) -#else -# define SIZE 16 -#endif - -static char buf[SIZE]; -static void cleanup(void); -static void setup(void); - -int main(int ac, char **av) -{ - int lc; - - tst_parse_opts(ac, av, NULL, NULL); - - setup(); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - tst_count = 0; - - TEST(modify_ldt(0, buf, SIZE)); - - if (TEST_RETURN < 0) { - tst_resm(TFAIL | TTERRNO, - "modify_ldt() failed with errno: %s", - strerror(TEST_ERRNO)); - } else { - tst_resm(TPASS, "modify_ldt() tested success"); - } - } - - cleanup(); - tst_exit(); -} - -static void setup(void) -{ - tst_sig(NOFORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; -} - -static void cleanup(void) -{ -} - -#elif HAVE_MODIFY_LDT - -int main(void) -{ - tst_brkm(TCONF, - NULL, "modify_ldt is available but not tested on the platform than " - "__i386__"); -} - -#else /* if defined(__i386__) */ - -int main(void) -{ - tst_resm(TINFO, "modify_ldt03 test only for ix86"); - tst_exit(); -} - -#endif /* if defined(__i386__) */