From patchwork Tue Feb 21 09:45:48 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: 655364 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1869071wrc; Tue, 21 Feb 2023 01:47:53 -0800 (PST) X-Google-Smtp-Source: AK7set/LmRUH1nnZ2zJhaI3ZGSqW9SMUuNkNh321jhYLjJBW6sBKfNqKYx0eFPXrQn2me1n7rUID X-Received: by 2002:a05:6214:624:b0:56e:9e34:9298 with SMTP id a4-20020a056214062400b0056e9e349298mr7909754qvx.8.1676972872838; Tue, 21 Feb 2023 01:47:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676972872; cv=none; d=google.com; s=arc-20160816; b=ivj0XOmj8V/hb1/0wO4aSBJp8+v8P4KwrPZ+lJBuUKEZGCV4Iut7BJ1o7cWwtl5CZI 9KPwoe9Cj5Y0wwbS7ROFtb/i0XyPAQOeMKIQoFBX2T/9r8CJGm4PT2gIldBC9x0zuSHo E1jyQwlZANTYLxyLsLSLqR7JyXKvu1Q7rSj7iBzoj0BwItrLVMXbgYbL292r4hlRcvBe OPHFCY11JZ8CmRZeWz87Wvu+91KewI0SaWh/irPr4PlVFe0CJt04bDhT6gfmuSDnU0g/ faLn3lyJzjXrN5W4V6/zV6nlgpjwKY6QIcUB5b4XhDRL7mbuyPbQirmCH8hTdmw8S6YK nHmQ== 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=TA6OOWQ91gwMPVdJaiqremUPesLCo2/3y2+/jq8dGYs=; b=y/GDlzmahw/1/mdC7WJUHyHG2Pt87kWjCI+QnWAUFgvKdKks+PkV6tVZ5hLiHXJexU hFpw5RhPZ2n6JwWdfM9rp8ssmKl0Bef/hVGqM0KvLsRv8eEQmO1dUCi7tZT0zFRiCg6H BSHeWxbmBH1PyDLz0VngRGzckZ8LQuv94nHlcH6MVmT7MgyUClFKOUBatCr8w0sBUuWp NO7hLai7zCe9dkWsWRatwNSYgTDmXCJtKI5QhjX+S/Fe1TcrQ0xqyv+aKU9IFBNUD9Zf LXwJ3ZXWSM+uJcL7pl/reGRAik1TdJ9OFX+vZv/0kgWhjimNnIKtkaWjvRam+0BeZzbl FhEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NpIh7un1; 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 az34-20020a05620a172200b0073b2ce32470si12230183qkb.106.2023.02.21.01.47.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Feb 2023 01:47:52 -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=NpIh7un1; 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 1pUPE4-0006gW-Kz; Tue, 21 Feb 2023 04:46:20 -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 1pUPDp-0006Xy-Dv for qemu-devel@nongnu.org; Tue, 21 Feb 2023 04:46:08 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUPDm-0005hm-Lh for qemu-devel@nongnu.org; Tue, 21 Feb 2023 04:46:05 -0500 Received: by mail-wr1-x42c.google.com with SMTP id j2so3531303wrh.9 for ; Tue, 21 Feb 2023 01:46:02 -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=TA6OOWQ91gwMPVdJaiqremUPesLCo2/3y2+/jq8dGYs=; b=NpIh7un1vqUK8m7PlxTTbmWgl87vvyqbHz//QFdv6SAY1iOknzAM6DgACweetBf2Cf uZXgFXW/EWjSisvJRPbU49rirlESKvn3ODFFCHKZ5l4DrZymW0K55EtyDEhalR7x4VEd Mp8CnQ6b6salwmDhDBiGOcfKEc0i5Nv8IaV6h9jq3DtbwMuQM7u3Rc7fCV1SxeLjKbEu 22lQBEXP5DXOXTu6Z7anuR1vv8V/9u+Mc6dh0POgCGp9PTITSheiifD8B+zWjBX8OqCa 1Xkh0Rs3XpW/vWIO4AOKkHb5fVORAudp9dRiWop9r0161rARncrjuHBDjddNtuMhM4g0 d0KQ== 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=TA6OOWQ91gwMPVdJaiqremUPesLCo2/3y2+/jq8dGYs=; b=3qIIg7Ms23xNa1/V4StNxp2UmhoZMmxWHKQok2T8UpugoFi0X5mIMYSNqfKBJLU6gH jtycj+ca2kjFXpopJzyFaYCcGX5ZI23vyH1eoFFn5DNUS0kyLJ16EfhwfcL4nXfs7zFX Q0CHDWOgwL4zFJgJAJbhuXB/D/9I/3qclrbP3Ngs2rw2xCkdMnkTcshVt5AirIVipOn8 NGohjfDn6RLR3F3OhC2WkJ5VgwvkC4H4jXRwcU+fh71qboaoRMKDuFtXQ8GLFf6lyZpX sqDi88iokF0WvgR2i4ED/nxw2uWVO+oUC/zJD1QcFOiL+Rjo3y61pzR9ku2VocGjJ0PV 6MrQ== X-Gm-Message-State: AO0yUKVWsMPmL5oxzmhrM2eRbRsUDNVvje4xzODpeJgRbMSo8OiFtnb+ W2tGqkvBTKE/upUXczZqG2k9jw== X-Received: by 2002:a5d:4149:0:b0:2c4:695:d644 with SMTP id c9-20020a5d4149000000b002c40695d644mr3686090wrq.9.1676972761241; Tue, 21 Feb 2023 01:46:01 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id j9-20020adff009000000b002c3ea5ebc73sm4712263wro.101.2023.02.21.01.45.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 01:46:00 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7BF181FFBC; Tue, 21 Feb 2023 09:45:59 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , Peter Maydell , Yonggang Luo , Li-Wen Hsu , Paolo Bonzini , Thomas Huth , Ed Maste , Bandan Das , Cleber Rosa , Qiuhao Li , qemu-block@nongnu.org, Beraldo Leal , Hanna Reitz , qemu-arm@nongnu.org, Michael Roth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Pavel Dovgalyuk , Alexander Bulekov , Darren Kenny , Aurelien Jarno , Bastian Koppelmann , Wainer dos Santos Moschetta , Stefan Hajnoczi , Kevin Wolf , John Snow , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Daniel_P?= =?utf-8?q?=2E_Berrang=C3=A9?= Subject: [PATCH v2 04/14] tests: be a bit more strict cleaning up fifos Date: Tue, 21 Feb 2023 09:45:48 +0000 Message-Id: <20230221094558.2864616-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221094558.2864616-1-alex.bennee@linaro.org> References: <20230221094558.2864616-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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 Reviewed-by: Thomas Huth --- tests/unit/test-io-channel-command.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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)