This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Serial driver for ARM s3c4510


Roland Caßebohm wrote:
On Mittwoch, 22. Oktober 2003 16:40, Bart Veer wrote:

Regarding something like CYGPRI_SER_TEST_SER_DEV, that is really a
characteristic of the testing infrastructure. Turn it into a booldata,
disabled by default. For manual testing the user should decide
explicitly which port(s) should be tested, enable the option and set
the value. For automated testing the testing infrastructure should be
smart enough to know which port(s) are actually connected to something
that can handle serial tests and manipulate the appropriate
configuration options.

However this would be a regressive step in that current testing assumptions would stop working. Granted with the automated testing things can be munged, but right now one of the good things about eCos testing is that for manual testing users can run through the tests and check for failures. Right now, at least they'll get a test failure if a serial device is not configured correctly with ser_filter magic on the other end.


Perhaps we need a something that has "requires { CYGPRI_SER_TEST_SER_DEV != 0 }", but that would mean having new clean configurations that don't work by default (or if an #ifndef in the test file itself, that doesn't compile by default). That's something we didn't want to do as a policy decision. The alternative would be the user not knowing that serial is not being testing, unless they look in the serial driver configuration each time they create a new configuration. If this principle was applied to all devices (not that they're tested much at present :-|), that would be a lot for a user to configure before they could even manage to do a proper test run.

So I can do it like that:

cdl_component CYGPKG_IO_SERIAL_ARM_AIM711_16X5X_TESTING {
    display    "Testing parameters"
    flavor     bool
    calculated 1
    active_if  CYGPKG_IO_SERIAL_ARM_AIM711_16X5X_SERIAL0

    i {
        display       "Serial device used for testing"
        flavor        booldata
        default_value 0
        legal_values  { 0 CYGDAT_IO_SERIAL_ARM_AIM711_16X5X_SERIAL0_NAME }
    }

    define_proc {
        puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"arm16x5x\""
        puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV  \"/dev/tty2\""
    }
}

But what should I do with CYGPRI_SER_TEST_TTY_DEV? Although I think this is a general problem, because it wouldn't make sense to make CYGPRI_SER_TEST_SER_DEV configureable but not CYGPRI_SER_TEST_TTY_DEV.

Maybe it is also possible to have this in the serial io package

cdl_interface CYGINT_IO_SERIAL_TEST_DEV {
    display     "Serial testing device"
}

and cdl_option CYGPRI_SER_TEST_SER_DEV implements it if enabled?

I don't see an interface helps any. I imagine whatever solution is used for CYGPRI_SER_TEST_SER_DEV should also be used for CYGPRI_SER_TEST_TTY_DEV.


Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]