Patch out uses of openpty in the testcases

This commit is contained in:
Dan Williams 2011-07-06 18:01:41 -05:00
parent ca213db241
commit d316b93b61
3 changed files with 15 additions and 18 deletions

View File

@ -28,7 +28,7 @@ BuildRequires: automake autoconf intltool libtool
# for xsltproc
BuildRequires: libxslt
Patch0: blah.patch
Patch0: buildsys-hates-openpty.patch
# HACK patch to workaround FTBFS on sparc, type mismatch where
# suseconds_t is int -- Rex
@ -40,11 +40,12 @@ modems, including mobile broadband (3G) devices.
%prep
%setup -q
%patch0 -p1 -b .blah
%patch0 -p1 -b .pty
%patch1 -p1 -b .hack_sparc_werror.patch
%build
autoreconf -i
%configure \
--enable-more-warnings=yes \
--with-udev-base-dir=/lib/udev \

View File

@ -1,16 +0,0 @@
diff -up ModemManager-0.4.998/src/tests/test-qcdm-serial-port.c.foo ModemManager-0.4.998/src/tests/test-qcdm-serial-port.c
--- ModemManager-0.4.998/src/tests/test-qcdm-serial-port.c.foo 2011-07-06 17:46:52.280112601 -0500
+++ ModemManager-0.4.998/src/tests/test-qcdm-serial-port.c 2011-07-06 17:48:28.178913703 -0500
@@ -404,8 +404,11 @@ test_pty_create (gpointer user_data)
GError *error = NULL;
gboolean success;
+ errno = 0;
ret = openpty (&d->master, &d->slave, NULL, NULL, NULL);
- g_assert (ret == 0);
+ if (ret != 0)
+ g_warning ("%s: openpty() error %d", __func__, errno);
+ g_assert_cmpint (ret, ==, 0);
d->valid = TRUE;
/* set raw mode on the slave using kernel default parameters */

View File

@ -0,0 +1,12 @@
diff -up ModemManager-0.4.998/src/tests/Makefile.am.foo ModemManager-0.4.998/src/tests/Makefile.am
--- ModemManager-0.4.998/src/tests/Makefile.am.foo 2011-07-06 17:59:53.711343366 -0500
+++ ModemManager-0.4.998/src/tests/Makefile.am 2011-07-06 18:00:08.971152593 -0500
@@ -45,7 +45,6 @@ if WITH_TESTS
check-local: test-modem-helpers
$(abs_builddir)/test-modem-helpers
$(abs_builddir)/test-charsets
- $(abs_builddir)/test-qcdm-serial-port
endif