From nobody Tue Apr 23 14:03:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562601813; cv=none; d=zoho.com; s=zohoarc; b=Mdet1gKtpFlVqOizPWMMqMZ8F9XImQYJd6YJ3GYwhi/gIUdPK4B2MUAGf2dTYNcW5wZv6MXap24jlhLowqAgj7ulbBMeVjHLgxRbBVZo1eRqrggzSOsfQo50iaW0mMgaKiwHpD7tgwgx5bdd+MDfYQvO5DmemB2MrH+b57v9iKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562601813; 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:ARC-Authentication-Results; bh=0cU3sbpgYqmBg9n39vPHYSrEfiPeIp1wBNrtw2CLI4U=; b=cZJ0+vLdJ484nkgTdwbtJrUm0xBAkZ/aBLh7SrDSJVpotQEUMrzatfpP6gVgkbH7gahQ2BkV9nnZS9M9THKlgnH83hH/OcjPmlc5PAVd5XnNjgSloTrr3kO4JwIIiJ7gP9Nd61Qyh7G/e4p2Zs9HGLgDFafsR/Rothp1FzeAcgU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562601813617471.7769985452244; Mon, 8 Jul 2019 09:03:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72CE375724; Mon, 8 Jul 2019 16:03:28 +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 4F23B5C25D; Mon, 8 Jul 2019 16:03:24 +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 22E8F18363C1; Mon, 8 Jul 2019 16:03:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x68G3FQX017902 for ; Mon, 8 Jul 2019 12:03:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 00A3F5D9E5; Mon, 8 Jul 2019 16:03:15 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7DE175D9C8 for ; Mon, 8 Jul 2019 16:03:12 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 8 Jul 2019 18:03:10 +0200 Message-Id: <20190708160310.12376-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: Add getuid() to virnetdevbandwidthmock 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 08 Jul 2019 16:03:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When only geteuid() is mocked, the test crashes on Debian 10. Fatal: failed to reset uid: No such file or directory Program received signal SIGABRT, Aborted. __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) t a a bt Thread 1 (Thread 0x7ffff3b3e080 (LWP 12003)): #0 __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.= c:50 #1 0x00007ffff7798535 in __GI_abort () at abort.c:79 #2 0x00007ffff485ca20 in _gcry_logv (level=3Dlevel@entry=3D40, fmt=3Dfmt= @entry=3D0x7ffff4929126 "failed to reset uid: %s\n", arg_ptr=3Darg_ptr@entr= y=3D0x7fffffffe4a0) at ../../src/misc.c:142 #3 0x00007ffff485cd61 in _gcry_log_fatal (fmt=3Dfmt@entry=3D0x7ffff49291= 26 "failed to reset uid: %s\n") at ../../src/misc.c:218 #4 0x00007ffff48639d1 in lock_pool_pages (n=3D, p=3D) at ../../src/secmem.c:340 #5 _gcry_secmem_init_internal (n=3D) at ../../src/secmem.= c:563 #6 0x00007ffff4863d78 in _gcry_secmem_init (n=3D4096) at ../../src/secme= m.c:581 #7 0x00007ffff485e4e6 in _gcry_vcontrol (cmd=3D, arg_ptr= =3Darg_ptr@entry=3D0x7fffffffe5e0) at ../../src/global.c:506 #8 0x00007ffff485a789 in gcry_control (cmd=3Dcmd@entry=3DGCRYCTL_INIT_SE= CMEM) at ../../src/visibility.c:79 #9 0x00007ffff71af10f in ssh_crypto_init () at ./src/libgcrypt.c:621 #10 0x00007ffff7193796 in _ssh_init (constructor=3Dconstructor@entry=3D1)= at ./src/init.c:79 #11 0x00007ffff71834de in libssh_constructor () at ./src/init.c:116 #12 0x00007ffff7fe437a in call_init (l=3D, argc=3Dargc@ent= ry=3D1, argv=3Dargv@entry=3D0x7fffffffe778, env=3Denv@entry=3D0x7fffffffe78= 8) at dl-init.c:72 #13 0x00007ffff7fe4476 in call_init (env=3D0x7fffffffe788, argv=3D0x7ffff= fffe778, argc=3D1, l=3D) at dl-init.c:30 #14 _dl_init (main_map=3D0x7ffff7ffe190, argc=3D1, argv=3D0x7fffffffe778,= env=3D0x7fffffffe788) at dl-init.c:119 #15 0x00007ffff7fd60ca in _dl_start_user () from /lib64/ld-linux-x86-64.s= o.2 #16 0x0000000000000001 in ?? () #17 0x00007fffffffea26 in ?? () #18 0x0000000000000000 in ?? () Signed-off-by: Andrea Bolognani --- tests/virnetdevbandwidthmock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/virnetdevbandwidthmock.c b/tests/virnetdevbandwidthmock.c index cb48933447..f0c6b22c5f 100644 --- a/tests/virnetdevbandwidthmock.c +++ b/tests/virnetdevbandwidthmock.c @@ -24,3 +24,8 @@ uid_t geteuid(void) { return 0; } + +uid_t getuid(void) +{ + return 0; +} --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list