From patchwork Wed Mar 1 15:15:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 657816 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3544970wrb; Wed, 1 Mar 2023 07:19:26 -0800 (PST) X-Google-Smtp-Source: AK7set+X8XGXSyU/Sqj3ty+872Vhfo0DGMCs592KbbuicRpbp8sDgMmmFaqXO0uJTcp7ZFe7pS2u X-Received: by 2002:a05:6214:e6b:b0:570:bf45:d6f7 with SMTP id jz11-20020a0562140e6b00b00570bf45d6f7mr9962508qvb.45.1677683966549; Wed, 01 Mar 2023 07:19:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677683966; cv=none; d=google.com; s=arc-20160816; b=yjgRECxS/jlAQbWD6xbDY7vZgd5v+/oGz9J9btuvya76mxPXK887cWh3V9cjvFhdlx UfcN7nvi2iDAZx3/lhRTvrd3oWvUvmx+IaP0lQ1h4eQopJR0cux9HbPJyh8dYo6PKz6h hEGK+1RJHL0UjxysMURqOxxBc9hS23kE8sJUCfwsjfom0hYPIc4EKSXFnL/NNC59SzRC uva0+otNtHwSnOUS/GDB2I5D+Lnw3UeSXd5UHoJH2f2hyDRkkM+2tep81IfF8+wPVj1M YDq3YwRwpNlRjEe/8KoJxfLiKhYypm42VRVXdG94DvHY0BjG2yjtzHEnOPr1gyW/HWeW /fvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gLoSAqw2g9SSYzDjVUbVFG04TNYZLvZZTMSrfeOd4FU=; b=i4w3a2n1CQGIFfqve4XZX3I1pODsmHhbHnAQfJjE1VaHyblX4WJHAL7XOfbvtsl2Cm fafXPrvkzF2aVpRegp1klK+Wm7cuIvO1WY6w+xc8u39ZttqqhZ7bIc8KOHyGIpGXhkLU GbBnXm+WHIcpc3G6UbKpTDKLiqxv5lum0WztxswypQADd4F3q4NsJ7731MWjaqjVZDxz /bhLNvZ8mskhYdeMz71kSbDORTz5eqWEAq2q+f6b9IyqGdBsvGuL3Sm412Q+N0Yv4C/+ MRGA5FbtzPXTcUKuxqhPYJugk7XMK8lPJFSzuEhnNsacIJh+NAwVlJUOZDm/C60wR2OP AKyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yrLjFlmT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y2-20020a0ce042000000b0056ee46b4f9bsi11538203qvk.480.2023.03.01.07.19.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Mar 2023 07:19:26 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yrLjFlmT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXOCK-0000Iz-3F; Wed, 01 Mar 2023 10:16:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXOBh-00087p-OH for qemu-devel@nongnu.org; Wed, 01 Mar 2023 10:16:14 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXOBb-0007bQ-V7 for qemu-devel@nongnu.org; Wed, 01 Mar 2023 10:16:13 -0500 Received: by mail-wr1-x435.google.com with SMTP id l25so13607689wrb.3 for ; Wed, 01 Mar 2023 07:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gLoSAqw2g9SSYzDjVUbVFG04TNYZLvZZTMSrfeOd4FU=; b=yrLjFlmT9gma5NA+2rSx0JYNqUrwRbL7Tly037x7+tF7sbg23KeJA6Yt3EdxFijx0g Txmhjh+1z60PMCnnVtHLN4+vJAwiT5isENsDjI9kJ4h8AI/Ly10LBzrsLu/Gikp+Rfdr TKGhKJlCH0pYD24JkdGSDW2vkihHwXJ5OVo0vhqcJabRiBRzhQ0FjNg31HpfqZHy4kT3 Vr6xTpJQEFkp5ueBQq8kTpVgnkvC0ixB3m8R0TdwMuHKNWfeZ0mhYl0rvNU5xNUjqo9/ ODIoqbWvBN3yBEVFTtXAW13dXk5XLCWyQNKD15YBuNPHh8XeOw5KDefA7O0qeQtnK8aJ 4wog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gLoSAqw2g9SSYzDjVUbVFG04TNYZLvZZTMSrfeOd4FU=; b=I3O1puaT9opZI4BbMWiJlhUDI1rV/p7YHJ5xFOQVOrLBmOGtm/nbUOy3R4PuRPNNvm iCUjMXh4C8dgShx9vjxnqxiDxQ7CBEisRuvGvs729fAKYIXqi4tT9JuDTda9yYmP7sAe eBcigSVOs+7PSkSH75ziPjfWlhIJc0zMStxQC4nbOXiDuwFbMJIBsEX2RdX1IiOrni6v FHCOo7VspLKB40hlKZHv8cKIpWn2p2qLdQ/1g3z8+f8j7VIDJ9/KjutqUEoKyK8Tnm/A ZcP2td6tVqjO3Qb4WAJLU4aixIAum95AT2VUHGE93QjmEsVyQhxS+PidzsvRjDYlzTKq kElA== X-Gm-Message-State: AO0yUKXihE4NtYSPUIAqwbvD0Waf5mz4Ycg8JIrWX+VA9cyeBtWyribf BHjR5v7xq1ajEnXFhNBg7Bt/9Q== X-Received: by 2002:a5d:468e:0:b0:2c7:1b42:1cec with SMTP id u14-20020a5d468e000000b002c71b421cecmr5000464wrq.23.1677683766517; Wed, 01 Mar 2023 07:16:06 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k10-20020adfd84a000000b002c55551e6e9sm13082916wrl.108.2023.03.01.07.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 07:16:05 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 034AB1FFBB; Wed, 1 Mar 2023 15:16:05 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Thomas Huth , Richard Henderson , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= Subject: [PULL v2 03/24] tests: be a bit more strict cleaning up fifos Date: Wed, 1 Mar 2023 15:15:43 +0000 Message-Id: <20230301151604.1948813-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230301151604.1948813-1-alex.bennee@linaro.org> References: <20230301151604.1948813-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When we re-factored we dropped the unlink() step which turns out to be required for rmdir to do its thing. If we had been checking the return value we would have noticed so lets do that with this fix. Fixes: 68406d1085 (tests/unit: cleanups for test-io-channel-command) Signed-off-by: Alex Bennée Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230228190653.1602033-4-alex.bennee@linaro.org> diff --git a/tests/unit/test-io-channel-command.c b/tests/unit/test-io-channel-command.c index 04b75ab3b4..c6e66a8c33 100644 --- a/tests/unit/test-io-channel-command.c +++ b/tests/unit/test-io-channel-command.c @@ -42,6 +42,7 @@ static void test_io_channel_command_fifo(bool async) g_auto(GStrv) dstargv = g_strsplit(dstargs, " ", -1); QIOChannel *src, *dst; QIOChannelTest *test; + int err; if (mkfifo(fifo, 0600)) { g_error("mkfifo: %s", strerror(errno)); @@ -61,7 +62,10 @@ static void test_io_channel_command_fifo(bool async) object_unref(OBJECT(src)); object_unref(OBJECT(dst)); - g_rmdir(tmpdir); + err = g_unlink(fifo); + g_assert(err == 0); + err = g_rmdir(tmpdir); + g_assert(err == 0); } static void test_io_channel_command_fifo_async(void)