Skip to content

Commit

Permalink
[test][bionic] Force python3 and utf-8 encoding
Browse files Browse the repository at this point in the history
bionic's /usr/bin/python is python2. Encoding and python2/python3 is.... complicated.
Those tests already run on py3 which is the default for Ubuntu Focal and Fedora 34.

This change symlinks /usr/local/bin/python to python3 within the Bionic container
and changes all tools to use "#!/usr/bin/env python" shebang instead of "#!/usr/bin/python"
which allows to use the default python set by the environment.

To add insult to injury. Python 3.6 still needs a bit of help to default to UTF-8
which can be achieved with the env var `PYTHONIOENCODING` to `utf-8`.
Since python 3.7, [UTF-8 mode is enabled by default when the locale is C or POSIX](https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep540).
Some more details about this problem can be found here: https://vstinner.github.io/posix-locale.html#misconfigured-locales-in-docker-images

Illustration:
```
root@bionic:/# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
root@bionic:/# python2
Python 2.7.17 (default, Jul  1 2022, 15:56:32)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("%s" % u'\xb7')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 0: ordinal not in range(128)
>>>
root@bionic:/# python3
Python 3.6.9 (default, Jun 29 2022, 11:45:57)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("%s" % u'\xb7')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character '\xb7' in position 0: ordinal not in range(128)
>>>
root@bionic:/# PYTHONIOENCODING=utf-8 python3
Python 3.6.9 (default, Jun 29 2022, 11:45:57)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("%s" % u'\xb7')
·
```

On Focal:
```
root@focal:/# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
root@focal:/# python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("%s" % u'\xb7')
·
```
  • Loading branch information
chantra committed Aug 14, 2022
1 parent 1a3f8c2 commit 3f5e402
Show file tree
Hide file tree
Showing 98 changed files with 101 additions and 99 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile.tests
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ RUN wget -O ruby-install-0.7.0.tar.gz \

RUN ruby-install --system ruby 2.6.0 -- --enable-dtrace
RUN if [ ! -f "/usr/bin/python" ]; then ln -s /bin/python3 /usr/bin/python; fi
RUN if [ ! -f "/usr/local/bin/python" ]; then ln -s /usr/bin/python3 /usr/local/bin/python; fi
7 changes: 4 additions & 3 deletions tests/wrapper.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ kind=$1; shift
cmd=$1; shift

PYTHONPATH=@CMAKE_BINARY_DIR@/src/python/bcc-python3
PYTHONIOENCODING=utf-8
LD_LIBRARY_PATH=@CMAKE_BINARY_DIR@:@CMAKE_BINARY_DIR@/src/cc

ns=$name
Expand All @@ -32,15 +33,15 @@ function ns_run() {
sudo ip netns exec $ns ethtool -K eth0 tx off
sudo ip addr add dev $ns.out 172.16.1.1/24
sudo ip link set $ns.out up
sudo --preserve-env=PYTHON_TEST_LOGFILE env PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH ip netns exec $ns $cmd "$@"
sudo --preserve-env=PYTHON_TEST_LOGFILE env PYTHONIOENCODING=$PYTHONIOENCODING PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH ip netns exec $ns $cmd "$@"
return $?
}
function sudo_run() {
sudo --preserve-env=PYTHON_TEST_LOGFILE env PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH $cmd "$@"
sudo --preserve-env=PYTHON_TEST_LOGFILE env PYTHONIOENCODING=$PYTHONIOENCODING PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH $cmd "$@"
return $?
}
function simple_run() {
PYTHONPATH=$PYTHONPATH PYTHON_TEST_LOGFILE=$PYTHON_TEST_LOGFILE LD_LIBRARY_PATH=$LD_LIBRARY_PATH $cmd "$@"
PYTHONIOENCODING=$PYTHONIOENCODING PYTHONPATH=$PYTHONPATH PYTHON_TEST_LOGFILE=$PYTHON_TEST_LOGFILE LD_LIBRARY_PATH=$LD_LIBRARY_PATH $cmd "$@"
return $?
}

