mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
selftests: helpers: handle multi line in test_sysfs_prop_optional_list
Modify test_sysfs_prop_optional_list to allow multi line parameters, in
order to comply with checkpatch output that limit line by 100 chars.
Allow use cases like:
test_sysfs_prop_optional_list \
property_name "value1","value2","val3","very_long_option"\
,"extra_long_option" \
,"even_more_data"
Signed-off-by: Boris Shtrasman <borissh1983@gmail.com>
Link: https://patch.msgid.link/20260625160556.54830-2-borissh1983@gmail.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
380f91cdbd
commit
5ec27fa6b9
|
|
@ -108,7 +108,7 @@ test_sysfs_prop_optional_range() {
|
|||
|
||||
test_sysfs_prop_optional_list() {
|
||||
PROP=$1
|
||||
LIST=$2
|
||||
shift
|
||||
|
||||
TEST_NAME="$DEVNAME".sysfs."$PROP"
|
||||
|
||||
|
|
@ -118,9 +118,9 @@ test_sysfs_prop_optional_list() {
|
|||
valid=0
|
||||
|
||||
OLDIFS=$IFS
|
||||
IFS=","
|
||||
for item in $LIST; do
|
||||
if [ "$DATA" = "$item" ]; then
|
||||
IFS=",$IFS"
|
||||
for item in $*; do
|
||||
if [ "$item" ] && [ "$DATA" = "$item" ]; then
|
||||
valid=1
|
||||
break
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user