public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: scox@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Remove a random conflict message. Date: Thu, 15 Nov 2007 22:59:00 -0000 [thread overview] Message-ID: <20071115225922.17083.qmail@sourceware.org> (raw) The branch, master has been updated via ccaef1c5b11c27ff856ce48f943b69fee0340e55 (commit) via 7f3584d2eee7bc0dce00f03a8417af1c21de54f6 (commit) via cfedd37029c197405be175a3ce24a53731995681 (commit) from b88be9142254b4b1c5d5cd094137f52861ad9432 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit ccaef1c5b11c27ff856ce48f943b69fee0340e55 Author: Stan Cox <scox@redhat.com> Date: Thu Nov 15 17:56:47 2007 -0500 Remove a random conflict message. commit 7f3584d2eee7bc0dce00f03a8417af1c21de54f6 Merge: cfedd37029c197405be175a3ce24a53731995681 b88be9142254b4b1c5d5cd094137f52861ad9432 Author: Stan Cox <scox@redhat.com> Date: Thu Nov 15 17:51:56 2007 -0500 Merge branch 'master' of ssh://sources.redhat.com/git/frysk Conflicts: frysk-core/frysk/hpd/ChangeLog frysk-core/frysk/hpd/TestListCommand.java frysk-core/frysk/pkglibdir/ChangeLog commit cfedd37029c197405be175a3ce24a53731995681 Author: Stan Cox <scox@redhat.com> Date: Thu Nov 15 17:45:19 2007 -0500 Change TestListCommand to use an easier to verify test program. * TestListCommand.java (testListPC): Change to use funit-quicksort. * funit-quicksort.c: New. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/hpd/ChangeLog | 8 ++- frysk-core/frysk/hpd/TestListCommand.java | 100 +++++++++++++++------ frysk-core/frysk/pkglibdir/ChangeLog | 4 + frysk-core/frysk/pkglibdir/funit-quicksort.c | 125 ++++++++++++++++++++++++++ 4 files changed, 207 insertions(+), 30 deletions(-) create mode 100644 frysk-core/frysk/pkglibdir/funit-quicksort.c First 500 lines of diff: diff --git a/frysk-core/frysk/hpd/ChangeLog b/frysk-core/frysk/hpd/ChangeLog index 1e83b85..766529a 100644 --- a/frysk-core/frysk/hpd/ChangeLog +++ b/frysk-core/frysk/hpd/ChangeLog @@ -1,8 +1,14 @@ +2007-11-15 Stan Cox <scox@redhat.com> + * TestListCommand.java (testListPC): Change to use funit-quicksort. + (testListFunction): Likewise. + (testListReverse): Likewise. + (testListErrors): Likewise. + 2007-11-15 Andrew Cagney <cagney@redhat.com> * TestListCommand.java (testListPC()): Mark as unresolved, 5332. (testListFunction()): Mark as unresolved, 5333. - + 2007-11-14 Andrew Cagney <cagney@redhat.com> * ParameterizedCommand.java (complete(CLI,Input,int,List)): New. diff --git a/frysk-core/frysk/hpd/TestListCommand.java b/frysk-core/frysk/hpd/TestListCommand.java index 1c67c53..ae3fb49 100644 --- a/frysk-core/frysk/hpd/TestListCommand.java +++ b/frysk-core/frysk/hpd/TestListCommand.java @@ -51,51 +51,80 @@ public class TestListCommand extends TestLib { } public void testListPC() { - if (unresolved(5332)) - return; - e = HpdTestbed.run("hpd-c"); + e = HpdTestbed.run("funit-quicksort"); e.send("break main\n"); e.expect("breakpoint.*" + prompt); e.send("go\n"); e.expect("go.*\n" + prompt + "Breakpoint"); + // Matching the list expected output is a trial and error process + // as the matching tends to be greedy. e.send("list\n"); - e.expect(".*208.*int.*209.*int.*210.*int_21.*211.*int_21.*215.*int.*" + - "216.*main.*\\*.*218.*if.*219.*fprintf" + - ".*221.*int.*222.*int.*.*223.*return.*224.*"); + e.expect("114.*114"); + e.expect("115.*115.*printf"); + e.expect("116.*116.*return 1"); + e.expect("117.*117"); + e.expect("118.*118.*return 0"); + e.expect("119.*119"); + e.expect("120.*120"); + e.expect("121.*121"); + e.expect("122.*122.*main"); + e.expect("123.*123"); + e.expect("\\* 124.*124"); + e.expect("125.*125"); e.send("quit\n"); e.expect("quit.*\nQuitting..."); e.close(); } + + public void testListFunction() { - if (unresolved(5333)) - return; - e = HpdTestbed.run("hpd-c"); + e = HpdTestbed.run("funit-quicksort"); e.send("break main\n"); e.expect("breakpoint.*" + prompt); e.send("go\n"); e.expect("go.*\n" + prompt + "Breakpoint"); e.send("list\n"); e.expect(prompt); - e.send("list func_2\n"); - e.expect( - ".*158.*159.*typedef.*160.*static_class_t.*161.*enum.*" + - "162.*static_class_t.*163.*struct.*164.*asm.*165.*struct.*" + - "166.*asm.*167.*struct.*168.*struct.*169.*typedef.*" + - "170.*volatile.*171.*long.*172.*int.*173.*float.*174.*char.*" + - "175.*static_class_t.*176.*volatile.*177.*sportscar.*" + - prompt); + e.send("list quicksort\n"); + e.expect("81.*81"); + e.expect("82.*82.*int"); + e.expect("83.*83"); + e.expect("84.*84"); + e.expect("85.*85.*j ="); + e.expect("86.*86.*x ="); + e.expect("87.*87.*do"); + e.expect("88.*88"); + e.expect("89.*89"); + e.expect("90.*90.*while"); + e.expect("91.*91.*if"); + e.expect("92.*92"); + e.expect("93.*93.*w ="); + e.expect("94.*94"); + e.expect("95.*95.*a.j."); + e.expect("96.*96.*i ="); + e.expect("97.*97.*j ="); + e.expect("98.*98"); + e.expect("99.*99.*while"); + e.expect("100.*100.*if"); e.send("list -length 10\n"); - e.expect( - ".*178.*char.*179.*short.*180.*int.*181.*long.*182.*float.*" + - "183.*double.*184.*assign_long_arr.*185.*assign_int_arr.*"); + e.expect("101.*101.*quicksort..a,l,j"); + e.expect("102.*102.*if"); + e.expect("103.*103.*quicksort..a,i,r"); + e.expect("104.*104"); + e.expect("105.*105"); + e.expect("106.*106"); + e.expect("107.*107"); + e.expect("108.*108.*int"); + e.expect("109.*109"); + e.expect("110.*110"); e.send("quit\n"); e.expect("quit.*\nQuitting..."); e.close(); } public void testListReverse() { - e = HpdTestbed.run("hpd-c"); + e = HpdTestbed.run("funit-quicksort"); e.send("break main\n"); e.expect("breakpoint.*" + prompt); e.send("go\n"); @@ -103,17 +132,34 @@ public class TestListCommand extends TestLib { e.send("list\n"); e.expect(prompt); e.send("list -length -10\n"); - e.expect(".*198.*while.*202.*return.*205.*static.*206.*func_1.*207"); + e.expect("104.*104"); + e.expect("105.*105"); + e.expect("106.*106"); + e.expect("107.*107"); + e.expect("108.*108.*int"); + e.expect("109.*109.*quick "); + e.expect("110.*110"); + e.expect("111.*111.*init_array"); + e.expect("112.*112.*quicksort "); + e.expect("113.*113.*if"); e.send("list -length -10\n"); - e.expect(".*188.*sportscar.*190.*int_p.*191.*class_p.*192.*class_p.*" + - "193.*class_p.*194.*class_1.*196.*int_21.*197.*"); + e.expect("94.*94.*a.i. ="); + e.expect("95.*95.*a.j. ="); + e.expect("96.*96.*i ="); + e.expect("97.*97.*j ="); + e.expect("98.*98"); + e.expect("99.*99.*while"); + e.expect("100.*100.*if .l"); + e.expect("101.*101.*quicksort .a,l,j"); + e.expect("102.*102.*if .i"); + e.expect("103.*103.*quicksort .a,i,r"); e.send("quit\n"); e.expect("quit.*\nQuitting..."); e.close(); } public void testListErrors() { - e = HpdTestbed.run("hpd-c"); + e = HpdTestbed.run("funit-quicksort"); e.send("break main\n"); e.expect("breakpoint.*" + prompt); e.send("go\n"); @@ -127,7 +173,3 @@ public class TestListCommand extends TestLib { e.close(); } } - - - - diff --git a/frysk-core/frysk/pkglibdir/ChangeLog b/frysk-core/frysk/pkglibdir/ChangeLog index 4371841..607b5fb 100644 --- a/frysk-core/frysk/pkglibdir/ChangeLog +++ b/frysk-core/frysk/pkglibdir/ChangeLog @@ -1,3 +1,7 @@ +2007-11-15 Stan Cox <scox@redhat.com> + + * funit-quicksort.c: New. + 2007-11-15 Petr Machata <pmachata@redhat.com> * funit-fib-fork.c: When a child dies on signal, kills itself with diff --git a/frysk-core/frysk/pkglibdir/funit-quicksort.c b/frysk-core/frysk/pkglibdir/funit-quicksort.c new file mode 100644 index 0000000..287ee9f --- /dev/null +++ b/frysk-core/frysk/pkglibdir/funit-quicksort.c @@ -0,0 +1,125 @@ +/* 1 */ // This file is part of the program FRYSK. +/* 2 */ // +/* 3 */ // Copyright 2007 Red Hat Inc. +/* 4 */ // +/* 5 */ // FRYSK is free software; you can redistribute it and/or modify it +/* 6 */ // under the terms of the GNU General Public License as published by +/* 7 */ // the Free Software Foundation; version 2 of the License. +/* 8 */ // +/* 9 */ // FRYSK is distributed in the hope that it will be useful, but +/* 10 */ // WITHOUT ANY WARRANTY; without even the implied warranty of +/* 11 */ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +/* 12 */ // General Public License for more details. +/* 13 */ // +/* 14 */ // You should have received a copy of the GNU General Public License +/* 15 */ // along with FRYSK; if not, write to the Free Software Foundation, +/* 16 */ // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +/* 17 */ // +/* 18 */ // In addition, as a special exception, Red Hat, Inc. gives You the +/* 19 */ // additional right to link the code of FRYSK with code not covered +/* 20 */ // under the GNU General Public License ("Non-GPL Code") and to +/* 21 */ // distribute linked combinations including the two, subject to the +/* 22 */ // limitations in this paragraph. Non-GPL Code permitted under this +/* 23 */ // exception must only link to the code of FRYSK through those well +/* 24 */ // defined interfaces identified in the file named EXCEPTION found in +/* 25 */ // the source code files (the "Approved Interfaces"). The files of +/* 26 */ // Non-GPL Code may instantiate templates or use macros or inline +/* 27 */ // functions from the Approved Interfaces without causing the +/* 28 */ // resulting work to be covered by the GNU General Public +/* 29 */ // License. Only Red Hat, Inc. may make changes or additions to the +/* 30 */ // list of Approved Interfaces. You must obey the GNU General Public +/* 31 */ // License in all respects for all of the FRYSK code and other code +/* 32 */ // used in conjunction with FRYSK except the Non-GPL Code covered by +/* 33 */ // this exception. If you modify this file, you may extend this +/* 34 */ // exception to your version of the file, but you are not obligated to +/* 35 */ // do so. If you do not wish to provide this exception without +/* 36 */ // modification, you must delete this exception statement from your +/* 37 */ // version and license this file solely under the GPL without +/* 38 */ // exception. +/* 39 */ +# /* 40 */ include <sys/types.h> +# /* 41 */ include <stdio.h> +# /* 42 */ define element_count 256 +/* 43 */ +/* 44 */ int sortlist[element_count+1]; +/* 45 */ int seed; +/* 46 */ int biggest, littlest; +/* 47 */ int top; +/* 48 */ +/* 49 */ void +/* 50 */ init_rand () +/* 51 */ { +/* 52 */ seed = 74755; +/* 53 */ } +/* 54 */ +/* 55 */ int +/* 56 */ rand () +/* 57 */ { +/* 58 */ seed = (seed * 1309 + 13849) & 65535; +/* 59 */ return (seed); +/* 60 */ } +/* 61 */ +/* 62 */ void +/* 63 */ init_array () +/* 64 */ { +/* 65 */ int i, temp; +/* 66 */ init_rand (); +/* 67 */ biggest = 0; littlest = 0; +/* 68 */ for (i = 1; i <= element_count; i++) +/* 69 */ { +/* 70 */ temp = rand (); +/* 71 */ sortlist[i] = temp - (temp/100000)*100000 - 50000; +/* 72 */ if (sortlist[i] > biggest) biggest = sortlist[i]; +/* 73 */ else if (sortlist[i] < littlest) littlest = sortlist[i]; +/* 74 */ } +/* 75 */ } +/* 76 */ +/* 77 */ /* quicksort the array A from start to finish */ +/* 78 */ +/* 79 */ void +/* 80 */ quicksort (a,l,r) int a[], l, r; +/* 81 */ { +/* 82 */ int i,j,x,w; +/* 83 */ +/* 84 */ i = l; +/* 85 */ j = r; +/* 86 */ x = a[(l+r) / 2]; +/* 87 */ do +/* 88 */ { +/* 89 */ while (a[i] < x) i = i+1; +/* 90 */ while (x < a[j]) j = j-1; +/* 91 */ if (i <= j) +/* 92 */ { +/* 93 */ w = a[i]; +/* 94 */ a[i] = a[j]; +/* 95 */ a[j] = w; +/* 96 */ i = i+1; +/* 97 */ j = j-1; +/* 98 */ } +/* 99 */ } while (i <= j); +/* 100 */ if (l < j) +/* 101 */ quicksort (a,l,j); +/* 102 */ if (i < r) +/* 103 */ quicksort (a,i,r); +/* 104 */ } +/* 105 */ +/* 106 */ /* setup an array, quicksort the array, validate the quicksort */ +/* 107 */ +/* 108 */ int +/* 109 */ quick () +/* 110 */ { +/* 111 */ init_array (); +/* 112 */ quicksort (sortlist, 1, element_count); +/* 113 */ if ((sortlist[1] != littlest) || (sortlist[element_count] != biggest)) +/* 114 */ { +/* 115 */ printf (" Error in quicksort.\n"); +/* 116 */ return 1; +/* 117 */ } +/* 118 */ return 0; +/* 119 */ } +/* 120 */ +/* 121 */ int +/* 122 */ main() +/* 123 */ { +/* 124 */ return quick(); +/* 125 */ } hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2007-11-15 22:59 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20071115225922.17083.qmail@sourceware.org \ --to=scox@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).