From patchwork Fri Jul 14 18:28:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= X-Patchwork-Id: 42681 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6da1:b0:131:a7d0:bc6d with SMTP id gl33csp3863304pzb; Fri, 14 Jul 2023 11:28:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGHlcykKypoKwFIm6shV1rhQKf9X+yteZg9Q8NGq4ahSzNH4h+9I+4afgO79fOZKiJEtU2d X-Received: by 2002:a17:907:7d9e:b0:988:b204:66b0 with SMTP id oz30-20020a1709077d9e00b00988b20466b0mr4091198ejc.33.1689359324688; Fri, 14 Jul 2023 11:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689359324; cv=none; d=google.com; s=arc-20160816; b=X/fSWSiJAP3ZlU55yeWwkHo36T74mkLuCoD/4B4dvLlkgMPtt804vYjBgW7Iw7ZOxM FCPEvAL0T1Xx5+co3gyuNc+g0lscMyg88DocswCFkUVN6ND+A3BuwOWOTkp04SZuN8bk uDlQgDaaWKO86l5hgTsszikr0wiHubIrasusc6LURP40s/fSI/szwmQqqBTX6WQ1EUDD 1UdNnjqTcSLwUQKjrSoROzjR/P5R6uEieOBkrTcT1xRY5oAjr66soVhJwo8hKp+hcxiC Ylxx9QI49Ef9Izjw5E3wAj1TXEM84K1kfBVPoAKV9cMjp2NiVEZy2L59oKD7WIi5p+Pq pqGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=07Hu0etdWbwKl7xhUaXmJAysYnG+hgwJMKS7gSdyJc0=; fh=hQcp50obTJ8bXC1it5NuEN23RGKfx0/zZ3s2gmreL+A=; b=sdXSRwM2qHqOgtElslwyBVIMI46TsxlE1KbAKSyxQQk8m57iCnsaUrhoy/O4YcPsYS 48qIPiM/dlO0SNf2Nh6jxYR02vP1GKqBCSf8OSaoz2mE7HtpJ4A657KvViPMojiR0Y80 jzWKdR8J6oVU/3X6U8CWPiQZd82uZ7MXybYkwoMdo4QFha/U6Mz7G5YlAZX6rzBgOG3F 3mS+0m9S3AR4N5jjfFwAa17Xf5nkG0BqF7Rnqz0ABcqOH3TGN+h1PJg5P49OIDSEBy7V LvOEdmK74qpEET/RzjK0JIitn+Yi+37Qs1PgP6fcPISY+/sqTJcZ2NBPSk9vJKlRM8HE AG6A== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o16-20020a17090608d000b00992f1a3b9c0si8971552eje.414.2023.07.14.11.28.44; Fri, 14 Jul 2023 11:28:44 -0700 (PDT) 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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D36F68C645; Fri, 14 Jul 2023 21:28:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from ursule.remlab.net (vps-a2bccee9.vps.ovh.net [51.75.19.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F185468C4CE for ; Fri, 14 Jul 2023 21:28:35 +0300 (EEST) Received: from basile.remlab.net (localhost [IPv6:::1]) by ursule.remlab.net (Postfix) with ESMTP id 92368C000E for ; Fri, 14 Jul 2023 21:28:35 +0300 (EEST) From: =?utf-8?q?R=C3=A9mi_Denis-Courmont?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 14 Jul 2023 21:28:29 +0300 Message-Id: <20230714182835.66326-1-remi@remlab.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <12243004.O9o76ZdvQC@basile.remlab.net> References: <12243004.O9o76ZdvQC@basile.remlab.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/7] checkasm: fix Linux perf cleanup X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: Z+Zq2ISF72g5 0 is a valid file descriptor. --- tests/checkasm/checkasm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 4311a8ffcb..1da0877be5 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -317,7 +317,9 @@ static struct { const char *cpu_flag_name; const char *test_name; int verbose; -} state; +} state = { + .sysfd = -1, +}; /* PRNG state */ AVLFG checkasm_lfg; @@ -710,7 +712,7 @@ static int bench_init(void) static void bench_uninit(void) { #if CONFIG_LINUX_PERF - if (state.sysfd > 0) + if (state.sysfd != -1) close(state.sysfd); #endif }