Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] add skip_shlib_tests guard to tests that require shared lib support
@ 2012-10-12  8:57 Yufeng Zhang
  2012-10-17  8:19 ` Yufeng Zhang
  2012-10-17 15:18 ` Pedro Alves
  0 siblings, 2 replies; 4+ messages in thread
From: Yufeng Zhang @ 2012-10-12  8:57 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi,

This patch adds checks to 3 gdb tests to skip the testing if 
skip_shlib_tests returns 1.

Is it OK to commit?


Thanks,
Yufeng


testsuite/ChangeLog

2012-10-12  Yufeng Zhang  <yufeng.zhang@arm.com>

         * gdb.base/ctxobj.exp: Skip if skip_shlib_tests returns 1.
         * gdb.base/print-file-var.exp: Likewise.
         * gdb.base/type-opaque.exp: Likewise.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: skip-shared-lib-tests.patch --]
[-- Type: text/x-patch; name=skip-shared-lib-tests.patch, Size: 1589 bytes --]

diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp
index b41ed38..529b684 100644
--- a/gdb/testsuite/gdb.base/ctxobj.exp
+++ b/gdb/testsuite/gdb.base/ctxobj.exp
@@ -13,6 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+if {[skip_shlib_tests]} {
+    untested ctxobj.exp
+    return -1
+}
+
 set executable ctxobj-m
 
 # The sources used to build two shared libraries (SO).  We use the exact
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index 994abc4..ccde933 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -13,6 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+if {[skip_shlib_tests]} {
+    untested print-file-var.exp
+    return -1
+}
+
 set executable print-file-var-main
 
 set lib1 "print-file-var-lib1"
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index f91c24b..75b1db0 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -15,6 +15,11 @@
 
 # Test resolving of an opaque type from the loaded shared library.
 
+if {[skip_shlib_tests]} {
+    untested type-opaque.exp
+    return -1
+}
+
 set testfile type-opaque-main
 set libfile type-opaque-lib
 set srcfile ${testfile}.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] add skip_shlib_tests guard to tests that require shared lib support
  2012-10-12  8:57 [PATCH] add skip_shlib_tests guard to tests that require shared lib support Yufeng Zhang
@ 2012-10-17  8:19 ` Yufeng Zhang
  2012-10-17 15:18 ` Pedro Alves
  1 sibling, 0 replies; 4+ messages in thread
From: Yufeng Zhang @ 2012-10-17  8:19 UTC (permalink / raw)
  To: gdb-patches

Ping~

On 10/12/12 09:57, Yufeng Zhang wrote:
> Hi,
>
> This patch adds checks to 3 gdb tests to skip the testing if
> skip_shlib_tests returns 1.
>
> Is it OK to commit?
>
>
> Thanks,
> Yufeng
>
>
> testsuite/ChangeLog
>
> 2012-10-12  Yufeng Zhang<yufeng.zhang@arm.com>
>
>           * gdb.base/ctxobj.exp: Skip if skip_shlib_tests returns 1.
>           * gdb.base/print-file-var.exp: Likewise.
>           * gdb.base/type-opaque.exp: Likewise.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] add skip_shlib_tests guard to tests that require shared lib support
  2012-10-12  8:57 [PATCH] add skip_shlib_tests guard to tests that require shared lib support Yufeng Zhang
  2012-10-17  8:19 ` Yufeng Zhang
@ 2012-10-17 15:18 ` Pedro Alves
  2012-10-19  9:14   ` Yufeng Zhang
  1 sibling, 1 reply; 4+ messages in thread
From: Pedro Alves @ 2012-10-17 15:18 UTC (permalink / raw)
  To: Yufeng Zhang; +Cc: gdb-patches

On 10/12/2012 09:57 AM, Yufeng Zhang wrote:
>  
> +if {[skip_shlib_tests]} {
> +    untested ctxobj.exp
> +    return -1
> +}

See <http://sourceware.org/gdb/wiki/GDBTestcaseCookbook>.

"In untested calls, please spell out the reason the test ends up untested, instead
of just writing the test name, as with the latter we just end up with the test name
duplicated in the gdb.sum output. For example: "

But in these skip_ *cases, I think we can just be silent.  The vast majority of
the skip_* calls in the testsuite agrees (e.g., seen
with 'grep -rn "skip_" -A 3 | grep untested').

IOW, this is OK with the untested calls removed.

Thanks.

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] add skip_shlib_tests guard to tests that require shared lib support
  2012-10-17 15:18 ` Pedro Alves
@ 2012-10-19  9:14   ` Yufeng Zhang
  0 siblings, 0 replies; 4+ messages in thread
From: Yufeng Zhang @ 2012-10-19  9:14 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 872 bytes --]

On 10/17/12 16:17, Pedro Alves wrote:
> On 10/12/2012 09:57 AM, Yufeng Zhang wrote:
>>
>> +if {[skip_shlib_tests]} {
>> +    untested ctxobj.exp
>> +    return -1
>> +}
>
> See<http://sourceware.org/gdb/wiki/GDBTestcaseCookbook>.
>
> "In untested calls, please spell out the reason the test ends up untested, instead
> of just writing the test name, as with the latter we just end up with the test name
> duplicated in the gdb.sum output. For example: "
>
> But in these skip_ *cases, I think we can just be silent.  The vast majority of
> the skip_* calls in the testsuite agrees (e.g., seen
> with 'grep -rn "skip_" -A 3 | grep untested').
>
> IOW, this is OK with the untested calls removed.

Thanks!

I've removed the untested calls; the updated patch has been committed
http://sourceware.org/ml/gdb-cvs/2012-10/msg00077.html.

Thanks,
Yufeng

[-- Attachment #2: skip-shared-lib-tests.patch.v2 --]
[-- Type: text/plain, Size: 1498 bytes --]

diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp
index b41ed38..a0eceb7 100644
--- a/gdb/testsuite/gdb.base/ctxobj.exp
+++ b/gdb/testsuite/gdb.base/ctxobj.exp
@@ -13,6 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+if {[skip_shlib_tests]} {
+    return -1
+}
+
 set executable ctxobj-m
 
 # The sources used to build two shared libraries (SO).  We use the exact
diff --git a/gdb/testsuite/gdb.base/print-file-var.exp b/gdb/testsuite/gdb.base/print-file-var.exp
index 994abc4..03a2832 100644
--- a/gdb/testsuite/gdb.base/print-file-var.exp
+++ b/gdb/testsuite/gdb.base/print-file-var.exp
@@ -13,6 +13,10 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+if {[skip_shlib_tests]} {
+    return -1
+}
+
 set executable print-file-var-main
 
 set lib1 "print-file-var-lib1"
diff --git a/gdb/testsuite/gdb.base/type-opaque.exp b/gdb/testsuite/gdb.base/type-opaque.exp
index f91c24b..ffd4662 100644
--- a/gdb/testsuite/gdb.base/type-opaque.exp
+++ b/gdb/testsuite/gdb.base/type-opaque.exp
@@ -15,6 +15,10 @@
 
 # Test resolving of an opaque type from the loaded shared library.
 
+if {[skip_shlib_tests]} {
+    return -1
+}
+
 set testfile type-opaque-main
 set libfile type-opaque-lib
 set srcfile ${testfile}.c

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-19  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-12  8:57 [PATCH] add skip_shlib_tests guard to tests that require shared lib support Yufeng Zhang
2012-10-17  8:19 ` Yufeng Zhang
2012-10-17 15:18 ` Pedro Alves
2012-10-19  9:14   ` Yufeng Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox