ATF-devel archive

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

Re: ATF arch/machine vs. OS arch/machine



On Fri, Jul 9, 2010 at 6:01 PM, Nicolas Joly <njoly%pasteur.fr@localhost> wrote:
>
> Hi,
>
> While looking into ATF meta-data properties, especially require.arch
> and require.machine, i noticed that atf-config(1) and uname(1) show
> inverted values for arch and machine on my NetBSD/amd64 workstation.
>
> njoly@lanfeust [~]> atf-config -t atf_machine
> x86_64
> njoly@lanfeust [~]> uname -m
> amd64
>
> njoly@lanfeust [~]> atf-config -t atf_arch
> amd64
> njoly@lanfeust [~]> uname -p
> x86_64
>
> This comes from the following configure.ac code:
[...]

Did you install from the atf distfile or are you running atf-config
from NetBSD?  If the latter, the values do not come from configure.
Take a look at src/external/bsd/atf/lib/libatf-c/Makefile -- I believe
the values passed to ATF_{ARCH,MACHINE} are flipped.

> I fear there is no good solution for this problem, as it may vary for
> about every OS (example below); but i find this particular case very
> confusing.
[...]

Yeah... indeed.  Antti and I recently had a similar discussion
regarding these variables and how confusing they are.  First of all,
the names they have are probably not representative enough (they match
NetBSD's naming, but not uname's for example).  Given that atf
attempts to be platform independent, that's an issue.

And second, as you mention, it's hard to come up with a naming scheme
that works across systems.  I guess atf could try to forcibly convert
some foreign names into "known" ones and we just pick, e.g. NetBSD's
platform naming scheme as the canonical one.  (This is what the
incomplete snippet in configure.ac was about.)

Any ideas on how to improve this will be appreciated!

-- 
Julio Merino


Home | Main Index | Thread Index | Old Index