Skip to content

tests: provide tests for od module#5747

Merged
A-Paul merged 1 commit intoRIOT-OS:masterfrom
miri64:tests/feat/od-test
Sep 10, 2016
Merged

tests: provide tests for od module#5747
A-Paul merged 1 commit intoRIOT-OS:masterfrom
miri64:tests/feat/od-test

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Aug 12, 2016

Just realized that this module isn't tested anywhere so I provided some tests. It is very likely, that the test script isn't working on non-32-bit, non-little-endian platforms so this could be the perfect example to get some kind of unified test system started ;-).

@miri64 miri64 added Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 12, 2016
@jnohlgard
Copy link
Copy Markdown
Member

It's always good to increase the test coverage! Nice!

@kaspar030 kaspar030 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 19, 2016
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 30, 2016

Then is someone willing to review ;-)?

@miri64 miri64 added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Aug 30, 2016

#define CALL(fn) puts(#fn); fn

static const char short_str[] = "AB";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these strings provide any dedicated special bit patterns, or are they just arbitrary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just arbitrary.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh well wait: the long_str contains bit patterns that have different results in unsigned and signed notation: 0xff.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short_str is only used to test output width vs array width discrepencies.

@A-Paul
Copy link
Copy Markdown
Member

A-Paul commented Aug 30, 2016

Syntax and code style seem O.K. to me. Built and run on native, but I'm unsure what the expected output is.
The number of test cases is overwhelming and I don't get which different errors or error classes they are covering.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 30, 2016

The expected output is in the contained expect script

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 30, 2016

(at least for 32-bit platforms)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 30, 2016

(and since od does not contain erroring functions it just tests if the output is as expected, no error classes are tested).

@A-Paul
Copy link
Copy Markdown
Member

A-Paul commented Aug 30, 2016

Thanks for the comments. Do you mind to do the same to the response section?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 30, 2016

Do you mind to do the same to the response section?

Do you mean the python script?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Aug 31, 2016

Do you mind to do the same to the response section?

Do you mean the python script?

I am just assuming you meant that and did it.

@miri64 miri64 force-pushed the tests/feat/od-test branch from f2dfcc7 to b62cf6d Compare August 31, 2016 11:59
@A-Paul
Copy link
Copy Markdown
Member

A-Paul commented Sep 8, 2016

@miri64, sorry for being delayed again. Thank your for addressing the comments.
Please squash. If Murdock is green I'll ACK.

@miri64 miri64 force-pushed the tests/feat/od-test branch from b62cf6d to 2cc52fb Compare September 8, 2016 18:02
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 8, 2016

Squashed

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Sep 8, 2016

Murdock is happy :-)

@A-Paul A-Paul merged commit 662076e into RIOT-OS:master Sep 10, 2016
@miri64 miri64 deleted the tests/feat/od-test branch September 10, 2016 14:20
@miri64 miri64 added this to the Release 2016.10 milestone Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants