Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shane Snyder
darshan
Commits
106767d3
Commit
106767d3
authored
May 24, 2016
by
Philip Carns
Browse files
update test case to account for shared reduction
parent
3d7cc3c6
Changes
1
Show whitespace changes
Inline
Side-by-side
darshan-test/regression/test-cases/stdio-test.sh
View file @
106767d3
...
...
@@ -27,30 +27,26 @@ if [ $? -ne 0 ]; then
exit
1
fi
# TODO: look for "head" commands in all of these test cases and remove them
# later. Right now they are needed to make sure we only check 1 out of 4
# possible records because reduction is not implemented yet
# check results
# check at least one counter from each general open/read/write/seek category
STDIO_OPENS
=
`
grep
STDIO_OPENS
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_OPENS
=
`
grep
STDIO_OPENS
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
"
$STDIO_OPENS
"
-gt
0
]
;
then
echo
"Error: STDIO open count of
$STDIO_OPENS
is incorrect"
1>&2
exit
1
fi
STDIO_SEEKS
=
`
grep
STDIO_SEEKS
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_SEEKS
=
`
grep
STDIO_SEEKS
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
"
$STDIO_SEEKS
"
-gt
0
]
;
then
echo
"Error: STDIO open count of
$STDIO_SEEKS
is incorrect"
1>&2
exit
1
fi
STDIO_BYTES_WRITTEN
=
`
grep
STDIO_BYTES_WRITTEN
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_BYTES_WRITTEN
=
`
grep
STDIO_BYTES_WRITTEN
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
"
$STDIO_BYTES_WRITTEN
"
-eq
6
]
;
then
echo
"Error: STDIO open count of
$STDIO_BYTES_WRITTEN
is incorrect"
1>&2
exit
1
fi
STDIO_BYTES_READ
=
`
grep
STDIO_BYTES_READ
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_BYTES_READ
=
`
grep
STDIO_BYTES_READ
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
"
$STDIO_BYTES_READ
"
-eq
6
]
;
then
echo
"Error: STDIO open count of
$STDIO_BYTES_READ
is incorrect"
1>&2
exit
1
...
...
@@ -59,32 +55,32 @@ fi
# make sure that some of the floating point counters are valid
# use bc for floating point comparison
STDIO_F_OPEN_START_TIMESTAMP
=
`
grep
STDIO_F_OPEN_START_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_OPEN_START_TIMESTAMP
=
`
grep
STDIO_F_OPEN_START_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_OPEN_START_TIMESTAMP
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
fi
STDIO_F_OPEN_END_TIMESTAMP
=
`
grep
STDIO_F_OPEN_END_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_OPEN_END_TIMESTAMP
=
`
grep
STDIO_F_OPEN_END_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_OPEN_END_TIMESTAMP
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
fi
STDIO_F_META_TIME
=
`
grep
STDIO_F_META_TIME
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_META_TIME
=
`
grep
STDIO_F_META_TIME
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_META_TIME
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
fi
STDIO_F_WRITE_TIME
=
`
grep
STDIO_F_WRITE_TIME
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_WRITE_TIME
=
`
grep
STDIO_F_WRITE_TIME
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_WRITE_TIME
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
fi
STDIO_F_CLOSE_START_TIMESTAMP
=
`
grep
STDIO_F_CLOSE_START_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_CLOSE_START_TIMESTAMP
=
`
grep
STDIO_F_CLOSE_START_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_CLOSE_START_TIMESTAMP
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
fi
STDIO_F_CLOSE_END_TIMESTAMP
=
`
grep
STDIO_F_CLOSE_END_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
head
-n
1 |
cut
-f
5
`
STDIO_F_CLOSE_END_TIMESTAMP
=
`
grep
STDIO_F_CLOSE_END_TIMESTAMP
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt |
cut
-f
5
`
if
[
!
$(
echo
"
$STDIO_F_CLOSE_END_TIMESTAMP
> 0"
| bc
-l
)
]
;
then
echo
"Error: counter is incorrect"
1>&2
exit
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment