From patchwork Tue Feb 7 13:17:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 1738940 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=l+z9Sq0h; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=s1Yfmgcg; 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 4PB3b72TcYz23hn for ; Wed, 8 Feb 2023 00:17:55 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 37A703CC22E for ; Tue, 7 Feb 2023 14:17:53 +0100 (CET) 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 0916A3CC229 for ; Tue, 7 Feb 2023 14:17:20 +0100 (CET) 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-2.smtp.seeweb.it (Postfix) with ESMTPS id D33ED600819 for ; Tue, 7 Feb 2023 14:17:19 +0100 (CET) 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 EEBBE20BA8; Tue, 7 Feb 2023 13:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1675775838; 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=D8jHfbgWCPTwBbjJZcQA+nImmHTDgsw6zzc6wW1EUog=; b=l+z9Sq0hLvAGqE5T3md+IwAUUxAAAH3hB6KJDsd+0xyt77ckz8Qta8VsK96fo20P7sQmIY EtpabHGG0edhbcHgmQE3L+giH9J4AJRBWt2vjNohGNxd+VvEICsmsx3r4rW6KQDfANHOSA fUBVvUA70duVLCCMWFNIggnjEHvVT/0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1675775838; 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=D8jHfbgWCPTwBbjJZcQA+nImmHTDgsw6zzc6wW1EUog=; b=s1YfmgcgIVaQbUbuiXrC+XtTkaXq7/aZlXw/clPVDnHAtbPwMpt2oDjUxnbCXLu3V5VDHk msZzbRWVvgsQn0DA== 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 9A33813467; Tue, 7 Feb 2023 13:17:18 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gKMyIl5P4mOJbQAAMHmgww (envelope-from ); Tue, 07 Feb 2023 13:17:18 +0000 From: Petr Vorel To: ltp@lists.linux.it Date: Tue, 7 Feb 2023 14:17:12 +0100 Message-Id: <20230207131714.2500-2-pvorel@suse.cz> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230207131714.2500-1-pvorel@suse.cz> References: <20230207131714.2500-1-pvorel@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 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 autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-2.smtp.seeweb.it Subject: [LTP] [PATCH 1/3] ioctl01: Add default tty device 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" Saves user to specify it when run manually. Signed-off-by: Petr Vorel --- testcases/kernel/syscalls/ioctl/ioctl01.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testcases/kernel/syscalls/ioctl/ioctl01.c b/testcases/kernel/syscalls/ioctl/ioctl01.c index 1be38e79d3..cb184aee40 100644 --- a/testcases/kernel/syscalls/ioctl/ioctl01.c +++ b/testcases/kernel/syscalls/ioctl/ioctl01.c @@ -27,6 +27,7 @@ #include "lapi/ioctl.h" #define INVAL_IOCTL 9999999 +#define DEFAULT_TTY_DEVICE "/dev/tty0" static int fd, fd_file; static int bfd = -1; @@ -70,7 +71,9 @@ static void verify_ioctl(unsigned int i) static void setup(void) { if (!device) - tst_brk(TBROK, "You must specify a tty device with -D option"); + device = DEFAULT_TTY_DEVICE; + + tst_res(TINFO, "Using device '%s'", device); fd = SAFE_OPEN(device, O_RDWR, 0777); fd_file = SAFE_OPEN("x", O_CREAT, 0777);