Re: [PATCH] tests: Fix the build failure on s390

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/02/14 21:48, Jiri Denemark wrote:
On Mon, Feb 10, 2014 at 21:35:18 +0800, Osier Yang wrote:
The build works fine on other architectures with commit 0b4f76fc5, but
for s390:

TEST: virscsitest
  1) test1  ... OK
  2) test2  ... libvirt:  error : SCSI device '1:0:0:0': could not access
  /builddir/build/BUILD/libvirt-1.1.1/tests/virscsidata/sg8: No such file
  or directory
FAILED

It's caused by the "patch" on the s390 system either doesn't create
the "empty files", or removed them after the patch was applied. Anyway,
this patch is to fix it by simply adding useless numbers to the 2
test input files.
This is pretty strange. AFAIK no patch binary creates empty files
although git does that. If the build failed just because of that, it
should have failed on other archs too.

It's depended on the version of *patch*, for example, the attached
patch creates two files, file "aaa" is not empty, "bbb" is empty:

% cat aaa
Hello, World!

% cat bbb

*On Fedora 19:*

% patch -p1 < 0001-Funny-empty-files.patch
patching file aaa

% ls aaa bbb
ls: cannot access bbb: No such file or directory
aaa

% patch --version | head -1
patch 2.6.1

*On RHEL7.0:*

% patch -p1 < 0001-Funny-empty-files.patch
patching file aaa
patching file bbb

% ls aaa bbb
aaa  bbb

% patch --version | head -1
GNU patch 2.7.1

Note that on Fedora 19, the output of the patch command only says
"patching file aaa", for the empty file "bbb", nothing was happened, this
is what exactly I saw in the build.log from your scratch build (the failed
one, sorry for that, btw).

Osier


>From d9fda88c0d32484a349737d97926aeb34de40d81 Mon Sep 17 00:00:00 2001
From: Osier Yang <jyang@xxxxxxxxxx>
Date: Mon, 10 Feb 2014 07:16:04 -0700
Subject: [PATCH] Funny empty files

---
 aaa | 1 +
 bbb | 0
 2 files changed, 1 insertion(+)
 create mode 100644 aaa
 create mode 100644 bbb

diff --git a/aaa b/aaa
new file mode 100644
index 0000000..8ab686e
--- /dev/null
+++ b/aaa
@@ -0,0 +1 @@
+Hello, World!
diff --git a/bbb b/bbb
new file mode 100644
index 0000000..e69de29
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]