* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rttest: Resolved test device conflicts via separate name spaces [not found] <E1O2jBI-0000y0-DS@xenomai.org> @ 2010-04-16 12:25 ` Gilles Chanteperdrix 2010-04-16 12:32 ` Jan Kiszka 0 siblings, 1 reply; 2+ messages in thread From: Gilles Chanteperdrix @ 2010-04-16 12:25 UTC (permalink / raw) To: xenomai-core GIT version control wrote: > Module: xenomai-jki > Branch: for-upstream > Commit: dede8fde31b175ddccaee610b7b0ff21560872a5 > URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=dede8fde31b175ddccaee610b7b0ff21560872a5 > > Author: Jan Kiszka <jan.kiszka@domain.hid> > Date: Sun Apr 11 17:35:51 2010 +0200 > > rttest: Resolved test device conflicts via separate name spaces > > Usually, all devices of some RTDM class use the same naming scheme. But > as test devices are different as they do not provide compatible APIs, > let's give them separate name space for their device names. That finally > resolves all the detection troubles that showed up once more than one > test device was registered. > > Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid> > > --- > > include/rtdm/rttesting.h | 10 ++++-- > ksrc/drivers/testing/irqbench.c | 4 +- > ksrc/drivers/testing/switchtest.c | 4 +- > ksrc/drivers/testing/timerbench.c | 4 +- > src/testsuite/irqbench/irqloop.c | 3 +- > src/testsuite/latency/latency.c | 2 +- > src/testsuite/switchtest/switchtest.c | 50 +++++++------------------------- > 7 files changed, 27 insertions(+), 50 deletions(-) > > diff --git a/include/rtdm/rttesting.h b/include/rtdm/rttesting.h > index ce0418e..56df43b 100644 > --- a/include/rtdm/rttesting.h > +++ b/include/rtdm/rttesting.h > @@ -29,13 +29,14 @@ > * Feel free to comment on this profile via the Xenomai mailing list > * (xenomai@xenomai.org) or directly to the author (jan.kiszka@domain.hid). > * > - * @b Profile @b Revision: 1 > + * @b Profile @b Revision: 2 > * @n > * @n > * @par Device Characteristics > * @ref rtdm_device.device_flags "Device Flags": @c RTDM_NAMED_DEVICE @n > * @n > - * @ref rtdm_device.device_name "Device Name": @c "rttest<N>", N >= 0 @n > + * @ref rtdm_device.device_name "Device Name": @c "rttest[-<subclass>]<N>", > + * N >= 0, optional subclass name to simplify device discovery @n > * @n > * @ref rtdm_device.device_class "Device Class": @c RTDM_CLASS_TESTING @n > * @n > @@ -61,7 +62,7 @@ > > #include <rtdm/rtdm.h> > > -#define RTTST_PROFILE_VER 1 > +#define RTTST_PROFILE_VER 2 > > typedef struct rttst_bench_res { > long long avg; > @@ -145,8 +146,11 @@ struct rttst_swtest_error { > /*! > * @name Sub-Classes of RTDM_CLASS_TESTING > * @{ */ > +/** subclass name: "tmbench" */ > #define RTDM_SUBCLASS_TIMERBENCH 0 > +/** subclass name: "irqbench" */ > #define RTDM_SUBCLASS_IRQBENCH 1 > +/** subclass name: "switchtst" */ > #define RTDM_SUBCLASS_SWITCHTEST 2 > /** @} */ > > diff --git a/ksrc/drivers/testing/irqbench.c b/ksrc/drivers/testing/irqbench.c > index 3dfb646..db520cb 100644 > --- a/ksrc/drivers/testing/irqbench.c > +++ b/ksrc/drivers/testing/irqbench.c > @@ -515,8 +515,8 @@ static int __init __irqbench_init(void) > int err; > > do { > - snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, "rttest%d", > - start_index); > + snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, > + "rttest-irqbench%d", start_index); > err = rtdm_dev_register(&device); > > start_index++; > diff --git a/ksrc/drivers/testing/switchtest.c b/ksrc/drivers/testing/switchtest.c > index 057094b..47702fc 100644 > --- a/ksrc/drivers/testing/switchtest.c > +++ b/ksrc/drivers/testing/switchtest.c > @@ -750,8 +750,8 @@ int __init __switchtest_init(void) > int err; > > do { > - snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, "rttest%d", > - start_index); > + snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, > + "rttest-switchtst%d", start_index); Why not rttest-switchtest ? -- Gilles. ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : rttest: Resolved test device conflicts via separate name spaces 2010-04-16 12:25 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : rttest: Resolved test device conflicts via separate name spaces Gilles Chanteperdrix @ 2010-04-16 12:32 ` Jan Kiszka 0 siblings, 0 replies; 2+ messages in thread From: Jan Kiszka @ 2010-04-16 12:32 UTC (permalink / raw) To: Gilles Chanteperdrix; +Cc: xenomai-core Gilles Chanteperdrix wrote: > GIT version control wrote: >> Module: xenomai-jki >> Branch: for-upstream >> Commit: dede8fde31b175ddccaee610b7b0ff21560872a5 >> URL: http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=dede8fde31b175ddccaee610b7b0ff21560872a5 >> >> Author: Jan Kiszka <jan.kiszka@domain.hid> >> Date: Sun Apr 11 17:35:51 2010 +0200 >> >> rttest: Resolved test device conflicts via separate name spaces >> >> Usually, all devices of some RTDM class use the same naming scheme. But >> as test devices are different as they do not provide compatible APIs, >> let's give them separate name space for their device names. That finally >> resolves all the detection troubles that showed up once more than one >> test device was registered. >> >> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid> >> >> --- >> >> include/rtdm/rttesting.h | 10 ++++-- >> ksrc/drivers/testing/irqbench.c | 4 +- >> ksrc/drivers/testing/switchtest.c | 4 +- >> ksrc/drivers/testing/timerbench.c | 4 +- >> src/testsuite/irqbench/irqloop.c | 3 +- >> src/testsuite/latency/latency.c | 2 +- >> src/testsuite/switchtest/switchtest.c | 50 +++++++------------------------- >> 7 files changed, 27 insertions(+), 50 deletions(-) >> >> diff --git a/include/rtdm/rttesting.h b/include/rtdm/rttesting.h >> index ce0418e..56df43b 100644 >> --- a/include/rtdm/rttesting.h >> +++ b/include/rtdm/rttesting.h >> @@ -29,13 +29,14 @@ >> * Feel free to comment on this profile via the Xenomai mailing list >> * (xenomai@xenomai.org) or directly to the author (jan.kiszka@domain.hid). >> * >> - * @b Profile @b Revision: 1 >> + * @b Profile @b Revision: 2 >> * @n >> * @n >> * @par Device Characteristics >> * @ref rtdm_device.device_flags "Device Flags": @c RTDM_NAMED_DEVICE @n >> * @n >> - * @ref rtdm_device.device_name "Device Name": @c "rttest<N>", N >= 0 @n >> + * @ref rtdm_device.device_name "Device Name": @c "rttest[-<subclass>]<N>", >> + * N >= 0, optional subclass name to simplify device discovery @n >> * @n >> * @ref rtdm_device.device_class "Device Class": @c RTDM_CLASS_TESTING @n >> * @n >> @@ -61,7 +62,7 @@ >> >> #include <rtdm/rtdm.h> >> >> -#define RTTST_PROFILE_VER 1 >> +#define RTTST_PROFILE_VER 2 >> >> typedef struct rttst_bench_res { >> long long avg; >> @@ -145,8 +146,11 @@ struct rttst_swtest_error { >> /*! >> * @name Sub-Classes of RTDM_CLASS_TESTING >> * @{ */ >> +/** subclass name: "tmbench" */ >> #define RTDM_SUBCLASS_TIMERBENCH 0 >> +/** subclass name: "irqbench" */ >> #define RTDM_SUBCLASS_IRQBENCH 1 >> +/** subclass name: "switchtst" */ >> #define RTDM_SUBCLASS_SWITCHTEST 2 >> /** @} */ >> >> diff --git a/ksrc/drivers/testing/irqbench.c b/ksrc/drivers/testing/irqbench.c >> index 3dfb646..db520cb 100644 >> --- a/ksrc/drivers/testing/irqbench.c >> +++ b/ksrc/drivers/testing/irqbench.c >> @@ -515,8 +515,8 @@ static int __init __irqbench_init(void) >> int err; >> >> do { >> - snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, "rttest%d", >> - start_index); >> + snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, >> + "rttest-irqbench%d", start_index); >> err = rtdm_dev_register(&device); >> >> start_index++; >> diff --git a/ksrc/drivers/testing/switchtest.c b/ksrc/drivers/testing/switchtest.c >> index 057094b..47702fc 100644 >> --- a/ksrc/drivers/testing/switchtest.c >> +++ b/ksrc/drivers/testing/switchtest.c >> @@ -750,8 +750,8 @@ int __init __switchtest_init(void) >> int err; >> >> do { >> - snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, "rttest%d", >> - start_index); >> + snprintf(device.device_name, RTDM_MAX_DEVNAME_LEN, >> + "rttest-switchtst%d", start_index); > > Why not rttest-switchtest ? Probably an attempt to keep the name shorter. I can post a version with the 'e' included if you prefer. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-16 12:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1O2jBI-0000y0-DS@xenomai.org>
2010-04-16 12:25 ` [Xenomai-core] [Xenomai-git] Jan Kiszka : rttest: Resolved test device conflicts via separate name spaces Gilles Chanteperdrix
2010-04-16 12:32 ` Jan Kiszka
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.