Skip to content
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

Merged
merged 5 commits into from
Aug 3, 2019
Merged

Feature verify mdtest #167

merged 5 commits into from
Aug 3, 2019

Conversation

JulianKunkel
Copy link
Collaborator

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)

Copy link
Collaborator

@johnbent johnbent left a 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;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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];
Copy link
Collaborator

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?

Copy link
Collaborator Author

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 :-)

src/mdtest.c Show resolved Hide resolved
@JulianKunkel JulianKunkel merged commit b49b21a into master Aug 3, 2019
@JulianKunkel JulianKunkel deleted the feature-verify-mdtest branch August 3, 2019 08:21
@JulianKunkel JulianKunkel restored the feature-verify-mdtest branch August 3, 2019 08:21
@JulianKunkel JulianKunkel deleted the feature-verify-mdtest branch August 3, 2019 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants