-
Notifications
You must be signed in to change notification settings - Fork 168
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
Feature verify mdtest #167
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I'm assuming you did at least a few simple tests as you wrote this.
@@ -682,9 +700,16 @@ void mdtest_read(int random, int dirs, const long dir_iter, char *path) { | |||
|
|||
/* read file */ | |||
if (read_bytes > 0) { | |||
read_buffer[0] = 42; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is 42? Can we make it an enum typedef or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just to overwrite the read buffer with something that is not in the pattern. It just cannot be 0.
for (k=0; k < size; k++) { | ||
for (j = 0; j < iterations; j++) { | ||
curr = all[(k*tableSize*iterations) | ||
+ (j*tableSize) + i]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if these two lines should be combined. Doing so pushes beyond 80 chars on the line? Do we have a style guide for IOR coding conventions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surely, that was all the code that existed, I did change the condition to simplify the code, next time, improve that pieces :-)
That branch allows to use the -X parameter for MDTest which verifies that the data read (with -e) is the expected pattern.
MDTest does already check that the bytes read are the right number of bytes, but not
(Note: build upon the feature-mdtest-timer branch)