ubsan: alpha-vms: shift exponent is too large
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / trace-buffer-size.exp
index e124d7d00c3789c43913238d2955127181458e48..529a8b7012ff11cbb7e6ec341388cadc3d9b0c03 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1998-2013 Free Software Foundation, Inc.
+# Copyright 1998-2019 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,9 +17,8 @@ load_lib "trace-support.exp"
 
 standard_testfile
 
-if [prepare_for_testing ${testfile}.exp $testfile $srcfile \
+if [prepare_for_testing "failed to prepare" $testfile $srcfile \
         {debug nowarnings}] {
-    untested "failed to prepare for trace tests"
     return -1
 }
 
@@ -30,7 +29,7 @@ if ![runto_main] {
 
 if ![gdb_target_supports_trace] {
     unsupported "target does not support trace"
-    return -1;
+    return -1
 }
 
 set BUFFER_SIZE 4
@@ -39,7 +38,7 @@ set test "get default buffer size"
 
 # Save default trace buffer size in 'default_size'.
 gdb_test_multiple "tstatus" $test {
-    -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*" {
+    -re ".*Trace buffer has ($decimal) bytes of ($decimal) bytes free.*$gdb_prompt $" {
         set default_size $expect_out(2,string)
         pass $test
     }
@@ -48,7 +47,7 @@ gdb_test_multiple "tstatus" $test {
 # If we did not get the default size then there is no point in running the
 # tests below.
 if { $default_size < 0 } {
-  return -1;
+  return -1
 }
 
 # Change buffer size to 'BUFFER_SIZE'.
@@ -64,10 +63,14 @@ gdb_test "show trace-buffer-size $BUFFER_SIZE" \
   "Requested size of trace buffer is $BUFFER_SIZE.*" \
   "show trace buffer size"
 
+# -1 means "no limit on GDB's end.  Let the target choose."
 gdb_test_no_output \
   "set trace-buffer-size -1" \
   "set trace buffer size 2"
 
+# "unlimited" means the same.
+gdb_test_no_output "set trace-buffer-size unlimited"
+
 # Test that tstatus gives us default buffer size now.
 gdb_test "tstatus" \
   ".*Trace buffer has $decimal bytes of $default_size bytes free.*" \
This page took 0.024963 seconds and 4 git commands to generate.