Patch "selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change" has been added to the 6.3-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change

to the 6.3-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-gpio-gpio-sim-fix-bug-test-failed-due-to-r.patch
and it can be found in the queue-6.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a514250f4fffd7a25f79d1cedd2f0877569967ba
Author: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
Date:   Tue Apr 11 20:15:20 2023 +0300

    selftests: gpio: gpio-sim: Fix BUG: test FAILED due to recent change
    
    [ Upstream commit 976d3c6778e99390c6d854d140b746d12ea18a51 ]
    
    According to Mirsad the gpio-sim.sh test appears to FAIL in a wrong way
    due to missing initialisation of shell variables:
    
     4.2. Bias settings work correctly
     cat: /sys/devices/platform/gpio-sim.0/gpiochip18/sim_gpio0/value: No such file or directory
     ./gpio-sim.sh: line 393: test: =: unary operator expected
     bias setting does not work
     GPIO gpio-sim test FAIL
    
    After this change the test passed:
    
     4.2. Bias settings work correctly
     GPIO gpio-sim test PASS
    
    His testing environment is AlmaLinux 8.7 on Lenovo desktop box with
    the latest Linux kernel based on v6.2:
    
      Linux 6.2.0-mglru-kmlk-andy-09238-gd2980d8d8265 x86_64
    
    Suggested-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
    Tested-by: Mirsad Goran Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
    Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@xxxxxxxxxxxx>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/gpio/gpio-sim.sh b/tools/testing/selftests/gpio/gpio-sim.sh
index 9f539d454ee4d..fa2ce2b9dd5fc 100755
--- a/tools/testing/selftests/gpio/gpio-sim.sh
+++ b/tools/testing/selftests/gpio/gpio-sim.sh
@@ -389,6 +389,9 @@ create_chip chip
 create_bank chip bank
 set_num_lines chip bank 8
 enable_chip chip
+DEVNAME=`configfs_dev_name chip`
+CHIPNAME=`configfs_chip_name chip bank`
+SYSFS_PATH="/sys/devices/platform/$DEVNAME/$CHIPNAME/sim_gpio0/value"
 $BASE_DIR/gpio-mockup-cdev -b pull-up /dev/`configfs_chip_name chip bank` 0
 test `cat $SYSFS_PATH` = "1" || fail "bias setting does not work"
 remove_chip chip



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux