Skip to content

Commit 297dc37

Browse files
warthog618Bartosz Golaszewski
authored andcommitted
selftest: gpio: remove obsolete gpio-mockup test
With the removal of the ARCH_NR_GPIOS, the number of available GPIOs is effectively unlimited, causing the gpio-mockup module load failure test that overflowed the number of GPIOs to unexpectedly succeed, and so fail. The test is no longer relevant so remove it. Promote the "no lines defined" test so there is still one load failure test in the basic set. Fixes: 7b61212 ("gpiolib: Get rid of ARCH_NR_GPIOS") Reported-by: Pengfei Xu <[email protected]> Reported-by: Yi Lai <[email protected]> Closes: https://lore.kernel.org/linux-gpio/[email protected]/ Signed-off-by: Kent Gibson <[email protected]> Acked-by: Christophe Leroy <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 8ae438f commit 297dc37

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tools/testing/selftests/gpio/gpio-mockup.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,10 @@ if [ "$full_test" ]; then
377377
insmod_test "0,32,32,44,-1,22,-1,31" 32 12 22 31
378378
fi
379379
echo "2. Module load error tests"
380-
echo "2.1 gpio overflow"
381-
# Currently: The max number of gpio(1024) is defined in arm architecture.
382-
insmod_test "-1,1024"
380+
echo "2.1 no lines defined"
381+
insmod_test "0,0"
383382
if [ "$full_test" ]; then
384-
echo "2.2 no lines defined"
385-
insmod_test "0,0"
386-
echo "2.3 ignore range overlap"
383+
echo "2.2 ignore range overlap"
387384
insmod_test "0,32,0,1" 32
388385
insmod_test "0,32,1,5" 32
389386
insmod_test "0,32,30,35" 32

0 commit comments

Comments
 (0)