In order to avoid the following stderr:
==> /tmp/stderr <== dmesg: read kernel buffer failed: Operation not permitted
Signed-off-by: Lin Jiaxin ljx.joe@qq.com --- monitors/kmsg | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/monitors/kmsg b/monitors/kmsg index 4edd90a9..a1cf7121 100755 --- a/monitors/kmsg +++ b/monitors/kmsg @@ -6,6 +6,8 @@ # serial console has better availability. is_virt && [ -z "$LKP_LOCAL_RUN" ] && exec > /dev/ttyS1
+[ -f /.dockerenv ] && exit 0 + if dmesg --help 2>&1 | grep -q -- --follow; then exec dmesg --follow --decode else
On Tue, Mar 30, 2021 at 02:24:12PM +0800, Lin Jiaxin wrote:
In order to avoid the following stderr:
==> /tmp/stderr <== dmesg: read kernel buffer failed: Operation not permitted
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
monitors/kmsg | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/monitors/kmsg b/monitors/kmsg index 4edd90a9..a1cf7121 100755 --- a/monitors/kmsg +++ b/monitors/kmsg @@ -6,6 +6,8 @@
Reviewed-by: Wang Yong wangyong0117@qq.com
# serial console has better availability. is_virt && [ -z "$LKP_LOCAL_RUN" ] && exec > /dev/ttyS1
+[ -f /.dockerenv ] && exit 0
if dmesg --help 2>&1 | grep -q -- --follow; then exec dmesg --follow --decode else -- 2.23.0