[Darshan-commits] [Git][darshan/darshan][master] 2 commits: TST: add DXT testing to pydarshan
Shane Snyder
xgitlab at cels.anl.gov
Tue May 11 16:01:17 CDT 2021
Shane Snyder pushed to branch master at darshan / darshan
Commits:
c877e9b2 by Tyler Reddy at 2021-04-22T10:48:18-06:00
TST: add DXT testing to pydarshan
* there is currently not a single DXT-enabled test
file in the `pydarshan` test suite; so, add a small
`6.5K` sample DXT-enabled darshan log file along with
a regression test
- - - - -
1a6fdd9f by Shane Snyder at 2021-05-11T16:01:15-05:00
Merge branch 'treddy_test_dxt_simple' into 'master'
TST: add DXT testing to pydarshan
See merge request darshan/darshan!105
- - - - -
2 changed files:
- + darshan-util/pydarshan/tests/input/sample-dxt-simple.darshan
- + darshan-util/pydarshan/tests/test_moddxt.py
Changes:
=====================================
darshan-util/pydarshan/tests/input/sample-dxt-simple.darshan
=====================================
Binary files /dev/null and b/darshan-util/pydarshan/tests/input/sample-dxt-simple.darshan differ
=====================================
darshan-util/pydarshan/tests/test_moddxt.py
=====================================
@@ -0,0 +1,38 @@
+import os
+
+import pytest
+import darshan.backend.cffi_backend as backend
+
+ at pytest.mark.parametrize("logfile", [
+ # an incredibly simple darshan DXT trace
+ # of a small sample C MPI-IO program from
+ # https://wgropp.cs.illinois.edu/courses/cs598-s15/lectures/lecture32.pdf
+ "sample-dxt-simple.darshan",
+ ])
+ at pytest.mark.parametrize("mod, expected_dict", [
+ ('DXT_POSIX', {'id': 14388265063268455899,
+ 'rank': 0,
+ 'hostname': 'sn176.localdomain',
+ 'write_count': 1,
+ 'read_count': 0,
+ 'write_segments': [{'offset': 0,
+ 'length': 40,
+ 'start_time': 0.10337884305045009,
+ 'end_time': 0.10338771319948137}],
+ 'read_segments': []}),
+ ('DXT_MPIIO', {'id': 9457796068806373448,
+ 'rank': 0,
+ 'hostname': 'sn176.localdomain',
+ 'write_count': 1,
+ 'read_count': 0,
+ 'write_segments': [{'offset': 0,
+ 'length': 4000,
+ 'start_time': 0.10368914622813463,
+ 'end_time': 0.1053433942142874}],
+ 'read_segments': []})])
+def test_dxt_records(logfile, mod, expected_dict):
+ # regression guard for DXT records values
+ logfile = os.path.join("tests/input", logfile)
+ log = backend.log_open(logfile)
+ rec = backend.log_get_record(log, mod)
+ assert rec == expected_dict
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/da63fe1abb47c51da5d119ecbe1851e3a05d28f1...1a6fdd9fed9bc6584110e13e86183cd5598a575f
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/da63fe1abb47c51da5d119ecbe1851e3a05d28f1...1a6fdd9fed9bc6584110e13e86183cd5598a575f
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20210511/af26f0bb/attachment-0001.html>
More information about the Darshan-commits
mailing list