Our nightly test begins to upgrade xm-test to latest version, and we found that Xm-test could not run in arch x86_64 now because there is no x86_64 xm-test image by now. This patch can remove the limit of arch check and make xm-test run i386 image in x86_64 platform. Comment is welcome. Ping _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Wed, Nov 01, 2006 at 04:26:32PM +0800, Yu, Ping Y wrote:> Our nightly test begins to upgrade xm-test to latest version, and we > found that > Xm-test could not run in arch x86_64 now because there is no x86_64 > xm-test > image by now. > This patch can remove the limit of arch check and make xm-test run i386 > image > in x86_64 platform. > > Comment is welcome. > > PingContent-Description: xm-test_x86_64.patch> diff -r b3d94f4ddffe tools/xm-test/lib/XmTestReport/arch.py > --- a/tools/xm-test/lib/XmTestReport/arch.py Sat Oct 28 11:30:38 2006 > +++ b/tools/xm-test/lib/XmTestReport/arch.py Wed Nov 1 10:07:20 2006 > @@ -28,6 +28,7 @@ > "i486" : "x86", > "i586" : "x86", > "i686" : "x86", > + "x86_64" : "x86_64", > "ia64" : "ia64", > "ppc" : "powerpc", > "ppc64" : "powerpc", > @@ -35,6 +36,9 @@ > > _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown") > if _arch == "x86": > + cpuValues = {"model_name" : "Unknown", > + "flags" : "Unknown"} > +elif _arch == "x86_64": > cpuValues = {"model_name" : "Unknown", > "flags" : "Unknown"} > elif _arch == "ia64":Stefan Berger has already submitted these fixes -- I''m applying them right now.> diff -r b3d94f4ddffe tools/xm-test/runtest.sh > --- a/tools/xm-test/runtest.sh Sat Oct 28 11:30:38 2006 > +++ b/tools/xm-test/runtest.sh Wed Nov 1 10:07:20 2006 > @@ -78,7 +78,13 @@ > eval $(./lib/XmTestReport/xmtest.py) > ARCH=$(uname -m | sed -e s/i.86/i386/ -e ''s/ppc\(64\)*/powerpc/'') > rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img" > - if [ "$realrd" != "$rrdver" ]; then > + exp_flag=0 > + realarch=`echo $realrd | awk -F- ''{print $3}'' | awk -F. ''{print $1}''` > + rrdarch=`echo $rrdver | awk -F- ''{print $3}'' | awk -F. ''{print $1}''` > + if [ "$realarch" = "i386" -a "$rrdarch" = "x86_64" ]; then > + exp_flag=1 > + fi > + if [ $exp_flag -eq 0 -a "$realrd" != "$rrdver" ]; then > echo "Error: ramdisk/initrd.img is from an old version, or is not for this " > echo "architecture ($ARCH)." > echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"I see from this that you''re just using the i386 ramdisk on x86_64 as well. Stefan also has an RFC out for making a real x86_64 ramdisk, so perhaps you might be interested in that thread, entitled "enable building of xm-test suite'' buildroot environment on x86-64". For now, I''ll take your patch to use the 32-bit ramdisk, and we can see about getting a proper 64-bit one built afterwards. Thanks, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> >Content-Description: xm-test_x86_64.patch >> diff -r b3d94f4ddffe tools/xm-test/lib/XmTestReport/arch.py >> --- a/tools/xm-test/lib/XmTestReport/arch.py Sat Oct 28 11:30:38 2006 >> +++ b/tools/xm-test/lib/XmTestReport/arch.py Wed Nov 1 10:07:20 2006 >> @@ -28,6 +28,7 @@ >> "i486" : "x86", >> "i586" : "x86", >> "i686" : "x86", >> + "x86_64" : "x86_64", >> "ia64" : "ia64", >> "ppc" : "powerpc", >> "ppc64" : "powerpc", >> @@ -35,6 +36,9 @@ >> >> _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown") >> if _arch == "x86": >> + cpuValues = {"model_name" : "Unknown", >> + "flags" : "Unknown"} >> +elif _arch == "x86_64": >> cpuValues = {"model_name" : "Unknown", >> "flags" : "Unknown"} >> elif _arch == "ia64": > >Stefan Berger has already submitted these fixes -- I''m applying themright now.> >> diff -r b3d94f4ddffe tools/xm-test/runtest.sh >> --- a/tools/xm-test/runtest.sh Sat Oct 28 11:30:38 2006 >> +++ b/tools/xm-test/runtest.sh Wed Nov 1 10:07:20 2006 >> @@ -78,7 +78,13 @@ >> eval $(./lib/XmTestReport/xmtest.py) >> ARCH=$(uname -m | sed -e s/i.86/i386/ -e''s/ppc\(64\)*/powerpc/'')>> rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img" >> - if [ "$realrd" != "$rrdver" ]; then >> + exp_flag=0 >> + realarch=`echo $realrd | awk -F- ''{print $3}'' | awk -F. ''{print$1}''`>> + rrdarch=`echo $rrdver | awk -F- ''{print $3}'' | awk -F. ''{print$1}''`>> + if [ "$realarch" = "i386" -a "$rrdarch" = "x86_64" ]; then >> + exp_flag=1 >> + fi >> + if [ $exp_flag -eq 0 -a "$realrd" != "$rrdver" ]; then >> echo "Error: ramdisk/initrd.img is from an old version, or isnot for this ">> echo "architecture ($ARCH)." >> echo "You need to build a ramdisk from at least${XM_TEST_MAJ}.${XM_TEST_MIN}"> >I see from this that you''re just using the i386 ramdisk on x86_64 aswell.>Stefan also has an RFC out for making a real x86_64 ramdisk, so perhapsyou>might be interested in that thread, entitled "enable building ofxm-test>suite'' buildroot environment on x86-64". > >For now, I''ll take your patch to use the 32-bit ramdisk, and we can seeabout>getting a proper 64-bit one built afterwards.Thanks your comments. For 64-bits platform, both 32 bits and 64 bits ramdisk should be supported, so this patch will work even 64 bits ramdisk is available.> >Thanks, > >Ewan._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel