From patchwork Fri Dec 23 00:12:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Turner X-Patchwork-Id: 1895 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp908109vsb; Thu, 22 Dec 2016 16:12:50 -0800 (PST) X-Received: by 10.28.175.204 with SMTP id y195mr11904844wme.106.1482451970852; Thu, 22 Dec 2016 16:12:50 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t187si3473267wme.1.2016.12.22.16.12.48; Thu, 22 Dec 2016 16:12:50 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51AC968A4F1; Fri, 23 Dec 2016 02:12:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E516668A4E5 for ; Fri, 23 Dec 2016 02:12:38 +0200 (EET) Received: by mail-pg0-f68.google.com with SMTP id g1so19918499pgn.0 for ; Thu, 22 Dec 2016 16:12:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:subject:date:message-id; bh=9B2zOEj/QN3Jgrg4zv0vT0gGFOV5+rGK8UviXcrQgEM=; b=lfU/mEEJUc4sa/+MpOUCS9w9sb8MONHAkoTowB5XTjXh20ToOXscJ67AwkGtUxzGoA wSxTn5ROnRkIp+TRaem5G8qKS/rGhe9IGmwarskUHC2E9RlkgZmKckCb3u69Lf4ahxKl UQ29zoT25JPjclMaGxR9Zvk4u6z1m8h10Xaatt/8DRleiFRyI/bzJB+yhnViomDXFheu chOadEpwIQIyaA2/p12qrUWfcJ+WqDXRU6B89ZQRMOqgCo40RSvJv2o88iHaG84A8XwT 6Tt6xhvBVB7tdKxjNx9625c+aIWrEksIxrb1AMVmaNosfBXJ/h3fLyYKih0rwWFoMTmP xf+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=9B2zOEj/QN3Jgrg4zv0vT0gGFOV5+rGK8UviXcrQgEM=; b=c6H6pFexBYi4tUC5lZ61ssfvW/OMQYJT1RO7tdXNwxTMDfXh7rZcQuQPxW5F3xCGII Shq+K/GZCNEjx2DPkdneARdgTl+Ox0UEIj0iAlIM1x8/ufTl85pPP/X23KG+b/gM1Kxs pic1I03i3Tr1teSBt9MQXLWvUr1oLDl94y4QeWYXimniIR22oKJBxReKNkY+NwJEKwRu AKp8/op8Br3Lx1dyrF7SfvLzf5mGBZ+VrGvlQ15lyRX5nEZt6H3vFc8joZUiqs5YMKbs Q8/7ZrD6pejcElZV05Peu6FHqX2QHZZSGvYd0I4291sUpcUv9H/kGM1u/2sMafC22dDh eW+w== X-Gm-Message-State: AIkVDXJBo6clALRflb2MeZ4Tf/DIDl0p9CQ8iEictYEbNcHGQf8XYNy8f1HcQDqZQ8dpeQ== X-Received: by 10.84.173.4 with SMTP id o4mr24570905plb.123.1482451957676; Thu, 22 Dec 2016 16:12:37 -0800 (PST) Received: from Zany.fios-router.home ([47.147.141.23]) by smtp.gmail.com with ESMTPSA id y2sm57245065pff.82.2016.12.22.16.12.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Dec 2016 16:12:37 -0800 (PST) From: Thomas Turner To: ffmpeg-devel@ffmpeg.org Date: Thu, 22 Dec 2016 16:12:36 -0800 Message-Id: <1482451956-3947-1-git-send-email-thomastdt@googlemail.com> X-Mailer: git-send-email 1.9.1 Subject: [FFmpeg-devel] [PATCH] avutil/tests: Improved code coverage for random_seed X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Thomas Turner --- libavutil/tests/random_seed.c | 34 +++++++++++++++++++++------------- tests/ref/fate/random_seed | 1 + 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/libavutil/tests/random_seed.c b/libavutil/tests/random_seed.c index ebe9b3e..fcd68bc 100644 --- a/libavutil/tests/random_seed.c +++ b/libavutil/tests/random_seed.c @@ -23,24 +23,32 @@ #undef printf #define N 256 +#define F 2 #include +typedef uint32_t (*random_seed_ptr_t)(void); + int main(void) { - int i, j, retry; + int i, j, rsf, retry; uint32_t seeds[N]; + random_seed_ptr_t random_seed[F] = {av_get_random_seed, get_generic_seed}; - for (retry=0; retry<3; retry++){ - for (i=0; i