Hi,
On Wed, 2009-03-04 at 10:33 +0100, Michal Simek wrote:
> Hi Jiri,
> >>> Also, the compiler really should set architecture spcific macros based
> >>> on the target.
> >> I don't know full LTP history but I think that is primary focus on x86
> >> where is target the same arch where is LTP compiled.
> >
> > Certainly not. Only RedHat-originated patches are i386+x86-64 only :)
> Thanks for explanation.
> >
> >> I believe that people tried to compile LTP on x86 for another arch.
> >> That's my case and I just trying to solve build problems which I have.
> >
> > Yes, but why would you make such invasive changes to the build & test
> > run system, for such a petty error? BTW the HT tests are integrated
> > since december, which is not that long.
> We talk about in this thread -> that was only proposal. I can imagine
> that will be possible to add to LTP (and I hope that Subrata will have
> no problem with it) Microblaze specific test(As exception test,
> unaligned test and others). HT tests are x86 specific I hope you agree
> with me in this point and these new will be only microblaze specific.
>
> If this happen all people will build Microblaze specific test and I
> will have to add any microblaze specific macro to source code.
> This bring to us that this these tests doesn't failed on their arch (of
> course if these tests will be in any runtest file) and will test my arch.
>
> It will work of course but I have doubts if this style of doing this is
> the right one - that's all.
>
> >>> Why would you need to add ifdefs? Does a simple s/ARCH_i386/__i386__/g
> >>> not work for you?
> >> I believe that this can work but there is still question why and I have
> >> no problem to have it there but...
> >> Please look at testcases/kernel/hyperthreading/ht_affinity/HTaffinity.c
> >> to lines 229-235.
> >> There is part of code for different arch -> Maybe I am missing something
> >> but I can't realize what can bring me this test.
> >
> > This will bring you a non-failure on other achitectures when you run
> > the tests with pan. Because we have no architecture-dependent
> > execution and no means to determine if a test was not run because it's
> > missing due to error in the Makefile etc. or because it's not for
> > this architecture, other than making a stub test and returning TCONF
> > which is not a failure. One may think "who cares?", but people do,
> > because automatic test result reporting tools like it that way.
> ok - As I wrote in last email at the end. I have no problem with your
> proposal solution. If is a reason for that to do this way I understand.
> >
> >> I see there -> wasting compilation time, wasting space on rootfs, log,
> >> website, wasting time for checking which test failed.
> >
> > Since it can't fail on non-i386, this is not a big deal. Moreover,
> > there are fast ways to determined what failed.
> ok. I haven't tested it.
> >
> >> I hear you that you think that everywhere is a lot of space and
> >> compilation time is no problem on current machine but every wasting is
> >> wrong.
> >
> > First, don't hear that I think what I don't say.
> Yes, you are right. Sorry for that.
>
> > Second, if you want to save substantial amount of disk space, you can
> > try making libltp a dynamic library. This should save several
> > megabytes in the testcases/bin directory.
> Thanks for it, I'll look at it - it could be helpful for me.
>
> BTW: You haven't answer me a question who will do a patch for it (your
> sed command). Below is patch for your proposal. If you agree with it
> I'll create proper patch for Subrata.
>
> Thanks,
> Michal
>
>
> diff --git a/testcases/kernel/sched/hyperthreading/Makefile
> b/testcases/kernel/sched/hyperthreading/Makefile
> index 9296e04..2e0d64a 100644
> --- a/testcases/kernel/sched/hyperthreading/Makefile
> +++ b/testcases/kernel/sched/hyperthreading/Makefile
> @@ -1,11 +1,3 @@
> -
> -OSV := $(shell uname -m|grep i[3-6]86)
> -ifeq (,$(OSV))
> -else
> -export CFLAGS+= -DARCH_i386
> -endif
> -
> -
> SUBDIRS = ht_enabled ht_affinity ht_interrupt
>
> all:
> diff --git
> a/testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c
> b/testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c
> index b0750c3..3f033e7 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c
> @@ -230,7 +230,7 @@ int main(int argc, char *argv[])
> {
> tst_resm(TINFO, "Begin: HyperThreading Affinity");
>
> -#ifndef ARCH_i386
> +#ifndef __i386__
> tst_brkm(TCONF, NULL, "This test suite can only excute on i386
> architecture.");
> #else
> if (!check_ht_capability())
> diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c
> b/testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c
> index 5e33114..5f37d1f 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c
> @@ -60,7 +60,7 @@ int is_ht_kernel()
>
> inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
> {
> -#ifndef ARCH_i386
> +#ifndef _i386__
> return;
> #else
> __asm__("cpuid"
> diff --git
> a/testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c
> b/testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c
> index e0ccaad..9f5ab8b 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c
> @@ -23,7 +23,7 @@ int main(int argc, char *argv[])
> {
> tst_resm(TINFO, "Begin: HyperThreading Enabled");
>
> -#ifndef ARCH_i386
> +#ifndef __i386__
> tst_brkm(TCONF, NULL, "This test suite can only excute on i386
> architecture.");
> #else
> if(is_cmdline_para("noht"))
> diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c
> b/testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c
> index 5e33114..9d6e1c0 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c
> @@ -60,7 +60,7 @@ int is_ht_kernel()
>
> inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
> {
> -#ifndef ARCH_i386
> +#ifndef __i386__
> return;
> #else
> __asm__("cpuid"
> diff --git
> a/testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c
> b/testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c
> index 0d04085..4207c6d 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c
> @@ -111,7 +111,7 @@ int main(int argc, char *argv[])
> {
> tst_resm(TINFO, "Begin: HyperThreading Interrupt");
>
> -#ifndef ARCH_i386
> +#ifndef __i386__
> tst_brkm(TCONF, NULL, "This test suite can only excute on i386
> architecture.");
> #else
> if (!check_ht_capability())
> diff --git
> a/testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c
> b/testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c
> index 5e33114..9d6e1c0 100644
> --- a/testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c
> +++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c
> @@ -60,7 +60,7 @@ int is_ht_kernel()
>
> inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
> {
> -#ifndef ARCH_i386
> +#ifndef __i386__
> return;
> #else
> __asm__("cpuid"
>
Thanks for this Patch. But, this seems not to apply:
patching file testcases/kernel/sched/hyperthreading/Makefile
patching file
testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c
Hunk #1 FAILED at 230.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_affinity/HTaffinity.c.rej
patching file
testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c
Hunk #1 FAILED at 60.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_affinity/HTutils.c.rej
patching file
testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c
Hunk #1 FAILED at 23.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_enabled/HTenabled.c.rej
patching file testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c
Hunk #1 FAILED at 60.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_enabled/HTutils.c.rej
patching file
testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c
Hunk #1 FAILED at 111.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_interrupt/HTinterrupt.c.rej
patching file
testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c
Hunk #1 FAILED at 60.
1 out of 1 hunk FAILED -- saving rejects to file
testcases/kernel/sched/hyperthreading/ht_interrupt/HTutils.c.rej
Regards--
Subrata
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list