From nobody Tue May 14 03:17:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1621290533; cv=none; d=zohomail.com; s=zohoarc; b=LGneQJUVtj/OQle5YMd7BnXTR7x9HUKJVpjs9N1azDaaF0XbS/abELspo27Ns0ODl96hxxPzXycc9VsgYAzNX/uAbFl7CvfD4/nEmfKbOPLTsPI2Gplfghmkpjxm9pO5gVpfuJIhbp8YaWuMqzhnRv/s49qIvAWSfgtZOl8jBZw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621290533; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=vcPsnLKtw1HCMMQ/dLjaGm4sD8Cxtqu8Pi5qTRdncuI=; b=gzeAqDUK0o2m2spL+LUJN52BMMCO82FNeUCj0FLE829HdC3JM5FXigCEd+jIUUMfzULPLtYOuIuUm9J3kU5hR8izVmO7hZ+AD6Sz070+4TLWW0W/wNFi7pNItow/74YBgF6SYfP6acVPYyBG5RjH/vT6t6I5M/bvjLCd4jbZqq0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621290533994423.54599186821576; Mon, 17 May 2021 15:28:53 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-9LJXuWd0M_yTHz-Eroz8aQ-1; Mon, 17 May 2021 18:28:50 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 567C3802B4F; Mon, 17 May 2021 22:28:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A18545DDAD; Mon, 17 May 2021 22:28:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id E576E180B463; Mon, 17 May 2021 22:28:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14HMSYIp002962 for ; Mon, 17 May 2021 18:28:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6DD1B6E1C2; Mon, 17 May 2021 22:28:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 678B77D2B4 for ; Mon, 17 May 2021 22:28:31 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB3EF101A531 for ; Mon, 17 May 2021 22:28:31 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-5iri7xSANV2Oy_aoMUGmmQ-1; Mon, 17 May 2021 18:28:29 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2059.outbound.protection.outlook.com [104.47.13.59]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-23-sx6liunOPUSMGzJKtebg9A-2; Tue, 18 May 2021 00:28:26 +0200 Received: from AM8PR04MB7970.eurprd04.prod.outlook.com (2603:10a6:20b:24f::9) by AM8PR04MB7233.eurprd04.prod.outlook.com (2603:10a6:20b:1df::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.26; Mon, 17 May 2021 22:28:24 +0000 Received: from AM8PR04MB7970.eurprd04.prod.outlook.com ([fe80::44f9:5a6e:fe98:1718]) by AM8PR04MB7970.eurprd04.prod.outlook.com ([fe80::44f9:5a6e:fe98:1718%7]) with mapi id 15.20.4129.032; Mon, 17 May 2021 22:28:24 +0000 Received: from linux-tbji.devlab.prv.suse.com (75.169.0.165) by AM9P192CA0009.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 17 May 2021 22:28:23 +0000 X-MC-Unique: 9LJXuWd0M_yTHz-Eroz8aQ-1 X-MC-Unique: 5iri7xSANV2Oy_aoMUGmmQ-1 X-MC-Unique: sx6liunOPUSMGzJKtebg9A-2 From: Jim Fehlig To: libvir-list@redhat.com Subject: [PATCH] tests: libxl: Mock xs_open and xs_close Date: Mon, 17 May 2021 16:28:03 -0600 Message-ID: <20210517222803.4220-1-jfehlig@suse.com> X-Originating-IP: [75.169.0.165] X-ClientProxiedBy: AM9P192CA0009.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:21d::14) To AM8PR04MB7970.eurprd04.prod.outlook.com (2603:10a6:20b:24f::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1309297-e834-4f02-a516-08d9198315ac X-MS-TrafficTypeDiagnostic: AM8PR04MB7233: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:595 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: H3XsH7V25igQtEGdBOdF0czZwk3uBgy7utDcrnmng+wz95OOWZinI21l7c17DCL8gHR0z/YigVFoqrvt4voktm5M3qLacqposSSqXi8+JQV3gfT0DxwhP3WtMs1TZa4L37sTrRrqQGiCG3a0dpn5pNLK3zrN28YcY1b7QOqVUpHblxzeFKZzkguZmZC40EapK6zAaeBHaO+HmRH4coegmGhlncNIEx2coSJ/amWAQYefqu+5XkdmWr0fYVzyYoRWGS7N83rcLum5bC4su10910ZKcpo4wWd/uFvriricnbR8fU8ii9SBkFf2V1sV9srmLUt8RF5ScI4ttRkMyXZeuNYE60/9TUNysFQJvMbRn8pYHpEvYs65HFY+3UGW1ae88j5iKI08ce6fyW+5EOozOCtSQG0WogT07p1eua8WrCEISmY5cqSralcws54uewrHEx67yoio5fFCmN9BnJ8sk5yPjZz35EhjGRXoJ3hlutsl9qfZXF22Qu/KgQvPDk79reuzvPyhj5Tc57FKJLKfXaV29otSRofSMubCUhk5Sd15LTEZC1Ab8X2sB8rsVSRUmqhEwDjupt5OG2Y9jmbVZ2VHuu7b5OoslG+XwSKBajqIBSn803gm6yKbG2H9h5eXJ9RuZuAb9n1w3FB4TJAAW3alUvMKlZcwYwu78WysLwTCqqbGh9qymyseAvVvUfRgBQ1UgGpVd6AcUQ9kNKPBqmUBMFDofCQW9LYGEoxJGb4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM8PR04MB7970.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(366004)(376002)(136003)(396003)(346002)(66476007)(8936002)(5660300002)(316002)(8676002)(36756003)(478600001)(52116002)(7696005)(107886003)(4326008)(966005)(66556008)(6916009)(86362001)(38100700002)(2906002)(1076003)(6666004)(16526019)(2616005)(956004)(38350700002)(6486002)(83380400001)(26005)(186003)(66946007); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?dwpVR/mD5e6PahE/X5vgK/E5ErtGN1rJdRfOLSlByLIiFi19MI5S3ghvCkZL?= =?us-ascii?Q?zhYPC8OAkuLfNuzwPY6ntWHiaDBy/9kY9xYuVGCCj5vtSQivqTaa7dQOCvc8?= =?us-ascii?Q?qKkV623N2bPP3xFWHlzaDh58tyaXWQ+GHr/j27Nx++90NS2y5q9pmNyXKTRY?= =?us-ascii?Q?nj2+s3cX+fR5g+LD+4/1DNpxM3zQqcZiyTYW9wgvxGO3EoM7ehmNPdDDLybg?= =?us-ascii?Q?c9QkAL4pcbWNOgkqo9IGFWk2jeikY6HjB2ma6ObNAcX/8xhrK3AR4XyvLH8l?= =?us-ascii?Q?UPHDqT3HeU9Aks4J1erjxscvozzcfK7En4mvD/xqb98VYd+ByDREeZrLTb5A?= =?us-ascii?Q?PNI6VjS5cfO2xvxuguhu1FJc+90kd8R1sgu9aW0mbyg0dkE9Ln8xTmu1m173?= =?us-ascii?Q?mJCiBX0eWWJTfTTx2CYEEVpCFTRO7IdKtPNzKY6jzwgaXN8iW4eLYf7DPLBe?= =?us-ascii?Q?/g2Cms5VQQP3yxjPHxhTWAE3wcfeJlHJ1i9qi03qVilhnomyf/fovnhi63Iy?= =?us-ascii?Q?QkZ5w/ugCbuKiJVRrzG2pwdwmvZQPfbDnsdWNEksvhvBx9UtHPvmrE+J5ahM?= =?us-ascii?Q?WgRFWMAdwGsIL7URtbLvw7xD3lQGLNXmTWW4OX9F6R7IvZpHrkUZueOWn15J?= =?us-ascii?Q?6kEoToBDD9J+0nHPQGbRRWyEG57SNesyTjPf6utRxtIriG+8B1V5L6l6Fq03?= =?us-ascii?Q?E2W77j4rx8m93a9KDbSb4nkFxHD1Pc4zK8bQCKQ2V513m1p42qNT64yJLPeC?= =?us-ascii?Q?e8jqN5i6wC04cDxDS6pgN0iLdKCITa6xnKC/yKdK8gaA3x5ggEN7IaJBgJbH?= =?us-ascii?Q?GJCUWB8kNcksaRqGEzskfkrUQaRdZFhcs7kokJQRQWQJZejvxHK6vUAgStkC?= =?us-ascii?Q?iaJAH472cRkun+A9t/QCR7XLu7Q2t18fcvMiSFJULIJhLdQIDhU0SO5Zo82G?= =?us-ascii?Q?MmAV1X1r8QXc7h7vD8diQ5jhs3gC2DL3uQhrgqlVuGR4pVFr2BuU/w33lahP?= =?us-ascii?Q?SyoOeNzbe5k0CnaKEsdG200mwBJ0brVTZ4r3afycWrpR56SGZPeQSQNgUikS?= =?us-ascii?Q?hv/tEIXRkWKvWLgQmF7tf3jXeLTpMRIiA+/5dHKHqNIsXpZB9WPBF3ffsRr7?= =?us-ascii?Q?PEox/xXAQNtQnGn2Vl22bciC0NoNqw21jt5sI2HDk12kGR2ixoz7YOaB12tS?= =?us-ascii?Q?oAu3kf3CQ292RGCv88vWQaXS02059r+fjsb3GlrQJjBvqkngitWQTw3MwDau?= =?us-ascii?Q?73ZsKKj1lG9INYDhCn9Pr2AfrlKMECfJeyo2IlED2bZRac5qwNLEXi6QF5jz?= =?us-ascii?Q?g4ZqKFSFOTO/Sb6Jp11n6ZwE?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1309297-e834-4f02-a516-08d9198315ac X-MS-Exchange-CrossTenant-AuthSource: AM8PR04MB7970.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 May 2021 22:28:24.6952 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OL9f8Wqg+jYaT9EVYB2kLc4JGTyujeFdfze4bqb+VQpT9iKim80JyIRef8L9ZzXrSMUDt3O5vVGJ4/lKVLa5Gw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7233 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 14HMSYIp002962 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Xen-related unit tests are failing against the recently released Xen 4.15. Xen commit 90c9f9f4dd changed the implementation of libxl_ctx_alloc to use xs_open instead of xs_daemon_open. libvirt has already mocked xs_daemon-{open,close} and others to allow using libxl in confined build environments. This patch adds xs_{open,close} to the list of functions mocked in libxlmock.c https://github.com/xen-project/xen/commit/90c9f9f4ddd55e11be0506bff10c62375= 07c6e0d Signed-off-by: Jim Fehlig Reviewed-by: Michal Privoznik --- tests/libxlmock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/libxlmock.c b/tests/libxlmock.c index 604dc4bfbe..a52d4bc2ed 100644 --- a/tests/libxlmock.c +++ b/tests/libxlmock.c @@ -39,6 +39,14 @@ VIR_MOCK_IMPL_RET_VOID(xs_daemon_open, return (void*)0x1; } =20 +VIR_MOCK_IMPL_RET_ARGS(xs_open, + struct xs_handle *, + unsigned long, flags) +{ + VIR_MOCK_REAL_INIT(xs_open); + return (void*)0x1; +} + VIR_MOCK_IMPL_RET_ARGS(xc_interface_open, xc_interface *, xentoollog_logger *, logger, @@ -94,6 +102,9 @@ VIR_MOCK_STUB_RET_ARGS(xc_sharing_used_frames, VIR_MOCK_STUB_VOID_ARGS(xs_daemon_close, struct xs_handle *, handle) =20 +VIR_MOCK_STUB_VOID_ARGS(xs_close, + struct xs_handle *, xsh) + VIR_MOCK_STUB_RET_ARGS(bind, int, 0, int, sockfd, --=20 2.31.1