DragonFly BSD
DragonFly users List (threaded) for 2010-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ltp can't find /proc/cpuinfo


From: Oliver Fromme <check+kx67eq00rs9a8ofn@xxxxxxxxxx>
Date: 01 Feb 2010 17:07:28 GMT

Pierre Abbat wrote:
 > Oliver Fromme wrote:
 > > Pierre Abbat wrote:
 > > > I ran runalltests.sh and got the attached output. /proc/cpuinfo does
 > > > not exist, but /compat/linux/proc/cpuinfo does. How do I run ltp so
 > > > that it finds it?
 > >
 > > Run it with /compat/linux/bin/bash.
 > 
 > Now it reports proper cpuinfo (except that the bogomips number is the same as 
 > the megahertz number - judging from my Linux box, it should be twice the MHz, 
 > and judging by how fast programs run, it should be four times the MHz, which 
 > is six times the Linux box's bogomips),

Just ignore it.  The "bogomips" value is bogus, as the name
suggests.  It's the result of a very simple timer calibration
loop in the Linux kernel.  The BSDs don't have the same loop,
so they don't know the bogomips value.

 > but I get these errors:

Most of these are probably caused by tools that don't exist
under /compat/linux, so the BSD variant is used, which might
behave differently from the Linux/GNU version.

 > modutils               found
 > PPP                    2.3
 > ELF binary type "0" not known.
 > ELF binary type "0" not known.
 > ldd: /lib/ld-linux.so.2 exited with unknown exit code (134)

That's probably SIGABRT.  Looks like a non-Linux-ELF file was
executed with the Linux linker.

 > awk: trying to access out of range field -1
 > input record number 1, file
 > source line number 2

The Linuxulator doesn't have an awk binary, so the DragonFly
binary was used, which is the so-called "one true awk", which
is missing a lot of features that GNU awk has.  So I'm not
surprised that LTP fails here.

You could try to install GNU awk (gawk) and make LTP use it.

 > Dynamic linker (ldd)   2.3.5
 > 
 > free reports:
 > /usr/local/ver_linux: line 85: free: command not found
 > 
 > remove test cases which require the block device.
 > You can specify it with option -b
 > sed: 1: "/tmp/ltp-UvH5JWo2xg/all ...": extra characters at the end of l 
 > command
 > FATAL: error during prcessing alltests file by sed
 > 
 > It looks like ltp is expecting GNU sed.

Probably.

 > If I run "which bash" in Linux bash, it says "/usr/pkg/bin/bash",
 > but if I run  bash, it's Linux bash. (The version number is
 > different.) If I run /usr/pkg/bin/bash, I get DFly bash. How come?

The "which" command (whether shell-builtin or /usr/bin/which
doesn't matter) simply looks at the PATH environment variable:
It opens every directory, one after another, and looks for
the binary.  It is first found in /usr/pkg/bin.  Note that
the linuxulator doesn't redirect the directory because
/compat/linux/usr/pkg/bin doesn't exist.  So the "which"
command prints /usr/pkg/bin/bash.  The same happens when
you type "/usr/pkg/bin/bash" because this path doesn't exist
under /compat/linux, so you'll get the DFly bash.

However, when you only type "bash" at the Linux bash prompt,
it simply forks a subshell of itself, so you get the Linux
bash again.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd



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