Expand Down
2 changes: 1 addition & 1 deletion tools/argdist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# argdist Trace a function and display a distribution of its
# parameter values as a histogram or frequency count.
Expand Down
2 changes: 1 addition & 1 deletion tools/bashreadline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# bashreadline Print entered bash commands from all running shells.
# For Linux, uses BCC, eBPF. Embedded C.
Expand Down
2 changes: 1 addition & 1 deletion tools/bindsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# bindsnoop Trace IPv4 and IPv6 binds()s.
# For Linux, uses BCC, eBPF. Embedded C.
Expand Down
2 changes: 1 addition & 1 deletion tools/biolatency.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# biolatency Summarize block device I/O latency as a histogram.
Expand Down
2 changes: 1 addition & 1 deletion tools/biolatpcts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# biolatpcts.py Monitor IO latency distribution of a block device.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/biopattern.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# biopattern - Identify random/sequential disk access patterns.
Expand Down
2 changes: 1 addition & 1 deletion tools/biosnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# biosnoop Trace block device I/O and print details including issuing PID.
Expand Down
2 changes: 1 addition & 1 deletion tools/biotop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# biotop block device (disk) I/O by process.
Expand Down
2 changes: 1 addition & 1 deletion tools/bitesize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# bitehist.py Block I/O size histogram.
# For Linux, uses BCC, eBPF. See .c file.
Expand Down
2 changes: 1 addition & 1 deletion tools/bpflist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# bpflist Display processes currently using BPF programs and maps,
# pinned BPF programs and maps, and enabled probes.
Expand Down
2 changes: 1 addition & 1 deletion tools/btrfsdist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# btrfsdist Summarize btrfs operation latency.
Expand Down
2 changes: 1 addition & 1 deletion tools/btrfsslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# btrfsslower Trace slow btrfs operations.
Expand Down
2 changes: 1 addition & 1 deletion tools/cachestat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# cachestat Count cache kernel function calls.
# For Linux, uses BCC, eBPF. See .c file.
Expand Down
2 changes: 1 addition & 1 deletion tools/cachetop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# cachetop Count cache kernel function calls per processes
Expand Down
2 changes: 1 addition & 1 deletion tools/capable.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# capable Trace security capabilitiy checks (cap_capable()).
Expand Down
2 changes: 1 addition & 1 deletion tools/compactsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# compactsnoop Trace compact zone and print details including issuing PID.
Expand Down
2 changes: 1 addition & 1 deletion tools/cpudist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# cpudist Summarize on- and off-CPU time per task as a histogram.
Expand Down
2 changes: 1 addition & 1 deletion tools/cpuunclaimed.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# cpuunclaimed Sample CPU run queues and calculate unclaimed idle CPU.
Expand Down
2 changes: 1 addition & 1 deletion tools/criticalstat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# criticalstat Trace long critical sections (IRQs or preemption disabled)
Expand Down
2 changes: 1 addition & 1 deletion tools/dbslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# dbslower Trace MySQL and PostgreSQL queries slower than a threshold.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/dbstat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# dbstat Display a histogram of MySQL and PostgreSQL query latencies.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/dcsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# dcsnoop Trace directory entry cache (dcache) lookups.
Expand Down
2 changes: 1 addition & 1 deletion tools/dcstat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# dcstat Directory entry cache (dcache) stats.
Expand Down
2 changes: 1 addition & 1 deletion tools/deadlock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# deadlock Detects potential deadlocks (lock order inversions)
# on a running process. For Linux, uses BCC, eBPF.
Expand Down
2 changes: 1 addition & 1 deletion tools/dirtop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# dirtop file reads and writes by directory.
Expand Down
2 changes: 1 addition & 1 deletion tools/drsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# drsnoop Trace direct reclaim and print details including issuing PID.
Expand Down
2 changes: 1 addition & 1 deletion tools/execsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# execsnoop Trace new processes via exec() syscalls.
Expand Down
2 changes: 1 addition & 1 deletion tools/exitsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
from __future__ import print_function

