* [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories.
@ 2009-06-30 19:07 Jan Kratochvil
2009-06-30 21:21 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kratochvil @ 2009-06-30 19:07 UTC (permalink / raw)
To: gdb-patches
Hi,
currently when you run gdb.base/completion.exp by check//unix/-m64 etc. you
get many FAILs due to initial failing:
dir ../testsu^GiteFAIL: gdb.base/completion.exp: directory completion (timeout)
as gdb/testsuite* has also the matches like `gdb/testsuite.unix.-m64'.
Thanks,
Jan
PASS: gdb.base/completion.exp: complete 'p values[0] . a'
PASS: gdb.base/completion.exp: complete 'p &values[0] -> a'
PASS: gdb.base/completion.exp: cd to ${srcdir}
-FAIL: gdb.base/completion.exp: directory completion (timeout)
-FAIL: gdb.base/completion.exp: directory completion 2
+PASS: gdb.base/completion.exp: directory completion
+PASS: gdb.base/completion.exp: directory completion 2
PASS: gdb.base/completion.exp: Glob remaining of directory test
-FAIL: gdb.base/completion.exp: complete-command 'file ./gdb.base/compl'
-FAIL: gdb.base/completion.exp: complete 'file ./gdb.base/complet'
-FAIL: gdb.base/completion.exp: (timeout) complete 'info func marke'
-FAIL: gdb.base/completion.exp: (timeout) complete 'set follow-fork-mode'
-FAIL: gdb.base/completion.exp: (timeout) Completing non-existing component
-FAIL: gdb.base/completion.exp: (timeout) Completing non-existing component #2
+PASS: gdb.base/completion.exp: complete-command 'file ./gdb.base/compl'
+PASS: gdb.base/completion.exp: complete 'file ./gdb.base/complet'
+PASS: gdb.base/completion.exp: complete 'info func marke'
+PASS: gdb.base/completion.exp: complete 'set follow-fork-mode'
+PASS: gdb.base/completion.exp: Completing non-existing component
+PASS: gdb.base/completion.exp: Completing non-existing component #2
gdb/testsuite/
2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/completion.exp (directory completion): Create the directory.
New variables uniquedir, escapeduniquedir, uniquesu, uniquesub,
escapeuniquesub.
(directory completion 2): Expect now ${escapeuniquesub}.
(Glob remaining of directory test): Remove one excessive newline.
Expect the real output.
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -736,24 +736,30 @@ gdb_test "cd ${fullsrcdir}" \
# GDB used to fail adding / on directories, on the first try only
-send_gdb "dir ../testsu\t"
+set uniquedir ${objdir}/${subdir}/completion-uNiQuEdIr
+set escapeduniquedir [string_to_regexp ${uniquedir}]
+set uniquesu subdi
+set uniquesub ${uniquesu}r
+set escapeuniquesub [string_to_regexp ${uniquesub}]
+file mkdir ${uniquedir}/${uniquesub}
+send_gdb "dir ${uniquedir}\t"
gdb_expect {
- -re "../testsuite/$" {
+ -re "${escapeduniquedir}/" {
pass "directory completion"
- send_gdb "gdb.bas\t"
+ send_gdb "${uniquesu}\t"
}
- -re "../testsuite $" {
+ -re "${escapeduniquedir} $" {
fail "directory completion (old gdb bug)"
- send_gdb "\b/gdb.bas\t"
+ send_gdb "\b/${uniquesu}\t"
}
default {
fail "directory completion (timeout)"
- send_gdb "\ndir ../testsuite/gdb.bas\t"
+ send_gdb "\ndir ${uniquedir}/${uniquesu}\t"
}
}
gdb_expect {
- -re "gdb.base/$" {
+ -re "${escapeuniquesub}/$" {
pass "directory completion 2"
}
timeout {
@@ -761,7 +767,8 @@ gdb_expect {
}
}
-gdb_test "\n" "" "Glob remaining of directory test"
+# Empty COMMAND sends no newline while " " sends the newline we need.
+gdb_test " " "Source directories searched: .*" "Glob remaining of directory test"
send_gdb "complete file ./gdb.base/compl\n"
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories.
2009-06-30 19:07 [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories Jan Kratochvil
@ 2009-06-30 21:21 ` Tom Tromey
2009-06-30 21:37 ` Jan Kratochvil
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2009-06-30 21:21 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: gdb-patches
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> currently when you run gdb.base/completion.exp by check//unix/-m64 etc. you
Jan> get many FAILs due to initial failing:
Jan> dir ../testsu^GiteFAIL: gdb.base/completion.exp: directory completion (timeout)
Jan> as gdb/testsuite* has also the matches like `gdb/testsuite.unix.-m64'.
Thanks, this is ok.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories.
2009-06-30 21:21 ` Tom Tromey
@ 2009-06-30 21:37 ` Jan Kratochvil
0 siblings, 0 replies; 3+ messages in thread
From: Jan Kratochvil @ 2009-06-30 21:37 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
On Tue, 30 Jun 2009 23:21:17 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> Jan> currently when you run gdb.base/completion.exp by check//unix/-m64 etc. you
> Jan> get many FAILs due to initial failing:
> Jan> dir ../testsu^GiteFAIL: gdb.base/completion.exp: directory completion (timeout)
>
> Jan> as gdb/testsuite* has also the matches like `gdb/testsuite.unix.-m64'.
>
> Thanks, this is ok.
During a retest found out the original patch did cause a regression when run
in the testsuite/ directory this time. Changed it this way:
-set uniquedir ${objdir}/${subdir}/completion-uNiQuEdIr
->
+# Do not use the `completion' start here as it would conflict with the
+# testcase (complete 'file ./gdb.base/complet') expectations.
+set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr
Checked-in now with this change.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2009-06/msg00207.html
--- src/gdb/testsuite/ChangeLog 2009/06/30 21:23:38 1.1908
+++ src/gdb/testsuite/ChangeLog 2009/06/30 21:33:19 1.1909
@@ -1,5 +1,14 @@
2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * gdb.base/completion.exp (directory completion): Create the directory.
+ New variables uniquedir, escapeduniquedir, uniquesu, uniquesub,
+ escapeuniquesub.
+ (directory completion 2): Expect now ${escapeuniquesub}.
+ (Glob remaining of directory test): Remove one excessive newline.
+ Expect the real output.
+
+2009-06-30 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Fix `make check//%' target after `make check' has been ran.
* Makefile.in (TEST_TARGETS): Remove the %/.dir dependency. Add
a mkdir call.
--- src/gdb/testsuite/gdb.base/completion.exp 2009/03/25 10:52:22 1.37
+++ src/gdb/testsuite/gdb.base/completion.exp 2009/06/30 21:33:20 1.38
@@ -735,25 +735,33 @@
"cd to \${srcdir}"
-# GDB used to fail adding / on directories, on the first try only
-send_gdb "dir ../testsu\t"
+# GDB used to fail adding / on directories, on the first try only.
+# Do not use the `completion' start here as it would conflict with the
+# testcase (complete 'file ./gdb.base/complet') expectations.
+set uniquedir ${objdir}/${subdir}/compl-uNiQuEdIr
+set escapeduniquedir [string_to_regexp ${uniquedir}]
+set uniquesu subdi
+set uniquesub ${uniquesu}r
+set escapeuniquesub [string_to_regexp ${uniquesub}]
+file mkdir ${uniquedir}/${uniquesub}
+send_gdb "dir ${uniquedir}\t"
gdb_expect {
- -re "../testsuite/$" {
+ -re "${escapeduniquedir}/" {
pass "directory completion"
- send_gdb "gdb.bas\t"
+ send_gdb "${uniquesu}\t"
}
- -re "../testsuite $" {
+ -re "${escapeduniquedir} $" {
fail "directory completion (old gdb bug)"
- send_gdb "\b/gdb.bas\t"
+ send_gdb "\b/${uniquesu}\t"
}
default {
fail "directory completion (timeout)"
- send_gdb "\ndir ../testsuite/gdb.bas\t"
+ send_gdb "\ndir ${uniquedir}/${uniquesu}\t"
}
}
gdb_expect {
- -re "gdb.base/$" {
+ -re "${escapeuniquesub}/$" {
pass "directory completion 2"
}
timeout {
@@ -761,7 +769,8 @@
}
}
-gdb_test "\n" "" "Glob remaining of directory test"
+# Empty COMMAND sends no newline while " " sends the newline we need.
+gdb_test " " "Source directories searched: .*" "Glob remaining of directory test"
send_gdb "complete file ./gdb.base/compl\n"
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-30 21:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 19:07 [patch] testsuite: Fix gdb.base/completion.exp for check// subdirectories Jan Kratochvil
2009-06-30 21:21 ` Tom Tromey
2009-06-30 21:37 ` Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox