From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 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) 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 List-Id: 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