Expand Down
2 changes: 1 addition & 1 deletion tools/ext4dist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# ext4dist Summarize ext4 operation latency.
Expand Down
2 changes: 1 addition & 1 deletion tools/ext4slower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# ext4slower Trace slow ext4 operations.
Expand Down
2 changes: 1 addition & 1 deletion tools/filelife.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# filelife Trace the lifespan of short-lived files.
Expand Down
2 changes: 1 addition & 1 deletion tools/fileslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# fileslower Trace slow synchronous file reads and writes.
Expand Down
2 changes: 1 addition & 1 deletion tools/filetop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# filetop file reads and writes by process.
Expand Down
2 changes: 1 addition & 1 deletion tools/funccount.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# funccount Count functions, tracepoints, and USDT probes.
Expand Down
2 changes: 1 addition & 1 deletion tools/funcinterval.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# funcinterval Time interval between the same function, tracepoint
Expand Down
2 changes: 1 addition & 1 deletion tools/funclatency.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# funclatency Time functions and print latency as a histogram.
Expand Down
2 changes: 1 addition & 1 deletion tools/funcslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# funcslower Trace slow kernel or user function calls.
Expand Down
2 changes: 1 addition & 1 deletion tools/gethostlatency.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# gethostlatency Show latency for getaddrinfo/gethostbyname[2] calls.
# For Linux, uses BCC, eBPF. Embedded C.
Expand Down
2 changes: 1 addition & 1 deletion tools/hardirqs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# hardirqs Summarize hard IRQ (interrupt) event time.
Expand Down
2 changes: 1 addition & 1 deletion tools/inject.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# This script generates a BPF program with structure inspired by trace.py. The
# generated program operates on PID-indexed stacks. Generally speaking,
Expand Down
2 changes: 1 addition & 1 deletion tools/killsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# killsnoop Trace signals issued by the kill() syscall.
Expand Down
2 changes: 1 addition & 1 deletion tools/klockstat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# klockstat traces lock events and display locks statistics.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/llcstat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# llcstat.py Summarize cache references and cache misses by PID.
# Cache reference and cache miss are corresponding events defined in
Expand Down
2 changes: 1 addition & 1 deletion tools/mdflush.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# mdflush Trace md flush events.
Expand Down
2 changes: 1 addition & 1 deletion tools/memleak.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# memleak Trace and display outstanding allocations to detect
# memory leaks in user-mode processes and the kernel.
Expand Down
2 changes: 1 addition & 1 deletion tools/mountsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# mountsnoop Trace mount() and umount syscalls.
# For Linux, uses BCC, eBPF. Embedded C.
Expand Down
2 changes: 1 addition & 1 deletion tools/mysqld_qslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# mysqld_qslower MySQL server queries slower than a threshold.
# For Linux, uses BCC, BPF. Embedded C.
Expand Down
2 changes: 1 addition & 1 deletion tools/netqtop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python

from __future__ import print_function
from bcc import BPF
Expand Down
2 changes: 1 addition & 1 deletion tools/nfsdist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# nfsdist Summarize NFS operation latency
Expand Down
2 changes: 1 addition & 1 deletion tools/nfsslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# nfsslower Trace slow NFS operations
Expand Down
2 changes: 1 addition & 1 deletion tools/offcputime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# offcputime Summarize off-CPU time by stack trace
# For Linux, uses BCC, eBPF.
Expand Down
2 changes: 1 addition & 1 deletion tools/offwaketime.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# offwaketime Summarize blocked time by kernel off-CPU stack + waker stack
# For Linux, uses BCC, eBPF.
Expand Down
2 changes: 1 addition & 1 deletion tools/oomkill.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
# oomkill Trace oom_kill_process(). For Linux, uses BCC, eBPF.
#
Expand Down
2 changes: 1 addition & 1 deletion tools/opensnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# opensnoop Trace open() syscalls.
Expand Down
2 changes: 1 addition & 1 deletion tools/pidpersec.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# pidpersec Count new processes (via fork).
Expand Down
2 changes: 1 addition & 1 deletion tools/profile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# profile Profile CPU usage by sampling stack traces at a timed interval.
Expand Down
2 changes: 1 addition & 1 deletion tools/readahead.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# readahead Show performance of read-ahead cache
Expand Down
2 changes: 1 addition & 1 deletion tools/runqlat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# runqlat Run queue (scheduler) latency as a histogram.
Expand Down
2 changes: 1 addition & 1 deletion tools/runqlen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# runqlen Summarize scheduler run queue length as a histogram.
Expand Down
2 changes: 1 addition & 1 deletion tools/runqslower.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# runqslower Trace long process scheduling delays.
Expand Down
2 changes: 1 addition & 1 deletion tools/shmsnoop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
# @lint-avoid-python-3-compatibility-imports
#
# shmsnoop Trace shm*() syscalls.
Expand Down
Loading

0 comments on commit 3f5e402

Please sign in to comment.