aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-10-29 18:20:22 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-10-29 18:20:22 +0000
commit1b7c05e765d98a058f2118f760f115d6f5157fff (patch)
treebec71b42474246635b79e1d7f292b0bd3030a965 /gdb/testsuite
parent36a222619ef7b34bae54ad4c186db5786c1dcbdf (diff)
downloadgdb-1b7c05e765d98a058f2118f760f115d6f5157fff.zip
gdb-1b7c05e765d98a058f2118f760f115d6f5157fff.tar.gz
gdb-1b7c05e765d98a058f2118f760f115d6f5157fff.tar.bz2
* gdb.base/call-ar-st.c (print_double_array): Match for loop
with new double_array size. (main): Change storage class of all local variables to static. Reduce size of double_array to 9. * gdb.base/call-ar-st.exp: Increase timeout value. Change expected output for double array to match new size in call-ar-st.c.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog10
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.c70
-rw-r--r--gdb/testsuite/gdb.base/call-ar-st.exp56
3 files changed, 53 insertions, 83 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index b6f392d..12b89f9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,15 @@
2001-10-29 Corinna Vinschen <vinschen@redhat.com>
+ * gdb.base/call-ar-st.c (print_double_array): Match for loop
+ with new double_array size.
+ (main): Change storage class of all local variables to static.
+ Reduce size of double_array to 9.
+ * gdb.base/call-ar-st.exp: Increase timeout value.
+ Change expected output for double array to match new size in
+ call-ar-st.c.
+
+2001-10-29 Corinna Vinschen <vinschen@redhat.com>
+
* gdb.base/ending-run.exp: Create identical output when passing
`step to end of run' case. Add regular expression branch satisfying
Stormy16 target.
diff --git a/gdb/testsuite/gdb.base/call-ar-st.c b/gdb/testsuite/gdb.base/call-ar-st.c
index 19a430c..d903f0d 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.c
+++ b/gdb/testsuite/gdb.base/call-ar-st.c
@@ -231,7 +231,7 @@ void print_double_array (array_d)
printf("array_d :\n");
printf("=========\n\n");
- for (index = 0; index < 100; index++) {
+ for (index = 0; index < 9; index++) {
printf("%f ", array_d[index]);
if ((index%8) == 0) printf("\n");
}
@@ -1147,48 +1147,48 @@ int main () {
/* variables for array and enumerated type testing
*/
- char char_array[121];
- double double_array[100];
- float float_array[15];
- int integer_array[50];
- int index;
- id_int student_id = 23;
- colors my_shirt = YELLOW;
+ static char char_array[121];
+ static double double_array[9];
+ static float float_array[15];
+ static int integer_array[50];
+ static int index;
+ static id_int student_id = 23;
+ static colors my_shirt = YELLOW;
/* variables for large structure testing
*/
- int number = 10;
- struct array_rep_info_t *list1;
- struct array_rep_info_t *list2;
- struct array_rep_info_t *list3;
- struct array_rep_info_t *list4;
+ static int number = 10;
+ static struct array_rep_info_t *list1;
+ static struct array_rep_info_t *list2;
+ static struct array_rep_info_t *list3;
+ static struct array_rep_info_t *list4;
/* variables for testing a very long argument list
*/
- double a;
- double b;
- int c;
- int d;
- int e;
- int f;
+ static double a;
+ static double b;
+ static int c;
+ static int d;
+ static int e;
+ static int f;
/* variables for testing a small structures and a very long argument list
*/
- struct small_rep_info_t *struct1;
- struct small_rep_info_t *struct2;
- struct small_rep_info_t *struct3;
- struct small_rep_info_t *struct4;
- struct bit_flags_t *flags;
- struct bit_flags_combo_t *flags_combo;
- struct three_char_t *three_char;
- struct five_char_t *five_char;
- struct int_char_combo_t *int_char_combo;
- struct one_double_t *d1;
- struct one_double_t *d2;
- struct one_double_t *d3;
- struct two_floats_t *f1;
- struct two_floats_t *f2;
- struct two_floats_t *f3;
+ static struct small_rep_info_t *struct1;
+ static struct small_rep_info_t *struct2;
+ static struct small_rep_info_t *struct3;
+ static struct small_rep_info_t *struct4;
+ static struct bit_flags_t *flags;
+ static struct bit_flags_combo_t *flags_combo;
+ static struct three_char_t *three_char;
+ static struct five_char_t *five_char;
+ static struct int_char_combo_t *int_char_combo;
+ static struct one_double_t *d1;
+ static struct one_double_t *d2;
+ static struct one_double_t *d3;
+ static struct two_floats_t *f1;
+ static struct two_floats_t *f2;
+ static struct two_floats_t *f3;
/* Initialize arrays
*/
@@ -1198,7 +1198,7 @@ int main () {
}
char_array[120] = '\0';
- for (index = 0; index < 100; index++) {
+ for (index = 0; index < 9; index++) {
double_array[index] = index*23.4567;
}
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index d7721c8..52d5a6e 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -56,6 +56,9 @@ if [target_info exists gdb,cannot_call_functions] {
continue
}
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
# Set the current language to C. This counts as a test. If it
# fails, then we skip the other tests.
@@ -122,18 +125,7 @@ if {![gdb_skip_float_test "print print_double_array(double_array)"] && \
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
"\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
- "\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200"
- "\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800"
- "\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400"
- "\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000"
- "\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600"
- "\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200"
- "\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800"
- "\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400"
- "\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000"
- "\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600"
- "\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200"
- "\[ \t\r\n\]+2275.299900 2298.756600 2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
+ "\[ \t\r\n\]+"
}
}
@@ -202,18 +194,7 @@ if {![gdb_skip_float_test "continuing to breakpoint 1220"] && \
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
"\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
- "\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200"
- "\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800"
- "\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400"
- "\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000"
- "\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600"
- "\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200"
- "\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800"
- "\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400"
- "\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000"
- "\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600"
- "\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200"
- "\[ \t\r\n\]+2275.299900 2298.756600 2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
+ "\[ \t\r\n\]+"
".*array_f :"
".*student id :\[\t \]+.*YELLOW"
".*array_i :"
@@ -259,18 +240,7 @@ if {![gdb_skip_float_test "print print_double_array(array_d)"] && \
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
"\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
- "\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200"
- "\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800"
- "\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400"
- "\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000"
- "\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600"
- "\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200"
- "\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800"
- "\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400"
- "\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000"
- "\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600"
- "\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200"
- "\[ \t\r\n\]+2275.299900 2298.756600 2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
+ "\[ \t\r\n\]+"
}
}
@@ -289,18 +259,7 @@ if {![gdb_skip_float_test "continuing to 1236"] && \
"\[ \t\r\n\]+========="
"\[ \t\r\n\]+0.000000"
"\[ \t\r\n\]+23.456700 46.913400 70.370100 93.826800 117.283500 140.740200 164.196900 187.653600"
- "\[ \t\r\n\]+211.110300 234.567000 258.023700 281.480400 304.937100 328.393800 351.850500 375.307200"
- "\[ \t\r\n\]+398.763900 422.220600 445.677300 469.134000 492.590700 516.047400 539.504100 562.960800"
- "\[ \t\r\n\]+586.417500 609.874200 633.330900 656.787600 680.244300 703.701000 727.157700 750.614400"
- "\[ \t\r\n\]+774.071100 797.527800 820.984500 844.441200 867.897900 891.354600 914.811300 938.268000"
- "\[ \t\r\n\]+961.724700 985.181400 1008.638100 1032.094800 1055.551500 1079.008200 1102.464900 1125.921600"
- "\[ \t\r\n\]+1149.378300 1172.835000 1196.291700 1219.748400 1243.205100 1266.661800 1290.118500 1313.575200"
- "\[ \t\r\n\]+1337.031900 1360.488600 1383.945300 1407.402000 1430.858700 1454.315400 1477.772100 1501.228800"
- "\[ \t\r\n\]+1524.685500 1548.142200 1571.598900 1595.055600 1618.512300 1641.969000 1665.425700 1688.882400"
- "\[ \t\r\n\]+1712.339100 1735.795800 1759.252500 1782.709200 1806.165900 1829.622600 1853.079300 1876.536000"
- "\[ \t\r\n\]+1899.992700 1923.449400 1946.906100 1970.362800 1993.819500 2017.276200 2040.732900 2064.189600"
- "\[ \t\r\n\]+2087.646300 2111.103000 2134.559700 2158.016400 2181.473100 2204.929800 2228.386500 2251.843200"
- "\[ \t\r\n\]+2275.299900 2298.756600 2322.213300.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
+ "\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
}
} else {
gdb_test "continue" "" ""
@@ -740,5 +699,6 @@ if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] {
}
}
+set timeout $oldtimeout
return