From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EDFDC001DC for ; Wed, 26 Jul 2023 07:22:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOYqZ-0001g8-DF; Wed, 26 Jul 2023 03:22:11 -0400 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 1qOYqS-0001cE-Ny for qemu-devel@nongnu.org; Wed, 26 Jul 2023 03:22:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOYqO-0001Gc-G3 for qemu-devel@nongnu.org; Wed, 26 Jul 2023 03:22:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690356119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=txnapvyzQ9FCrGv8S8lOCuZTYC4MLFrECRp8QHnD0sU=; b=aXW/08Ps7nfO1m0CpBSMAsTwAUSRxE84C6aRM06SGJCtWTpPSkYDn9uic/JRfDOVF+Ujqt Py8JBPz2hE/taKlMddnyRatk6CtWY7rvGflwNGyR61gS+6jR0m4KJEqDFQ52rOVPR2RMOD p21bg/jfzWDyXhdQxKxV3o75oVzBBhg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-38-9BBeXQdaPE-YbPZxo_KNuA-1; Wed, 26 Jul 2023 03:21:57 -0400 X-MC-Unique: 9BBeXQdaPE-YbPZxo_KNuA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fd2778f5e4so3724685e9.1 for ; Wed, 26 Jul 2023 00:21:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690356116; x=1690960916; h=content-transfer-encoding:in-reply-to:subject:from:references:cc:to :content-language:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=txnapvyzQ9FCrGv8S8lOCuZTYC4MLFrECRp8QHnD0sU=; b=LFwNG3GvxNfAqJAKrjV6XO3iDEEMJ2vhfwvqVVUeP26ENp1iaFXCrgj4HzS9nlEK93 LiX4AaUvIQBaJw3Ag4Nv7FcmPivob33QdlPTvcvdfNiZpd/8+OKZTuqpN+OiMP3obWml l5HWKu24Kb+0R/B2pnhU46JWJE9cRLSYeFja7wz6911QQZ+CwHminxOMPxWBJLlM49X/ aJDHGYVDx8B/evVsqHNXxDdz4UUJxfFwW+JMcz0DfRapWlpO2jNiQONufaT1eLcqMiDY KZaiw5wfhOEiXwvKgEfqC/uxgfy2Y2XFPA9NOJKD1dSjwkEu6b+2fX4ie7FrcKuS2oo0 hVaQ== X-Gm-Message-State: ABy/qLZ6qbBwkiViGON6sG0xpKogXE93Fz0p3Yji6N7Jz0IF73L93Zj/ eG25h+4O6dqXmtakrRd0yyprN/5dmRZUSL3Ry0kbCIihXHlJmXMT4Ate0ctMZ8Gv0CVThS4pA4u zUUSgxRupH4wuXGU= X-Received: by 2002:a1c:4b10:0:b0:3fa:8c8b:716 with SMTP id y16-20020a1c4b10000000b003fa8c8b0716mr3876814wma.1.1690356116065; Wed, 26 Jul 2023 00:21:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqRshJW4XLQtIKOZkdYdEEOUvIN/jBWZrJygYjoAzIYa0pAlxxvWK5pN9zvRaIxxfcliC8Xw== X-Received: by 2002:a1c:4b10:0:b0:3fa:8c8b:716 with SMTP id y16-20020a1c4b10000000b003fa8c8b0716mr3876800wma.1.1690356115804; Wed, 26 Jul 2023 00:21:55 -0700 (PDT) Received: from [192.168.0.3] (ip-109-43-176-0.web.vodafone.de. [109.43.176.0]) by smtp.gmail.com with ESMTPSA id i12-20020a05600c290c00b003fc16ee2864sm1137053wmd.48.2023.07.26.00.21.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 00:21:55 -0700 (PDT) Message-ID: Date: Wed, 26 Jul 2023 09:21:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US To: Jeuk Kim , qemu-devel@nongnu.org Cc: fam@euphon.net, hreitz@redhat.com, k.jensen@samsung.com, kwolf@redhat.com, pbonzini@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com, berrange@redhat.com, marcandre.lureau@redhat.com, marcel.apfelbaum@gmail.com, mst@redhat.com, philmd@linaro.org, lvivier@redhat.com, jeuk20.kim@samsung.com References: From: Thomas Huth Subject: Re: [PATCH v7 4/4] tests/qtest: Introduce tests for UFS In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.091, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hi! On 26/07/2023 07.30, Jeuk Kim wrote: > This patch includes the following tests > Test mmio read > Test ufs device initialization and ufs-lu recognition > Test I/O (Performs a write followed by a read to verify) > > Signed-off-by: Jeuk Kim > --- ... > diff --git a/tests/qtest/ufs-test.c b/tests/qtest/ufs-test.c > new file mode 100644 > index 0000000000..5104a0a56a > --- /dev/null > +++ b/tests/qtest/ufs-test.c > @@ -0,0 +1,575 @@ > +/* > + * QTest testcase for UFS > + * > + * Copyright (c) 2023 Samsung Electronics Co., Ltd. All rights reserved. > + * > + * SPDX-License-Identifier: GPL-2.0-or-later > + */ > + > +#include "qemu/osdep.h" > +#include "qemu/module.h" > +#include "qemu/units.h" > +#include "libqtest.h" > +#include "libqos/qgraph.h" > +#include "libqos/pci.h" > +#include "scsi/constants.h" > +#include "include/block/ufs.h" > + > +/* Test images sizes in Bytes */ > +#define TEST_IMAGE_SIZE (64 * 1024 * 1024) > +/* Timeout for various operations, in seconds. */ > +#define TIMEOUT_SECONDS 5 From what I've seen in the past, it's possible that a process gets paused for 3 - 4 seconds on a very loaded CI machine, so 5 seconds is already close ... I'd suggest to use 8 - 10 seconds for a timeout instead, just to be on the safe side. > +static char *drive_create(void) > +{ > + int fd, ret; > + char *t_path; > + > + /* Create a temporary raw image */ > + fd = g_file_open_tmp("qtest.XXXXXX", &t_path, NULL); Could you maybe use "qtest-ufs.XXXXXX" or something more prominent instead? ... in case the files don't get deleted correctly, it's easier to know at which test to look at later. With that change: Acked-by: Thomas Huth