@@ -24,3 +24,32 @@ bz2dev: rpmdirs
2424
2525rpmdev : bz2dev rpmdirs
2626 rpmbuild -ba --define " _topdir $( PWD) /rpm" rpm/SPECS/$(PACKAGE ) .spec
27+
28+
29+ build :
30+ python setup.py build
31+
32+ # Need to set PYTHONPATH appropriately when invoking this
33+ test :
34+ python tests/parse_ifconfig.py -v
35+ python -m unittest discover -v
36+ valgrind --leak-check=full python tests/test_ethtool.py
37+
38+ # As of 5f6339c432dc227e456b70c459cf6f57c6cfe7c2 I (dmalcolm) hope to have
39+ # fixed the memory leaks within python-ethtool itself, but I expect
40+ # to see a few blocks lost within libnl which appear to be caches,
41+ # and thus (presumably) false positives:
42+ # ==9163== 4,600 (80 direct, 4,520 indirect) bytes in 2 blocks are definitely lost in loss record 2,559 of 2,612
43+ # ==9163== at 0x4C26F18: calloc (vg_replace_malloc.c:566)
44+ # ==9163== by 0x1152C307: nl_cache_alloc (in /usr/lib64/libnl.so.1.1)
45+ # ==9163== by 0x115309FC: rtnl_link_alloc_cache (in /usr/lib64/libnl.so.1.1)
46+ # ==9163== by 0x1130C843: get_etherinfo (etherinfo.c:315)
47+ # ==9163== by 0x1130CFD0: _ethtool_etherinfo_getter (etherinfo_obj.c:152)
48+ # ==9163== by 0x4F07E90: PyEval_EvalFrameEx (ceval.c:2330)
49+ # ...etc...
50+ # ==9163== LEAK SUMMARY:
51+ # ==9163== definitely lost: 160 bytes in 4 blocks
52+ # ==9163== indirectly lost: 9,040 bytes in 60 blocks
53+ # ==9163== possibly lost: 489,676 bytes in 3,299 blocks
54+ # ==9163== still reachable: 1,277,848 bytes in 11,100 blocks
55+ # ==9163== suppressed: 0 bytes in 0 blocks
0 commit comments