Bug 714064

Summary: libvirt can't be rebuild in mock
Product: [Community] Virtualization Tools Reporter: Levente Farkas <lfarkas>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: crobinso, cwei, dyuan, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-23 12:42:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Levente Farkas 2011-06-17 09:42:40 UTC
while try to rebuild libvirt-0.8.7-18.el6.src.rpm it fail since during the check commandtest failed in mock:
--------------------------
TEST: commandtest
      ..!!.!!!!!!!!!!!...                      19  FAIL
FAIL: commandtest
--------------------------


anyway during the test this warning also would be useful to fix (very simple):
-------------------------------------------
  CC     hashtest.o
hashtest.c: In function 'testHashRemoveForEach':
hashtest.c:115: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'unsigned int' [-Wformat]

-------------------------------------------

Comment 2 Levente Farkas 2011-06-17 11:18:43 UTC
what's more it's not so simple to add like this
---------------------------
%check
cd tests
# The following test doesn't currently work in a mock build root
for i in daemon-conf command
do
  rm -f $i
  printf "#!/bin/sh\nexit 0\n" > $i
  chmod +x $i
done
make check
---------------------------
since commandtest is not a shell script, but compiled during the 
make check:-(

Comment 3 Levente Farkas 2011-06-17 11:52:08 UTC
the x86_64 build failed even with rpmbuild in another test:
----------------------------------
TEST: qemuxml2argvtest
      ........................................ 40 
      ........................................ 80 
      ........................................ 120
      ..!.!!!!!..                              131 FAIL
FAIL: qemuxml2argvtest
----------------------------------
it'd be nice in case of fail to dump some kind of detailed info about the fail...

Comment 5 Daniel Veillard 2011-06-21 00:57:36 UTC
Hi Levente,

agreed we should try to fix this, I'm wondering if there is a way
to detect that we are within a mock buildroot to minimize the impact,

any idea ?

Daniel

Comment 6 Levente Farkas 2011-06-21 16:24:20 UTC
try to check /dev/pts/0 or /dev/tty0. if it's not exist than it's probably mock.

Comment 9 Dave Allan 2012-02-07 15:38:36 UTC
Levente, if this is still a problem for you, can you submit a patch upstream to fix it?

Comment 10 Levente Farkas 2012-02-07 15:54:19 UTC
imho it's fixed in 6.2 but not in 5.7.
i simple remove virshtest from this line in the spec:

for i in nodeinfotest daemon-conf seclabeltest virshtest

Comment 11 Cole Robinson 2016-03-23 12:42:30 UTC
Libvirt has been buildable in mock for a long while, so closing