libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tests: mark 'syntax of .la files' as XFAIL, expose failure.


From: Ralf Wildenhues
Subject: tests: mark 'syntax of .la files' as XFAIL, expose failure.
Date: Mon, 30 Aug 2010 22:45:47 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

Starting to go through the test logs that I posted (I sent a patch for
autobuild to have them sorted by mode as well), here's a testsuite
addition Bob has suggested before: let's not rely on Solaris printf
to catch NULL return from lt_dlerror for us; also, mark the test as
XFAIL as the bug itself is not fixed.  I'm committing this.

Cheers,
Ralf

    tests: mark 'syntax of .la files' as XFAIL, expose failure.
    
    * tests/lalib-syntax.at (syntax of .la files): Assert that the
    string returned by lt_dlerror after a failure is non-NULL, so
    the failure shows up on systems other than Solaris.  Mark test
    as expected to fail.
    Suggested by Bob Friesenhahn.

diff --git a/tests/lalib-syntax.at b/tests/lalib-syntax.at
index c412d54..0f78ca8 100644
--- a/tests/lalib-syntax.at
+++ b/tests/lalib-syntax.at
@@ -1,6 +1,6 @@
 # lalib-syntax.at -- parsing .la files robustly  -*- Autotest -*-
 #
-#   Copyright (C) 2009 Free Software Foundation, Inc.
+#   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
 #
 #   This file is part of GNU Libtool.
 #
@@ -25,9 +25,12 @@ AT_SETUP([syntax of .la files])
 AT_KEYWORDS([libtool])
 AT_KEYWORDS([libltdl])
 
+AT_XFAIL_IF([:]) dnl libltdl does not consistently return non-NULL lt_dlerror
+
 AT_DATA([main.c],
 [[#include <ltdl.h>
 #include <stdio.h>
+#include <assert.h>
 
 int
 main (int argc, char* argv[])
@@ -50,7 +53,9 @@ main (int argc, char* argv[])
     }
   else
     {
-      printf ("plugin failed to open: %s\n", lt_dlerror());
+      const char *error = lt_dlerror ();
+      assert (error != NULL);
+      printf ("plugin failed to open: %s\n", error);
       err = 1;
     }
   lt_dlexit ();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]