From patchwork Wed Feb 15 19:25:22 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: 653739 Delivered-To: patch@linaro.org Received: by 2002:adf:f90f:0:0:0:0:0 with SMTP id b15csp524458wrr; Wed, 15 Feb 2023 11:26:31 -0800 (PST) X-Google-Smtp-Source: AK7set+ezeUSGBMLO7Iu8ETyiwpmoYb1UMNIK3lWhEAg2GYjUrWF9aa4Em88IIy9JifnMzTAbRuR X-Received: by 2002:a05:622a:343:b0:3b6:5fc7:f554 with SMTP id r3-20020a05622a034300b003b65fc7f554mr5679045qtw.7.1676489191320; Wed, 15 Feb 2023 11:26:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676489191; cv=none; d=google.com; s=arc-20160816; b=tfXCMDKFX8E16aZmuQ4YsCFhpeumnrxcjearE8KjkmusKR4YCK2oguQ+Bs3bzs4ccA McJMy82/MbP1TF/PLo2BueobfkYWcUvtilJrs8MxKiQqGavIrc/wnsVq2q5GjeuJWI3M V+rGoRTauIN84ioko4ySHqPsy46SZPlc2A5bcW+6qnopHQK0y5dXTEN8DCIAbJBe4eTp 1wF6DQG3q0Jn+NMPZFa9vUksIP8UByC4smQlLNKUeDonKmeZHvCbOfl24MZrmbiAx+Q4 vl4sF2V0HoAqTcHx4GZ26kfl+PZy/00qKIVpLlxcp1T7zIECc+UvWdmuWJ7K0jhrYJpj Zulw== 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=/kO6KvD/UT+wvNNPZpX8pG7g3+2FfCgwvzZIN4Mpdz8=; b=IMg4EVX03O7CTggyhhDLuUTqg8x2/EU4ezwClplKoQpS3xJqRyrjuC4Q1TCXMouYig ExqxYnIfxCnVJEqdXrwv9A2/LqN0ShTGbaCGAJcCWOGFK24vkEVnora8/RDfeSh6U+7T ZFXd0WUiLGKG4tFh7d3HOFpnGm9DovPtG2kVZY3rxuCniLweqA+Kw7h47ia4Zfw9b6Vp DxQmuFZZ0zcm4S8nI7Vpe3uLsFpXi8QTzUY8QBt3Zkykn8mts4BmUr+TiRBVGgVtTODQ 94gBtvnUrh78Xe9Ud4F1vpioOOpkOdoLFpB04eu70SSBvyxZsReZKkOUO9rUrgwHio7f hRqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y4zkzeIC; 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 n17-20020ac85b51000000b003b8020698cbsi14913243qtw.417.2023.02.15.11.26.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Feb 2023 11:26:31 -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=y4zkzeIC; 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 1pSNPU-0006lj-O5; Wed, 15 Feb 2023 14:25:44 -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 1pSNPM-0006hs-V5 for qemu-devel@nongnu.org; Wed, 15 Feb 2023 14:25:36 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSNPK-0001gC-1t for qemu-devel@nongnu.org; Wed, 15 Feb 2023 14:25:36 -0500 Received: by mail-wm1-x32b.google.com with SMTP id f18-20020a7bcd12000000b003e206711347so1392856wmj.0 for ; Wed, 15 Feb 2023 11:25:33 -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=/kO6KvD/UT+wvNNPZpX8pG7g3+2FfCgwvzZIN4Mpdz8=; b=y4zkzeICHCC85KUWKYJXPETUTQqKQRyo0EgIZbwGCkfOTfPO0M9Z0ympsxl3qc14nr 9qVmaN7tYkYjrNDjm8T5WNZBx4pceXPYLyBfXeVsWiJQKN+xHHer7JC5wEZrQkq94mev 79eU+AjUaFz9w9o21qDAHtcJR+RptnW6HND1chc8YZkEkSrLXj5FoHBqDp+Wqw9k08At ntr9prdcM7vCAnfNcjeTuXGTinkPnyrVXg+fdwPTywljog6H25F0/9Lm/k/OVmGy6OVy GqFk18/sxyyZlBpEm3DR8XgJhtvsoskHNmVG48F1emrRf6O+tY4rqXGqxY6YTQOyUdTv cXRg== 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=/kO6KvD/UT+wvNNPZpX8pG7g3+2FfCgwvzZIN4Mpdz8=; b=sVE4MdxtprY1moRMrNx339kqkojg0Ty5xhVugCw8SKVBXjoFYNcb+GVd8QtbxY8hfI mi/v9lKJkXbFlFIMyFGhExgPiOBXLntU5xXuGX6v1qQO63wPYr8whFALjzvy+ctBFbhp GMxTfOMcNzDeAqvMBuVBTo6eOceKxuLqe2HAp7z+ijcnXz2hReyLhuqchxvLgXbj1VlG kc5cn7nViVSR0fScuc3lhGW9iy9RgUZEcocIevnl6QZC3hwvN4Z6K6FIrA7vz9kc1MCM EfOwNdv/TKYI+ja5FnTDNyKAmILAX0tJQGHGYMAa6rGhmuEqKAXq9Hy2pbcUNiYP3Ppe WAgw== X-Gm-Message-State: AO0yUKVxo5NPTFnPj4J9P9b4OS2Ndny2FBtkmK9pXlcZhHxdQlXAk0Cc voPAWltFsj1TvYAeiKl4j4HO2A== X-Received: by 2002:a05:600c:2e95:b0:3dd:1bcc:eb17 with SMTP id p21-20020a05600c2e9500b003dd1bcceb17mr3051433wmn.28.1676489132528; Wed, 15 Feb 2023 11:25:32 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id r18-20020a05600c459200b003dc4baaedd3sm3367513wmo.37.2023.02.15.11.25.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 11:25:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 09D2F1FFBC; Wed, 15 Feb 2023 19:25:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Michael Roth , Alexander Bulekov , Qiuhao Li , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Markus Armbruster , Paolo Bonzini , qemu-arm@nongnu.org, John Snow , Pavel Dovgalyuk , Darren Kenny , =?utf-8?q?Alex_Benn=C3=A9e?= , Stefan Hajnoczi , Bandan Das , Cleber Rosa , Peter Maydell , Bastian Koppelmann , Yonggang Luo , Li-Wen Hsu , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Beraldo Leal , Ed Maste , Wainer dos Santos Moschetta Subject: [PATCH 04/12] tests: be a bit more strict cleaning up fifos Date: Wed, 15 Feb 2023 19:25:22 +0000 Message-Id: <20230215192530.299263-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215192530.299263-1-alex.bennee@linaro.org> References: <20230215192530.299263-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.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: 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 f3c34152ac..70e82e0e12 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)