Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test][python] Clear deprecation warnings
Strings were used in place of byte-arrays in many places. While this worked, this is causing a lot of Deprecation warnings. Eventually, this deprecation warning will become and error, so we may as well get ahead of time, but on a more practical side, this is causing a lot of noise in test run logs, making it more complicated to troubleshoot potential failures... This diff cleans this for the most part. Other smaller fix will be added on top to address other deprecation warnings. Before: ``` $ docker run -ti \ --privileged \ --network=host \ --pid=host \ -v $(pwd):/bcc \ -v /sys/kernel/debug:/sys/kernel/debug:rw \ -v /lib/modules:/lib/modules:ro \ -v /usr/src:/usr/src:ro \ -e CTEST_OUTPUT_ON_FAILURE=1 \ bcc-docker-f34 /bin/bash -c \ 'cd /bcc/build && \ make test PYTHON_TEST_LOGFILE=critical.before.log ARGS=-V' 2> /tmp/err.before.log > /tmp/out.before.log ``` Resulted in critical.before.log: https://gist.github.com/chantra/55b577cbccff8ef77af427342fac6dce out.before.log: https://gist.github.com/chantra/35889f6d089ed5e06b3bfa920e066e0b err.before.log (empty) After: ``` docker run -ti \ --privileged \ --network=host \ --pid=host \ -v $(pwd):/bcc \ -v /sys/kernel/debug:/sys/kernel/debug:rw \ -v /lib/modules:/lib/modules:ro \ -v /usr/src:/usr/src:ro \ -e CTEST_OUTPUT_ON_FAILURE=1 \ bcc-docker-f34 /bin/bash -c \ 'cd /bcc/build && \ make test PYTHON_TEST_LOGFILE=critical.after.log ARGS=-V' 2> /tmp/err.after.log > /tmp/out.after.log ``` critical.after.log: https://gist.github.com/chantra/04955b8cfdfb80cc1c23720f659b7b46 out.after.log: https://gist.github.com/chantra/968b7324fbb10490fcb4b3a1d1bf5a28 err.after.log (empty) Count of DeprecationWarning: ``` $ grep -c Deprecation /tmp/out.*.log /tmp/out.after.log:0 /tmp/out.before.log:337 ``` Diff between critical.{before,after}.llog https://gist.github.com/chantra/3a890e90aac160f1dbcb6a90ae8fe33d e.g `test_brb2` seem to have actually failed later then before this diff.
- Loading branch information