From patchwork Thu Mar 28 16:29:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1917441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=xl8Y+8Bl; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=HAPBQGE6; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V58D21NYcz1yWr for ; Fri, 29 Mar 2024 03:30:42 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 8114E3C2969 for ; Thu, 28 Mar 2024 17:30:38 +0100 (CET) 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 (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id D074D3C0166 for ; Thu, 28 Mar 2024 17:29:46 +0100 (CET) Authentication-Results: in-7.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=suse.cz (client-ip=2a07:de40:b251:101:10:150:64:2; helo=smtp-out2.suse.de; envelope-from=pvorel@suse.cz; receiver=lists.linux.it) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) (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 E9822207A0D for ; Thu, 28 Mar 2024 17:29:45 +0100 (CET) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EE7CC20BA4; Thu, 28 Mar 2024 16:29:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1711643384; 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=qhBDvGuqd4u3eDem2YffOZDm4BINCnH55gZsQdN5jvc=; b=xl8Y+8Bliv2vHoBc4vHhZypP+AkkQ8RDsQS/H/ClpHRFYnOtB4duJ8pkWAGO/oLvHwsVor ggQQHh9ZM3g+L6DZ3zzLezFnWE8F3R96P25W0PutXYsXH0qA1KxqM1vrN2RFLmZttKN/VZ Gjwxmiku5wk4b9OE8EBde+zVB6KJi3g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1711643384; 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=qhBDvGuqd4u3eDem2YffOZDm4BINCnH55gZsQdN5jvc=; b=HAPBQGE6nJK0NYAmnauOrBzJROeLUYgWFO0y4m7UqXqLlE+N/YDDBhHC2LvOZeLb+tvzPL 4H6C+XBJJRLj2aBQ== Authentication-Results: smtp-out2.suse.de; none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id A092913A92; Thu, 28 Mar 2024 16:29:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id +JCmIPiaBWZoeAAAn2gu4w (envelope-from ); Thu, 28 Mar 2024 16:29:44 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Thu, 28 Mar 2024 17:29:38 +0100 Message-ID: <20240328162939.100872-4-pvorel@suse.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240328162939.100872-1-pvorel@suse.cz> References: <20240328162939.100872-1-pvorel@suse.cz> MIME-Version: 1.0 X-Spamd-Result: default: False [-1.11 / 50.00]; BAYES_HAM(-2.31)[96.78%]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.cz:email]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -1.11 X-Spam-Level: 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.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH v6 3/4] shmat02: Use TST_EXP_FAIL_PTR_VOID 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" From: Wei Gao Reviewed-by: Petr Vorel Signed-off-by: Wei Gao --- The same as in v5. testcases/kernel/syscalls/ipc/shmat/shmat02.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat02.c b/testcases/kernel/syscalls/ipc/shmat/shmat02.c index 53cb6f542..3ad1fd08e 100644 --- a/testcases/kernel/syscalls/ipc/shmat/shmat02.c +++ b/testcases/kernel/syscalls/ipc/shmat/shmat02.c @@ -44,20 +44,7 @@ static struct test_case_t { static void verify_shmat(struct test_case_t *tc) { - void *addr; - - addr = shmat(*tc->shmid, *tc->shmaddr, 0); - if (addr != (void *)-1) { - tst_res(TFAIL, "shmat() succeeded unexpectedly"); - return; - } - - if (errno == tc->exp_err) { - tst_res(TPASS | TERRNO, "shmat() failed as expected"); - } else { - tst_res(TFAIL | TERRNO, "shmat() failed unexpectedly, expected: %s", - tst_strerrno(tc->exp_err)); - } + TST_EXP_FAIL_PTR_VOID(shmat(*tc->shmid, *tc->shmaddr, 0), tc->exp_err); } static void do_shmat(unsigned int n)