From patchwork Thu Aug 1 09:26:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 1140369 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz 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 RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45zlL76fLRz9s00 for ; Thu, 1 Aug 2019 19:26:55 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 0C0643C1E17 for ; Thu, 1 Aug 2019 11:26:53 +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]) by picard.linux.it (Postfix) with ESMTP id 6DE5C3C1E00 for ; Thu, 1 Aug 2019 11:26:35 +0200 (CEST) Received: from mx1.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-5.smtp.seeweb.it (Postfix) with ESMTPS id 803D76021AF for ; Thu, 1 Aug 2019 11:26:36 +0200 (CEST) Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ACF2DB652 for ; Thu, 1 Aug 2019 09:26:32 +0000 (UTC) From: Cyril Hrubis To: ltp@lists.linux.it Date: Thu, 1 Aug 2019 11:26:10 +0200 Message-Id: <20190801092616.30553-4-chrubis@suse.cz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190801092616.30553-1-chrubis@suse.cz> References: <20190801092616.30553-1-chrubis@suse.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at in-5.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.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-5.smtp.seeweb.it Subject: [LTP] [RFC PATCH 3/9] syscalls/preadv01: Make use of guarded buffers. 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" Signed-off-by: Cyril Hrubis --- testcases/kernel/syscalls/preadv/preadv01.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testcases/kernel/syscalls/preadv/preadv01.c b/testcases/kernel/syscalls/preadv/preadv01.c index 2452f216a..95431bc60 100644 --- a/testcases/kernel/syscalls/preadv/preadv01.c +++ b/testcases/kernel/syscalls/preadv/preadv01.c @@ -24,12 +24,8 @@ #define CHUNK 64 static int fd; -static char buf[CHUNK]; -static struct iovec rd_iovec[] = { - {buf, CHUNK}, - {NULL, 0}, -}; +static struct iovec *rd_iovec; static struct tcase { int count; @@ -111,4 +107,8 @@ static struct tst_test test = { .test = verify_preadv, .min_kver = "2.6.30", .needs_tmpdir = 1, + .bufs = (struct tst_buffers []) { + {&rd_iovec, .iov_sizes = (int[]){CHUNK, 0, -1}}, + {}, + } };