New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extends test set for Mail class #4945

Merged
merged 1 commit into from Sep 5, 2017

Conversation

Projects
None yet
6 participants
@maciejbocianski
Member

maciejbocianski commented Aug 21, 2017

Description

New test suite for mail class

Status

READY

Requires

To pass Mail test following fix should be merged first: #4941

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 21, 2017

retest uvisor

3 similar comments
@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 22, 2017

retest uvisor

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 22, 2017

retest uvisor

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 22, 2017

retest uvisor

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 22, 2017

@mazimkhan the uvisor seem to be stuck

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 22, 2017

retest uvisor

TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
{
Mail<uint32_t, 4> mail_box;
uint32_t start = us_ticker_read();

This comment has been minimized.

@0xc0170

0xc0170 Aug 22, 2017

Member

Please use C++ API - there are tickers/timers etc, instead of using directly HAL

This comment has been minimized.

@maciejbocianski
TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
When allocate/put/get/free memory block
Then all operations should succeed
*/
void test_uint32(void)

This comment has been minimized.

@0xc0170

0xc0170 Aug 22, 2017

Member

Can this duplication be avoided (template for instance) ? for uint_t 8,16,32 ?

This comment has been minimized.

@maciejbocianski

@maciejbocianski maciejbocianski force-pushed the maciejbocianski:mail_tests branch Aug 22, 2017

TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
const uint8_t id = mail->thread_id;
// verify thread id
result = result && (id == THREAD_1_ID);

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member

Can we assert these here? So if it fails we know what actually went wrong.

This comment has been minimized.

@maciejbocianski
TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
mail_box.free(mail);
if (result == false || ++result_counter == QUEUE_SIZE) {

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member

Could we have assert here?

When call @a get it returns previously put mails
Then mails should be in the same order as put
*/
void test_order(void)

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member

Aren't we testing order in some other test?

This comment has been minimized.

@maciejbocianski

maciejbocianski Aug 23, 2017

Member

this is the only place where we test order intentionally

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member
+/** Test single thread Mail usage
 +
 +    Given mailbox and one additional thread
 +    When messages are put in to the Mail box by this thread
 +    Then messages are received in main thread in the same order as was sent and the data sent is valid

You're asserting the order here as well.

This comment has been minimized.

@maciejbocianski
TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
uint32_t *mail3 = mail_box.alloc();
TEST_ASSERT_NOT_EQUAL(NULL, mail3);
// 4 KO

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member

typo -> OK

TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
uint32_t *mail4 = mail_box.alloc();
TEST_ASSERT_NOT_EQUAL(NULL, mail4);
// 5 KO

This comment has been minimized.

@bulislaw

bulislaw Aug 23, 2017

Member

that should be error

@maciejbocianski maciejbocianski force-pushed the maciejbocianski:mail_tests branch 3 times, most recently Aug 23, 2017

@maciejbocianski

This comment has been minimized.

Member

maciejbocianski commented Aug 24, 2017

some improvements added
@0xc0170
@bulislaw

@bulislaw

@0xc0170 can you have a look

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 25, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 25, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1117

Build failed!

@maciejbocianski

This comment has been minimized.

Member

maciejbocianski commented Aug 29, 2017

@bulislaw can you check morph fail. Looks like some problem when building "startup_efm32wg.S"
...
[DEBUG] Return: -11
Failed to build library
...

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 29, 2017

/morph test

@maciejbocianski

This comment has been minimized.

Member

maciejbocianski commented Aug 29, 2017

@bulislaw
morph seems to be hanged

Started by remote host 127.0.0.1
[Pipeline] node
Still waiting to schedule task
Waiting for next available executor on master

@bulislaw

This comment has been minimized.

Member

bulislaw commented Aug 29, 2017

You're in the queue, it'll take another couple of hours.

@mbed-bot

This comment has been minimized.

mbed-bot commented Aug 30, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1136

All builds and test passed!

TESTS/mbedmicro-rtos-mbed/mail/main.cpp Outdated
#include "rtos.h"
#include "us_ticker_api.h"

This comment has been minimized.

@0xc0170

0xc0170 Aug 31, 2017

Member

us ticker - not used anywhere?

This comment has been minimized.

@maciejbocianski

maciejbocianski Aug 31, 2017

Member

removed

uint32_t *mail4 = mail_box.alloc();
TEST_ASSERT_NOT_EQUAL(NULL, mail4);
// 5 KO

This comment has been minimized.

@0xc0170

0xc0170 Aug 31, 2017

Member

OK typo

This comment has been minimized.

@maciejbocianski

maciejbocianski Aug 31, 2017

Member

fifth should fail so "KO" is ok

@maciejbocianski maciejbocianski force-pushed the maciejbocianski:mail_tests branch to ae0b90f Aug 31, 2017

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Sep 3, 2017

/morph test

@mbed-bot

This comment has been minimized.

mbed-bot commented Sep 3, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1186

All builds and test passed!

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Sep 4, 2017

@tommikas Can you please restart jenkis CI (there is no link here) ?

@theotherjimmy theotherjimmy merged commit 8143773 into ARMmbed:master Sep 5, 2017

4 checks passed

Cam-CI uvisor Build & Test Success
Details
ci/morph-test Job has completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment