Re: Testing foreign platform code


Subject: Re: Testing foreign platform code
From: Paul Rohr (paul@abisource.com)
Date: Wed Mar 01 2000 - 21:35:13 CST


At 12:34 AM 3/2/00 +0000, Aaron Lehmann wrote:
>Just wondering, how do developers usually deal with updating code on other
>platforms?

Of course, it's always easiest to keep compilers happy when you've got a
local copy installed to try it on. However, none of us have that luxury.
By restricting ourselves to the portability guidelines, we usually manage to
avoid compiler-specific problems.

However, coding without a safety net *does* add a little spice to your life.
;-)

>Is it up to someone who can code for that operating system to
>keep it in sync with hackers' changes to other platforms, or do people
>make attempts to update the other platforms and hope they work?

The polite thing is to do the best you can. For anything that involves an
API change, there's no reason why we can't make all of the required changes
happen the first time. It takes a little more discipline to be thorough
when cutting and pasting, but that's what grep and friends are for.

Wherever possible, go ahead and make all the changes needed. If a little
lint creeps in, then Tinderbox will flag them within an hour or so, and you
can follow up with a "Fixed build" checkin. (I'm actually going through
this iteration right now.)

Alternatively, if there's some question about whether a set of changes is
safe to make on another platform, it's probably better to just circulate a
small patch, and ask specific folks on the other platforms whether they want
to try it out before it gets checked in.

Finally, if you're pretty sure you won't be able to come up with a safe way
to get the feature coded on other platforms, find a safe way to stub it out
so at least everything will still build. For example, if you look through
the platform-specific dialog code, you'll see more than one RunModal method
which looks like this:

  UT_ASSERT(UT_NOT_IMPLEMENTED);

>I'm hoping
>to avoid the donut penalty when I work on non-XP code. With the number of
>platforms rising steadily, it seems like it is unresonable to test most
>small patches on all platforms before commiting them (BeOS... QNX...
>Mac... Gnome...).

Donuts are compensation for nasty surprises.

If you *know* you're going to break the build with a checkin, send mail to
the list ahead of time warning everyone, so that people know it may not be
safe to update quite yet. However, you should only do this if you have a
strategy for getting it fixed.

>Is it possible to build a GCC win32 cross-compiler to ensure that at
>least the win32 build is not broken before I submit a patch? I only have
>UNIX around here (and a Mac with a very outdated version of CodeWarrior).

I don't know, but I'm not sure how much this would help. It should help
catch certain errors, but because it's a different compiler, it'll never be
100% accurate.

Paul

PS: If anyone owes donuts for today's breakage, it'd be me, because I
decided to go ahead with the checkin, and was a bit sloppy letting people
know. If anyone's ready to make a checkin before I get Tinderbox green
again, let me know what flavor you prefer. :-)



This archive was generated by hypermail 2b25 : Wed Mar 01 2000 - 21:29:50 CST