Message ID | 1397550046-24928-1-git-send-email-anders.roxell@linaro.org |
---|---|
State | Superseded |
Headers | show |
On 15 April 2014 13:50, Anders Roxell <anders.roxell@linaro.org> wrote: > wasn't able to run testcase 7, said: > "Invalid test case [7]" > > Signed-off-by: Anders Roxell <anders.roxell@linaro.org> > --- > Hi, > > This is a quick and dirty fix... > I think we need to rework the test framework for all the tests so they are > similar to each other, that will make it easier to add tests. > > Or should we add a unit test framework so we can run the tests on > different HW and check so we have API compatibility between them? > > This was something Taras touched upon earlier this week right? > > Cheers, > > test/api_test/odp_atomic_test.c | 4 +++- > test/api_test/odp_atomic_test.h | 2 +- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/test/api_test/odp_atomic_test.c > b/test/api_test/odp_atomic_test.c > index ea443a0..3f95d3d 100644 > --- a/test/api_test/odp_atomic_test.c > +++ b/test/api_test/odp_atomic_test.c > @@ -17,6 +17,7 @@ static odp_atomic_u64_t a64u; > static odp_atomic_int_t numthrds; > > static const char * const test_name[] = { > + "dummy", > "test atomic basic ops add/sub/inc/dec", > "test atomic inc/dec of signed word", > "test atomic add/sub of signed word", > @@ -334,10 +335,11 @@ int main(int argc, char *argv[]) > thrdarg.testcase = test_type; > thrdarg.numthrds = pthrdnum; > > - if ((test_type > 0) && (test_type < 7)) { > + if ((test_type > 0) && (test_type < TEST_MAX)) { > printf("%s\n", test_name[test_type]); > } else { > ODP_ERR("Invalid test case [%d]\n", test_type); > + usage(); > goto err_exit; > } > odp_test_thread_create(run_thread, &thrdarg); > diff --git a/test/api_test/odp_atomic_test.h > b/test/api_test/odp_atomic_test.h > index 04dde72..a35817b 100644 > --- a/test/api_test/odp_atomic_test.h > +++ b/test/api_test/odp_atomic_test.h > @@ -29,7 +29,7 @@ > #define TEST_ADD_SUB_U32 5 > #define TEST_INC_DEC_64 6 > #define TEST_ADD_SUB_64 7 > -#define TEST_MAX 7 /* This must match the last test > case num */ > +#define TEST_MAX 8 /* This must match the last test > case num */ > Please remove the comment. > > void test_atomic_inc_dec_32(void); > -- > 1.8.3.2 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 15 Apr 2014 11:11, "Venkatesh Vivekanandan" < venkatesh.vivekanandan@linaro.org> wrote: > > > > > On 15 April 2014 13:50, Anders Roxell <anders.roxell@linaro.org> wrote: >> >> wasn't able to run testcase 7, said: >> "Invalid test case [7]" >> >> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> >> --- >> Hi, >> >> This is a quick and dirty fix... >> I think we need to rework the test framework for all the tests so they are >> similar to each other, that will make it easier to add tests. >> >> Or should we add a unit test framework so we can run the tests on different HW and check so we have API compatibility between them? >> >> This was something Taras touched upon earlier this week right? >> >> Cheers, >> >> test/api_test/odp_atomic_test.c | 4 +++- >> test/api_test/odp_atomic_test.h | 2 +- >> 2 files changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/test/api_test/odp_atomic_test.c b/test/api_test/odp_atomic_test.c >> index ea443a0..3f95d3d 100644 >> --- a/test/api_test/odp_atomic_test.c >> +++ b/test/api_test/odp_atomic_test.c >> @@ -17,6 +17,7 @@ static odp_atomic_u64_t a64u; >> static odp_atomic_int_t numthrds; >> >> static const char * const test_name[] = { >> + "dummy", >> "test atomic basic ops add/sub/inc/dec", >> "test atomic inc/dec of signed word", >> "test atomic add/sub of signed word", >> @@ -334,10 +335,11 @@ int main(int argc, char *argv[]) >> thrdarg.testcase = test_type; >> thrdarg.numthrds = pthrdnum; >> >> - if ((test_type > 0) && (test_type < 7)) { >> + if ((test_type > 0) && (test_type < TEST_MAX)) { >> printf("%s\n", test_name[test_type]); >> } else { >> ODP_ERR("Invalid test case [%d]\n", test_type); >> + usage(); >> goto err_exit; >> } >> odp_test_thread_create(run_thread, &thrdarg); >> diff --git a/test/api_test/odp_atomic_test.h b/test/api_test/odp_atomic_test.h >> index 04dde72..a35817b 100644 >> --- a/test/api_test/odp_atomic_test.h >> +++ b/test/api_test/odp_atomic_test.h >> @@ -29,7 +29,7 @@ >> #define TEST_ADD_SUB_U32 5 >> #define TEST_INC_DEC_64 6 >> #define TEST_ADD_SUB_64 7 >> -#define TEST_MAX 7 /* This must match the last test case num */ >> +#define TEST_MAX 8 /* This must match the last test case num */ > > > Please remove the comment. Argh... Will do! Resending patch soon > >> >> >> void test_atomic_inc_dec_32(void); >> -- >> 1.8.3.2 >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp > >
diff --git a/test/api_test/odp_atomic_test.c b/test/api_test/odp_atomic_test.c index ea443a0..3f95d3d 100644 --- a/test/api_test/odp_atomic_test.c +++ b/test/api_test/odp_atomic_test.c @@ -17,6 +17,7 @@ static odp_atomic_u64_t a64u; static odp_atomic_int_t numthrds; static const char * const test_name[] = { + "dummy", "test atomic basic ops add/sub/inc/dec", "test atomic inc/dec of signed word", "test atomic add/sub of signed word", @@ -334,10 +335,11 @@ int main(int argc, char *argv[]) thrdarg.testcase = test_type; thrdarg.numthrds = pthrdnum; - if ((test_type > 0) && (test_type < 7)) { + if ((test_type > 0) && (test_type < TEST_MAX)) { printf("%s\n", test_name[test_type]); } else { ODP_ERR("Invalid test case [%d]\n", test_type); + usage(); goto err_exit; } odp_test_thread_create(run_thread, &thrdarg); diff --git a/test/api_test/odp_atomic_test.h b/test/api_test/odp_atomic_test.h index 04dde72..a35817b 100644 --- a/test/api_test/odp_atomic_test.h +++ b/test/api_test/odp_atomic_test.h @@ -29,7 +29,7 @@ #define TEST_ADD_SUB_U32 5 #define TEST_INC_DEC_64 6 #define TEST_ADD_SUB_64 7 -#define TEST_MAX 7 /* This must match the last test case num */ +#define TEST_MAX 8 /* This must match the last test case num */ void test_atomic_inc_dec_32(void);
wasn't able to run testcase 7, said: "Invalid test case [7]" Signed-off-by: Anders Roxell <anders.roxell@linaro.org> --- Hi, This is a quick and dirty fix... I think we need to rework the test framework for all the tests so they are similar to each other, that will make it easier to add tests. Or should we add a unit test framework so we can run the tests on different HW and check so we have API compatibility between them? This was something Taras touched upon earlier this week right? Cheers, test/api_test/odp_atomic_test.c | 4 +++- test/api_test/odp_atomic_test.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)