I have encountered a bug when running a certain script.
The following is the simplest script I can make that
triggers the bug:
1) create a cpio archive:
gzip -dc /boot/initrd >initrd.cpio
2) run this script:
if cpio --quiet -t &2 ; else echo false-$? >&2 ; fi | grep libz
The output is:
lib64/libz.so.1.2.7
lib64/libz.so.1
true-0
But if I add the option -q to grep:
if cpio --quiet -t &2 ; else echo false-$? >&2 ; fi | grep -q libz
the output is:
false-141
instead of the correct one:
true-0
This bug is present in opensuse 12.2, 12.1 and 11.4 and also CentOS 6 (if it matters)
opensuse 11.3 is bug free as well as CentOS 5.
I discovered the bug while running:
lsinitrd /boot/initrd | grep libz
whithout the -q option to grep the otuput is correct, when I add the option -q
the output is:
xz: /boot/initrd: File format not recognized
I have tested different version of cpio and grep but it doesn't make any difference.
I'm guessing it's a kernel bug or may be it is a compiler bug?
By the way, I hope someone is intrested and can hunt the bug.
Giacomo
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org