From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82FD1ECAAA1 for ; Mon, 5 Sep 2022 08:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236468AbiIEIpf (ORCPT ); Mon, 5 Sep 2022 04:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236591AbiIEIpf (ORCPT ); Mon, 5 Sep 2022 04:45:35 -0400 Received: from gnuweeb.org (gnuweeb.org [51.81.211.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3455F31DD3 for ; Mon, 5 Sep 2022 01:45:34 -0700 (PDT) Received: from [192.168.169.80] (unknown [182.2.42.181]) by gnuweeb.org (Postfix) with ESMTPSA id 34B627E254; Mon, 5 Sep 2022 08:45:30 +0000 (UTC) X-GW-Data: lPqxHiMPbJw1wb7CM9QUryAGzr0yq5atzVDdxTR0iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1662367533; bh=xk7fpIRjj9yQpmZLnlOf2FvZfg9fnhv24LUBtF/TdQQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Wol/bZuOv45x/h+D1kb+DgNq7+c6/ejYkrIP7catrhidCF80e2ogC7K9CaqbQAUfS awUeZMUzP9ieqYyQdG7AEHSsKVs0+NzA4xwxMnlmJFWxi4iwR/vrZwYDQl0iSIXhkV b6wXxsmYqbkdUg8vpuP7xIFvXV+mp3qpstKIFdz7RV5aU39wrVpsUyHz8772j/T05W +oLqee4tWdZp8xkE7KwaSH5DZVR/pQEjhzssClEn4AaY6Zn/qvy58/LaJhGqhfw16i tRt2S1njWFZSQr589uH1d2s++yRgi6b7adGngMltZxUxLwvMU+kc53QbZA5jDIydAr xMcLbfjPFV5pw== Message-ID: Date: Mon, 5 Sep 2022 15:45:28 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH liburing v1] test/ringbuf-read: Delete `.ringbuf-read.%d` before exit Content-Language: en-US To: Alviro Iskandar Setiawan Cc: Jens Axboe , Pavel Begunkov , io-uring Mailing List , GNU/Weeb Mailing List , Kanna Scarlet , Muhammad Rizki References: <20220905070633.187725-1-ammar.faizi@intel.com> From: Ammar Faizi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 9/5/22 3:42 PM, Alviro Iskandar Setiawan wrote: > On Mon, Sep 5, 2022 at 2:12 PM Ammar Faizi wrote: >> fd = open(fname, O_WRONLY); >> if (fd < 0) { >> perror("open"); >> - goto err; >> + ret = 1; >> + goto out; >> } >> for (i = 0; i < NR_BUFS; i++) { >> memset(buf, i + 1, BUF_SIZE); >> ret = write(fd, buf, BUF_SIZE); >> if (ret != BUF_SIZE) { >> fprintf(stderr, "bad file prep write\n"); >> - goto err; >> + ret = 1; >> + close(fd); >> + goto out; >> } >> } > > should use T_EXIT_* for ret? Yes, we should. I forgot, will send a v2. -- Ammar Faizi