From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23747 invoked by alias); 28 Dec 2007 20:56:18 -0000 Received: (qmail 23717 invoked by uid 367); 28 Dec 2007 20:56:16 -0000 Date: Fri, 28 Dec 2007 20:56:00 -0000 Message-ID: <20071228205616.23702.qmail@sourceware.org> From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Sort unresolved test results. X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 538aac5c9ea9ce0bef2147a4088259a2b9d316ae X-Git-Newrev: cb8bb46ddd11fa1b1521e2bdd4349172c36a23e6 Mailing-List: contact frysk-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-cvs-owner@sourceware.org Reply-To: frysk@sourceware.org X-SW-Source: 2007-q4/txt/msg00635.txt.bz2 The branch, master has been updated via cb8bb46ddd11fa1b1521e2bdd4349172c36a23e6 (commit) via f9ffab0d6d6a383b62fc0325939c67ada5240f34 (commit) via e9596a3b32f19aeb87b2172c3887da3aade3d053 (commit) from 538aac5c9ea9ce0bef2147a4088259a2b9d316ae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit cb8bb46ddd11fa1b1521e2bdd4349172c36a23e6 Author: Andrew Cagney Date: Fri Dec 28 15:56:00 2007 -0500 Sort unresolved test results. frysk-sys/frysk/junit/ChangeLog 2007-12-28 Andrew Cagney * Result.java (Problem.compareTo(Object)): New. * Results.java: Replace HashSet with TreeSet. commit f9ffab0d6d6a383b62fc0325939c67ada5240f34 Author: Andrew Cagney Date: Fri Dec 28 15:34:47 2007 -0500 Add TestCase.skip32on64() method. frysk-core/frysk/proc/ChangeLog 2007-12-28 Andrew Cagney * TestIsa.java (test64To32To64()): Use skip32on64(). frysk-sys/frysk/junit/ChangeLog 2007-12-28 Andrew Cagney * Result.java (unresolved(String)): Replace unresolved(int). (pass(String)): Replace pass(int). (Problem(String[],String)): Replace Problem(String[],int). * Runner.java (unresolved(String,boolean)): New. (unresolved(int)): Use. * Results.java (addUnresolved(String)): Replace addUnresolved(int). (addResolved(String)): Replace addResolved(int). * TestCase.java (skip32on64()): New. commit e9596a3b32f19aeb87b2172c3887da3aade3d053 Author: Andrew Cagney Date: Fri Dec 28 15:00:38 2007 -0500 Include 32-on-64 tests by default; --arch overrides this. frysk-common/ChangeLog 2007-12-28 Andrew Cagney * TestRunner.java-in: Pass native, 32- and 64-bit configs to Runner. frysk-gui/frysk/pkglibdir/ChangeLog 2007-12-28 Andrew Cagney * funit.java: Pass all possible Config's to Runner. frysk-sys/frysk/ChangeLog 2007-12-28 Andrew Cagney * cni/Config.cxx-in (Config::createInstall32On64Config): Delete. (Config::createBuild32On64Config): Delete. (Config::createInstallConfig): When 64-bit, set 32- and 64- bit paths. (Config::createBuildConfig): Ditto. * Config.java (createBuild32On64Config(String,String)): Delete. (createInstall32On64Config()): Delete. * TestConfig.java (testInstall32On64Dirs()): Delete. (testBuild32On64Dirs()): Delete. (testInstallDirs(), testBuildDirs()): Update. frysk-sys/frysk/junit/ChangeLog 2007-12-28 Andrew Cagney * Runner.java (Runner(String,String[],Config,Config,Config)): Replace Runner(String,String[]). (ARCH32, ARCH64): Delete. (runArch32Cases(Collection)): Delete. (runTestCases(Collection)): Replace runTestCases(Collection,Config,Collection,Config). (runArchCases(Collection)): Delete. ----------------------------------------------------------------------- Summary of changes: frysk-common/ChangeLog | 5 + frysk-common/TestRunner.java-in | 11 ++- frysk-core/frysk/proc/ChangeLog | 2 + frysk-core/frysk/proc/TestIsa.java | 9 +-- frysk-gui/frysk/pkglibdir/ChangeLog | 4 + frysk-gui/frysk/pkglibdir/funit.java | 24 +++--- frysk-sys/frysk/ChangeLog | 12 +++ frysk-sys/frysk/Config.java | 36 +++------ frysk-sys/frysk/TestConfig.java | 63 +++++++-------- frysk-sys/frysk/cni/Config.cxx-in | 45 +++++------ frysk-sys/frysk/junit/ChangeLog | 22 +++++ frysk-sys/frysk/junit/Result.java | 23 ++--- frysk-sys/frysk/junit/Results.java | 14 ++-- frysk-sys/frysk/junit/Runner.java | 150 +++++++++++---------------------- frysk-sys/frysk/junit/TestCase.java | 18 ++++ 15 files changed, 209 insertions(+), 229 deletions(-) First 500 lines of diff: diff --git a/frysk-common/ChangeLog b/frysk-common/ChangeLog index 3391c74..8122a80 100644 --- a/frysk-common/ChangeLog +++ b/frysk-common/ChangeLog @@ -1,3 +1,8 @@ +2007-12-28 Andrew Cagney + + * TestRunner.java-in: Pass native, 32- and 64-bit configs to + Runner. + 2007-12-07 Andrew Cagney * mkenum.sh (map): Construct the String to Enum table using the diff --git a/frysk-common/TestRunner.java-in b/frysk-common/TestRunner.java-in index e0ca636..9181874 100755 --- a/frysk-common/TestRunner.java-in +++ b/frysk-common/TestRunner.java-in @@ -54,12 +54,13 @@ public class TestRunner String ABS_BUILDDIR = "@abs_builddir@"; String ABS_SRCDIR = "@abs_srcdir@"; - Config config = Config.createBuildConfig (ABS_SRCDIR, ABS_BUILDDIR); - Config config32 = Config.createBuild32On64Config (ABS_SRCDIR, ABS_BUILDDIR); + Config configAll = Config.createBuildConfig(ABS_SRCDIR, ABS_BUILDDIR); + Config config32 = Config.createBuildConfig32(ABS_SRCDIR, ABS_BUILDDIR); + Config config64 = Config.createBuildConfig64(ABS_SRCDIR, ABS_BUILDDIR); - Runner testRunner = new Runner ("TestRunner", args); - int status = testRunner.runTestCases (JUnitTests.get (), config, - JUnitTests.get (), config32); + Runner testRunner = new Runner("TestRunner", args, + configAll, config32, config64); + int status = testRunner.runTestCases(JUnitTests.get()); System.exit (status); } } diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog index cd9abdc..5aa3bc6 100644 --- a/frysk-core/frysk/proc/ChangeLog +++ b/frysk-core/frysk/proc/ChangeLog @@ -1,5 +1,7 @@ 2007-12-28 Andrew Cagney + * TestIsa.java (test64To32To64()): Use skip32on64(). + * TestTaskSyscallObserver.java (SyscallInterruptObserver): In updateSyscallEnter call super. diff --git a/frysk-core/frysk/proc/TestIsa.java b/frysk-core/frysk/proc/TestIsa.java index 3d6b5fb..4eab6f2 100644 --- a/frysk-core/frysk/proc/TestIsa.java +++ b/frysk-core/frysk/proc/TestIsa.java @@ -43,8 +43,6 @@ import java.util.Observable; import lib.dwfl.ElfEMachine; import frysk.testbed.TestLib; import frysk.testbed.TaskObserverBase; -import java.io.File; -import frysk.Config; import frysk.testbed.ExecOffspring; import frysk.testbed.SlaveOffspring; import frysk.testbed.ExecCommand; @@ -260,11 +258,8 @@ public class TestIsa } - public void test64To32To64 () - { - File exec32 = Config.getPkgLib32File(null); - File exec64 = Config.getPkgLib64File(null); - if (unsupported ("32-on-64", exec32 == null && exec64 == null)) + public void test64To32To64 () { + if (skip32on64()) return; ExecCommand invoke64 = new ExecCommand(ExecCommand.Executable.BIT64); diff --git a/frysk-gui/frysk/pkglibdir/ChangeLog b/frysk-gui/frysk/pkglibdir/ChangeLog index 72dc820..7471d45 100644 --- a/frysk-gui/frysk/pkglibdir/ChangeLog +++ b/frysk-gui/frysk/pkglibdir/ChangeLog @@ -1,3 +1,7 @@ +2007-12-28 Andrew Cagney + + * funit.java: Pass all possible Config's to Runner. + 2007-07-17 Andrew Cagney Move CNI code from frysk-imports/ to frysk-sys/ diff --git a/frysk-gui/frysk/pkglibdir/funit.java b/frysk-gui/frysk/pkglibdir/funit.java index 56aa635..f6d5d86 100755 --- a/frysk-gui/frysk/pkglibdir/funit.java +++ b/frysk-gui/frysk/pkglibdir/funit.java @@ -50,22 +50,20 @@ import java.util.LinkedList; public class funit { - public static void main (String[] args) - { - Runner testRunner = new Runner ("funit", args); + public static void main (String[] args) { + Config configAll = Config.createInstallConfig(); + Config config32 = Config.createInstallConfig32(); + Config config64 = Config.createInstallConfig64(); + Runner testRunner = new Runner("funit", args, configAll, + config32, config64); LinkedList tests = new LinkedList (); - tests.addAll (frysk.sys.JUnitTests.get ()); - tests.addAll (frysk.core.JUnitTests.get ()); - Config config = Config.createInstallConfig (); - - // It's unnecessary for other modules(such as frysk-import) to - // do arch32 test, so just add the frysk-core's JUnitTests. - LinkedList tests32 = new LinkedList(); - tests32.addAll (frysk.core.JUnitTests.get ()); - Config config32 = Config.createInstallConfig (); + tests.addAll(frysk.sys.JUnitTests.get()); + tests.addAll(frysk.core.JUnitTests.get()); + // tests.addAll(frysk.gtk.JunitTests.get()); + // tests.addAll(frysk.gui.JunitTests.get()); - int status = testRunner.runTestCases (tests, config, tests32, config32); + int status = testRunner.runTestCases(tests); System.exit (status); } } diff --git a/frysk-sys/frysk/ChangeLog b/frysk-sys/frysk/ChangeLog index 2e094d8..d81f20e 100644 --- a/frysk-sys/frysk/ChangeLog +++ b/frysk-sys/frysk/ChangeLog @@ -1,3 +1,15 @@ +2007-12-28 Andrew Cagney + + * cni/Config.cxx-in (Config::createInstall32On64Config): Delete. + (Config::createBuild32On64Config): Delete. + (Config::createInstallConfig): When 64-bit, set 32- and 64- bit paths. + (Config::createBuildConfig): Ditto. + * Config.java (createBuild32On64Config(String,String)): Delete. + (createInstall32On64Config()): Delete. + * TestConfig.java (testInstall32On64Dirs()): Delete. + (testBuild32On64Dirs()): Delete. + (testInstallDirs(), testBuildDirs()): Update. + 2007-12-17 cagney * EventLogger.java (addConsoleOptions(Parser)): Add LogOption. diff --git a/frysk-sys/frysk/Config.java b/frysk-sys/frysk/Config.java index 81013e6..45af890 100644 --- a/frysk-sys/frysk/Config.java +++ b/frysk-sys/frysk/Config.java @@ -79,11 +79,10 @@ public class Config } /** - * Create the default install tree configuration. - * - * The 32-bit and 64-bit specific library paths are set to NULL. + * Create the "native" install tree configuration; all possible + * paths, including 32-on-64 when applicable, are defined. */ - public static native final Config createInstallConfig (); + public static native final Config createInstallConfig(); /** * Create a 32-bit specific install configuration; return NULL if @@ -98,37 +97,24 @@ public class Config public static native final Config createInstallConfig64(); /** - * Create the 32-bit install tree configuration (used when running - * 32-bit tests on a 64-bit install tree). - */ - public static native final Config createInstall32On64Config (); - - /** - * Create the standard build-tree configuration. - * - * The 32-bit and 64-bit specific library paths are set to NULL. + * Create the "native" build-tree configuration; all possible + * paths, including 32-on-64 when applicable, are enabled. */ - public static native final Config createBuildConfig (String absSrcDir, - String absBuildDir); + public static native final Config createBuildConfig(String absSrcDir, + String absBuildDir); /** * Create a 32-bit specific build-tree configuration; return NULL * if this is not supported by this build. */ - public static native final Config createBuildConfig32 (String absSrcDir, - String absBuildDir); + public static native final Config createBuildConfig32(String absSrcDir, + String absBuildDir); /** * Create a 64-bit specific build-tree configuration; return NULL * if this is not supported by this build. */ - public static native final Config createBuildConfig64 (String absSrcDir, - String absBuildDir); - - /** - * Create the 32-bit on 64-bit build-tree configuration. - */ - public static native final Config createBuild32On64Config (String absSrcDir, - String absBuildDir); + public static native final Config createBuildConfig64(String absSrcDir, + String absBuildDir); /** * Return either the file or directory. diff --git a/frysk-sys/frysk/TestConfig.java b/frysk-sys/frysk/TestConfig.java index 0bb86b9..bf87364 100644 --- a/frysk-sys/frysk/TestConfig.java +++ b/frysk-sys/frysk/TestConfig.java @@ -65,24 +65,23 @@ public class TestConfig Config.set (old); } - private void validate (boolean pure) - { + private void validate(boolean pure) { // The expected paths are valid. - assertNotNull ("getGladeDir", Config.getGladeDir ()); - assertNotNull ("getHelpDir", Config.getHelpDir ()); - assertNotNull ("getImagesDir", Config.getImagesDir ()); - assertNotNull ("getBinFile", Config.getBinFile (null)); - assertNotNull ("getPkgDataFile", Config.getPkgDataFile (null)); - assertNotNull ("getPkgLibFile", Config.getPkgLibFile (null)); + assertNotNull("getGladeDir", Config.getGladeDir ()); + assertNotNull("getHelpDir", Config.getHelpDir ()); + assertNotNull("getImagesDir", Config.getImagesDir ()); + assertNotNull("getBinFile", Config.getBinFile (null)); + assertNotNull("getPkgDataFile", Config.getPkgDataFile (null)); + assertNotNull("getPkgLibFile", Config.getPkgLibFile (null)); if (pure) { assertNull("getPkgLib32File", Config.getPkgLib32File(null)); assertNull("getPkgLib64File", Config.getPkgLib64File(null)); } else { assertNotNull("getPkgLib32File", Config.getPkgLib32File(null)); assertNotNull("getPkgLib64File", Config.getPkgLib64File(null)); - assertSame("getPkgLibFile is getPkgLib32File", - Config.getPkgLibFile(null), - Config.getPkgLib32File(null)); + assertEquals("getPkgLibFile is getPkgLib64File", + Config.getPkgLibFile(null), + Config.getPkgLib64File(null)); } } @@ -93,17 +92,16 @@ public class TestConfig public void testInstallDirs () { Config.set (Config.createInstallConfig ()); - validate (true); - } - - /** - * Perform basic validation on the 32-bit on 64-bit - * install-directory configuration. - */ - public void testInstall32On64Dirs () - { - Config.set (Config.createInstall32On64Config ()); - validate (false); + switch (Config.getWordSize()) { + case 32: + validate(true); + break; + case 64: + validate(false); + break; + default: + fail("unknown word size"); + } } /** @@ -113,17 +111,16 @@ public class TestConfig public void testBuildDirs () { Config.set (Config.createBuildConfig ("src-dir", "build-dir")); - validate (true); - } - - /** - * Perform basic validation of the 32-bit on 64-bit build-tree - * configuration. - */ - public void testBuild32On64Dirs () - { - Config.set (Config.createBuild32On64Config ("src-dir", "build-dir")); - validate (false); + switch (Config.getWordSize()) { + case 32: + validate(true); + break; + case 64: + validate(false); + break; + default: + fail("unknown word size"); + } } public void testBuild32() { diff --git a/frysk-sys/frysk/cni/Config.cxx-in b/frysk-sys/frysk/cni/Config.cxx-in index fbb2e04..23bd626 100644 --- a/frysk-sys/frysk/cni/Config.cxx-in +++ b/frysk-sys/frysk/cni/Config.cxx-in @@ -101,9 +101,17 @@ frysk::Config::createInstallConfig () config->theImagesDir = JvNewStringUTF ("@imagesdir@")->intern (); config->theBinDir = asFile ("@bindir@"); config->thePkgDataDir = asFile ("@pkgdatadir@"); - config->thePkgLib32Dir = NULL; - config->thePkgLib64Dir = NULL; config->thePkgLibDir = asFile ("@pkglibdir@"); + switch (sizeof(void*)) { + case 4: + config->thePkgLib32Dir = NULL; + config->thePkgLib64Dir = NULL; + break; + case 8: + config->thePkgLib32Dir = asFile ("@pkglib32dir@"); + config->thePkgLib64Dir = asFile ("@pkglib64dir@"); + break; + } return config; } @@ -153,16 +161,6 @@ frysk::Config::createInstallConfig64 () } frysk::Config* -frysk::Config::createInstall32On64Config () -{ - frysk::Config* config = createInstallConfig (); - config->thePkgLib32Dir = asFile ("@pkglib32dir@"); - config->thePkgLib64Dir = asFile ("@pkglib64dir@"); - config->thePkgLibDir = config->thePkgLib32Dir; - return config; -} - -frysk::Config* frysk::Config::createBuildConfig (jstring absSrcDir, jstring absBuildDir) { @@ -172,9 +170,17 @@ frysk::Config::createBuildConfig (jstring absSrcDir, config->theImagesDir = absSrcDir->concat (JvNewStringUTF ("/frysk/gui/imagesdir"))->intern (); config->theBinDir = asFile (absBuildDir, "/frysk/bindir/"); config->thePkgDataDir = asFile (absBuildDir, "/frysk/pkgdatadir/"); - config->thePkgLib32Dir = NULL; - config->thePkgLib64Dir = NULL; config->thePkgLibDir = asFile (absBuildDir, "/frysk/pkglibdir/"); + switch (sizeof(void*)) { + case 4: + config->thePkgLib32Dir = NULL; + config->thePkgLib64Dir = NULL; + break; + case 8: + config->thePkgLib32Dir = asFile (absBuildDir, "/frysk/pkglibdir/arch32/"); + config->thePkgLib64Dir = asFile (absBuildDir, "/frysk/pkglibdir/"); + break; + } return config; } @@ -227,14 +233,3 @@ frysk::Config::createBuildConfig64 (jstring absSrcDir, config->thePkgLib64Dir = NULL; return config; } - -frysk::Config* -frysk::Config::createBuild32On64Config (jstring absSrcDir, - jstring absBuildDir) -{ - frysk::Config* config = createBuildConfig (absSrcDir, absBuildDir); - config->thePkgLib32Dir = asFile (absBuildDir, "/frysk/pkglibdir/arch32/"); - config->thePkgLib64Dir = asFile (absBuildDir, "/frysk/pkglibdir/"); - config->thePkgLibDir = config->thePkgLib32Dir; - return config; -} diff --git a/frysk-sys/frysk/junit/ChangeLog b/frysk-sys/frysk/junit/ChangeLog index 37f2fb7..96d485c 100644 --- a/frysk-sys/frysk/junit/ChangeLog +++ b/frysk-sys/frysk/junit/ChangeLog @@ -1,3 +1,25 @@ +2007-12-28 Andrew Cagney + + * Result.java (Problem.compareTo(Object)): New. + * Results.java: Replace HashSet with TreeSet. + + * Result.java (unresolved(String)): Replace unresolved(int). + (pass(String)): Replace pass(int). + (Problem(String[],String)): Replace Problem(String[],int). + * Runner.java (unresolved(String,boolean)): New. + (unresolved(int)): Use. + * Results.java (addUnresolved(String)): Replace addUnresolved(int). + (addResolved(String)): Replace addResolved(int). + * TestCase.java (skip32on64()): New. + + * Runner.java (Runner(String,String[],Config,Config,Config)): + Replace Runner(String,String[]). + (ARCH32, ARCH64): Delete. + (runArch32Cases(Collection)): Delete. + (runTestCases(Collection)): Replace + runTestCases(Collection,Config,Collection,Config). + (runArchCases(Collection)): Delete. + 2007-11-28 Andrew Cagney * TestCase.java (unresolvedOnIA32(int)): New. diff --git a/frysk-sys/frysk/junit/Result.java b/frysk-sys/frysk/junit/Result.java index 93d9ee8..84b80c3 100644 --- a/frysk-sys/frysk/junit/Result.java +++ b/frysk-sys/frysk/junit/Result.java @@ -43,13 +43,11 @@ package frysk.junit; * Possible results from running a test; see POSIX and dejagnu for * definition of states. */ -class Result -{ +class Result { /** POSIX: PASS. */ static final Result PASS = new Result("PASS"); /** POSIX: PASS (RESOLVED). */ - static final Problem pass(int bug) - { + static final Problem pass(String bug) { return new Problem(new String[] { "PASS", "UNRESOLVED" }, bug); } /** POSIX: FAIL. */ @@ -63,9 +61,8 @@ class Result return new Problem (what, unresolved, t); } /** POSIX: UNRESOLVED. */ - static Problem unresolved(int bug) - { - return new Problem (new String[] { "UNRESOLVED" }, bug); + static Problem unresolved(String bug) { + return new Problem(new String[] { "UNRESOLVED" }, bug); } /** POSIX: UNSUPPORTED. */ static final Problem unsupported (String why) @@ -110,19 +107,16 @@ class Result /** * A problem result. */ - static class Problem - extends Result - { + static class Problem extends Result implements Comparable { private final String[] reasons; private Problem(String what, String reason) { super(what); reasons = new String[] { reason }; } - private Problem(String[] whats, int bug) - { + private Problem(String[] whats, String bug) { super(whats); - reasons = new String[] { "http://sourceware.org/bugzilla/show_bug.cgi?id=" + bug }; + reasons = new String[] { bug }; } private Problem(String what, Problem unresolved, Throwable t) { @@ -155,5 +149,8 @@ class Result { return getReason().hashCode(); } + public int compareTo(Object o) { + return getReason().compareTo(((Problem)o).getReason()); + } } } diff --git a/frysk-sys/frysk/junit/Results.java b/frysk-sys/frysk/junit/Results.java index 15fe568..7d3685b 100644 --- a/frysk-sys/frysk/junit/Results.java +++ b/frysk-sys/frysk/junit/Results.java @@ -47,7 +47,7 @@ import junit.framework.Test; import junit.textui.ResultPrinter; import junit.framework.TestResult; import java.util.Set; -import java.util.HashSet; +import java.util.TreeSet; import java.util.Iterator; /** @@ -61,9 +61,9 @@ class Results private static final Logger logger = Logger.getLogger("frysk"); private static Result result; - private static final Set unresolved = new HashSet(); - private static final Set resolved = new HashSet(); - private static final Set unsupported = new HashSet(); + private static final Set unresolved = new TreeSet(); + private static final Set resolved = new TreeSet(); + private static final Set unsupported = new TreeSet(); public void startTest (Test test) hooks/post-receive -- frysk system monitor/debugger