[PATCH 2/2] gdb: testsuite: specify two args for "set args" command in a2-run.exp

Tiezhu Yang yangtiezhu@loongson.cn
Thu Nov 18 11:59:21 GMT 2021


In order to improve test coverage, add a testcase to specify two args
for "set args" command in a2-run.exp.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 gdb/testsuite/gdb.base/a2-run.exp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index 2042c26..fc9fa58 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -156,6 +156,11 @@ gdb_test_no_output "set args 6"
 gdb_run_cmd
 gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
 
+# Use "set args" command to specify two arguments and run again.
+gdb_test_no_output "set args 6 7"
+gdb_run_cmd
+gdb_test_stdio "" "usage:  factorial <number>" "" "run after setting two args"
+
 # GOAL: Test that shell is being used with "run".  For remote debugging
 # targets, there is no guarantee that a "shell" (whatever that is) is used.
 if ![is_remote target] then {
-- 
2.1.0



More information about the Gdb-patches mailing list