From patchwork Thu Feb 23 15:57:10 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: 655979 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp409190wrb; Thu, 23 Feb 2023 07:59:11 -0800 (PST) X-Google-Smtp-Source: AK7set+i+3/rrEcS+PB3+z1YPNxb28h6ZaHRg1RKsdfNLMPt0bXuARXz8gmFvuLa7C5iO7Hgi5qH X-Received: by 2002:a05:622a:170b:b0:3b8:1723:6d15 with SMTP id h11-20020a05622a170b00b003b817236d15mr18424540qtk.58.1677167950873; Thu, 23 Feb 2023 07:59:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677167950; cv=none; d=google.com; s=arc-20160816; b=TAsMdPKHEKfXCMhBuOQXzN6LZA1PD6TWOucyLdKeB/Q9Kb+n4Rzg8hQA4Ykia5S3i6 /3k74U0qNazVE61RGNAF45MtBPV3gbb5rW9wrc/jLcYto443o0lEBV4tt3AQmip1tbJj Ds/WRdnz3XRyLxn246vaFD9Jxt+4TF7V0RMwJXzey0qPxditoU8giD1AsNda/3xtVdQ7 kGpj0c7uieiOxlyEJHMBZ1XAZyMIa9N8W2HfokwBprpjZT0jXXSTvBC2Kr8TtcC98RjT qX7TUCJTV4x3bDVnJYdWdOXkrtXaH9/uP93wmTh1PbkasOefjnHyVUVUCofpK+15kwaS p/5g== 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=Y5CagnZd0OC5H3cuEddG4GatnBqEK8bA4UH4sgfkIbo=; b=D/8Mdo/OqNRkDXMJpyOG5tvWExlEjd/HuccdspbiWrkcBJFBE1m3p3QghyY11a2CXH M4Ece90LwzOV3I+fWRaJUHgO6adTQdRHmID8pU7sWOsPafPXT4up1inJ1yEL/klGA18/ lIAlU0BLtdmgw0UPYprtZT65n3uFlHV2dpi/fwTdQIcuWcxqYd7HuIsGiggWa8QVSlFC NfASXDQg+81OfDBh5m3oGy2oU1QrPgMJxuVvnvayKn8pwDwr1/mBxL4lr3C+XH/5rWMe 2lzj9/yiGukzvn/NjflZonDoj4qnX4yM6SFZVr255WeY+Lkoyj8IyF3bD64pDFpHK2sU qO9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sxP3WpiO; 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 q6-20020a05622a030600b003b8458c31fdsi6425275qtw.286.2023.02.23.07.59.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Feb 2023 07:59:10 -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=sxP3WpiO; 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 1pVDyL-00006P-Tj; Thu, 23 Feb 2023 10:57:30 -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 1pVDyK-0008OW-2u for qemu-devel@nongnu.org; Thu, 23 Feb 2023 10:57:28 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVDyG-0004iW-Su for qemu-devel@nongnu.org; Thu, 23 Feb 2023 10:57:27 -0500 Received: by mail-wr1-x430.google.com with SMTP id r7so10890763wrz.6 for ; Thu, 23 Feb 2023 07:57:23 -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=Y5CagnZd0OC5H3cuEddG4GatnBqEK8bA4UH4sgfkIbo=; b=sxP3WpiOCnEFP/+Ji0UnSZeDb2pvABaXDDuPWJY+0gexmPwyRircxBeC7IrNfVCI/i 5MzDJjisk7UZJYGAstxA65qaFdqNDOFzxh6lXcTzA5nViYBK+CIi69MEGsBSPK5jpR0c nZr2q5qbbKSME85Nu8gcoIZAFdwNC7xf3G5oTol7VknpiOUkKoUjHW00ARmfUVhuueAj CsJ9tNKsWjs6KSCUrLHDLbiptmVEnJuOK8/PA+J9kdqtHwCasESdaLJvs2sfi8zDem42 oEh1bNSekkbkUGGySU3+PwjVpwbmTayK2lMA1hZXrQCNO+DBhFh7eNAYltACm8TB73dR 96Lw== 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=Y5CagnZd0OC5H3cuEddG4GatnBqEK8bA4UH4sgfkIbo=; b=ulcNWMgroZcWZr97SAYd86ZYvZsHoXhGOm7upuJ4mKde97EW0AZzZPPnRZvAVgzH+3 oWWU0/9LxHfrMmOhI2NxoKeSDUKq3IeNucmhtgvo/nrNnEf+9vO8yeMrkSPnd1VNKGBn Q7pmIv4oqnWDBtMzCdzJl4OwQBo3a6Gqc/sM8OLanHKcSI4pQMIKdlsscjnFzT51iSDT SwLXlceOlu5hm2BDI9Y6UNpwcix2lZeYzM7a5SeiXACPr1OnfuGGsYgBH1xkGWgXbPTt wXim2YcqoxFvO11ix8GISWhuCqEZi5MzJ0mBO5MCej6gzw9Y6Grg9WIiaZNVNwSi5jOd H2UQ== X-Gm-Message-State: AO0yUKVzSMGZScPFW1WYMbCbH6BlYz0ZftRXjP9Jw82sEgGEQM67kMYE QHbMLvOoioj2uIc9yD41vbqwGA== X-Received: by 2002:a5d:5308:0:b0:2bf:c0d3:430c with SMTP id e8-20020a5d5308000000b002bfc0d3430cmr11035823wrv.11.1677167842227; Thu, 23 Feb 2023 07:57:22 -0800 (PST) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t16-20020a5d5350000000b002c53cc7504csm7354786wrv.78.2023.02.23.07.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 07:57:21 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BA4FD1FFBB; Thu, 23 Feb 2023 15:57:20 +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 03/13] tests: be a bit more strict cleaning up fifos Date: Thu, 23 Feb 2023 15:57:10 +0000 Message-Id: <20230223155720.310593-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223155720.310593-1-alex.bennee@linaro.org> References: <20230223155720.310593-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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> 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)