From patchwork Tue Feb 28 19:06:32 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: 657478 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp3097295wrb; Tue, 28 Feb 2023 11:09:19 -0800 (PST) X-Google-Smtp-Source: AK7set8j1bPrpeCfzP8taL0Vg/Xsz665aqIlXHZUaqOGdL2tUbnYmgh+CuDiyQ+kjfreUs//EMm0 X-Received: by 2002:a05:622a:40d:b0:3bf:d258:c151 with SMTP id n13-20020a05622a040d00b003bfd258c151mr6740346qtx.12.1677611359547; Tue, 28 Feb 2023 11:09:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677611359; cv=none; d=google.com; s=arc-20160816; b=kDInlQFdzWEIVT3Pc5f36UuKLQwMHVWnEFs48aV3R/72fBaxbgI9JUN98/U4/+aCdz /sANM70Ak7tIbLHAHWUqMvOeawBIzgtfFXklbDb0kweoH6OKf1yUqF++/dBFA7kZ1bHA Yv1h8OOFQldeCoC2sn/jRQpA2wR1I0op9m8VDBKik1NDNs0pQ+IR/5fwEVO2XVn/vUH8 4E9SQ6QONAIpbJ5rWhzdjMkHD9fUgx6kvzpex0JASM330Xg/42wq5asb3KxQymbtUCkn duBoNiM5d8LbxDF6kQ4MIkM4TvF8wE7CwjP6HnDpPbLGIHIjN5CbSddPeSc+k5iglCk2 x7Uw== 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=5wgqhpOuR7e6cKqdeQ7eDt12+eCjeJwpWxVsBAVXjj4=; b=dOqGnPCFz6G/mAe1zDXHqrJopHxtocuH/h6eXdZsHI+iUuaJ1fP3SzXF+tZLQMrzwG iBpqLDoyFCg/6ASctTNAtfbeADzZ1cPKyubP2bMHPdYf5PgR5itZd9tENX/6460y9bXK QaW1NrNA+LxCRDzDJoI5zguiCZP/NiP1gic84h1lI/ao+Qb82YlquuE2mMwEm3aYBsR7 wUBU57dtJpGbuKQBrQPLo9MFfiHlQUj26tQ1U0Lj32RTfaPVoy6VeZaeUBUojCVoELf3 qiyLM2e6/bbn4VOENFZ4/ZY+mIwm4Xeag0K5jlNEIwk9maibJUoHWzRu7ysRLhZ7M9xl HgZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ArEdwujJ; 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 18-20020a05620a049200b00742cbffa5d5si2206160qkr.375.2023.02.28.11.09.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Feb 2023 11:09:19 -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=ArEdwujJ; 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 1pX5KB-0002Uu-Ha; Tue, 28 Feb 2023 14:07:43 -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 1pX5JT-0002Fb-HR for qemu-devel@nongnu.org; Tue, 28 Feb 2023 14:07:15 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX5JQ-0002ln-F3 for qemu-devel@nongnu.org; Tue, 28 Feb 2023 14:06:59 -0500 Received: by mail-wm1-x335.google.com with SMTP id c18so7132574wmr.3 for ; Tue, 28 Feb 2023 11:06:56 -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=5wgqhpOuR7e6cKqdeQ7eDt12+eCjeJwpWxVsBAVXjj4=; b=ArEdwujJWnIc0xOGkrrbqFuONQZaB8cf56w6B/8UFbuHl46ijekAFfBLoHJBGYWng5 DqVEBd1S37zqhTg8mAPkFl2EJGJIcjzeRvAkz6TN4+eQssh0nzvBQhNO0ruEDTFJ4F+Q Rhhm6UXrw3kKqBqj6/K7ZQX8AOuOqCHHVFc3Nu0TX/hqW+GI5/tlEgTO+o18XoG42w3q eriicvc2VOdpaE34kLhmSeRj+5fPLXes8ouI76r+r6koNbpDMF8u8Ai2C9b6JIOHnfhN A3o9WFS+3adfqiZv84YfTWJstXrABKd1hn95YJfLGOn/7mFuqwzrMVNjQUbyj2Xe5DLe ulLg== 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=5wgqhpOuR7e6cKqdeQ7eDt12+eCjeJwpWxVsBAVXjj4=; b=pD6FofYf88NDhskCu+onIVPWuSbwdFWkYj2CwQSjNXlKsOAMMqtd/uQDK78gMMra9k ccwy3lKOu9LM+5fsegKSkcE2vJd+LbrFWQY6JFp6mwRRtd/yarukKQx0X7CM/26VPh6h 4451gwISvV0OYLq+jvboWt7MaRZkbcPqSnghfcGaezcks0oeVMMGvCLIbW7l92Y+UVfv mZLasPLmTPFUIK/BYd37PA9EqI8XtYt3XPWFtYkBHMHN9woOAxwqnC/0PU5iJJNh1PXx SoGe2EHwbCGXiD+RVS8i9UUOIO/z99qbV/B6lZ9oW23gtNt2XKG6iKHNBWSDRE33R5Qx Rt3A== X-Gm-Message-State: AO0yUKVQ6GiM0FXmcrlOKdwsJL82cF0ei/1vkAXbsjljQxLfmmD4TLOd xF+LW6hnkzUQSTZ8XHfU50ZL/Q== X-Received: by 2002:a05:600c:331c:b0:3eb:55d2:9c4c with SMTP id q28-20020a05600c331c00b003eb55d29c4cmr1562324wmp.16.1677611214972; Tue, 28 Feb 2023 11:06:54 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id o19-20020a05600c379300b003e2052bad94sm16690886wmr.33.2023.02.28.11.06.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Feb 2023 11:06:54 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9E1BC1FFBB; Tue, 28 Feb 2023 19:06:53 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Michael Roth , Peter Maydell , Kevin Wolf , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , Alexander Bulekov , Aurelien Jarno , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Darren Kenny , Hanna Reitz , Cleber Rosa , John Snow , Ed Maste , qemu-arm@nongnu.org, Fam Zheng , Thomas Huth , Yonggang Luo , qemu-block@nongnu.org, Paolo Bonzini , Stefan Hajnoczi , Bandan Das , Li-Wen Hsu , Pavel Dovgalyuk , Laurent Vivier , Bastian Koppelmann , Qiuhao Li , Wainer dos Santos Moschetta , Richard Henderson Subject: [PATCH v3 03/24] tests: be a bit more strict cleaning up fifos Date: Tue, 28 Feb 2023 19:06:32 +0000 Message-Id: <20230228190653.1602033-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228190653.1602033-1-alex.bennee@linaro.org> References: <20230228190653.1602033-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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: <20230221094558.2864616-5-alex.bennee@linaro.org> --- 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)