FILE
rv_wwnr_printk.tc
File preview with syntax highlighting.
linux-6.19.14/tools/testing/selftests/verification/test.d/rv_wwnr_printk.tc
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# description: Test wwnr monitor with printk reactor 4# requires: available_reactors wwnr:monitor printk:reactor stress-ng:program 5 6load() { # returns true if there was a reaction 7 local lines_before num 8 num=$((($(nproc) + 1) / 2)) 9 lines_before=$(dmesg | wc -l) 10 stress-ng --cpu-sched "$num" --timer "$num" -t 5 -q 11 dmesg | tail -n $((lines_before + 1)) | grep -q "rv: monitor wwnr does not allow event" 12} 13 14echo 1 > monitors/wwnr/enable 15echo printk > monitors/wwnr/reactors 16 17load 18 19echo 0 > monitoring_on 20! load 21echo 1 > monitoring_on 22 23load 24 25echo 0 > reacting_on 26! load 27echo 1 > reacting_on 28 29echo nop > monitors/wwnr/reactors 30echo 0 > monitors/wwnr/enable
~/
Read-only file preview.