diff options
| author | Cheng-Han Wu <hank20010209@gmail.com> | 2026-06-07 17:57:32 +0800 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2026-07-30 07:55:37 -0600 |
| commit | 649ba27dfac784427a01f9c95c09ecbcb88900d8 (patch) | |
| tree | 6e214da956b8347ea573e5fced6e8a59a3384640 /drivers/media/platform/amd/isp4/git@git.tavy.me:linux.git | |
| parent | 20f01a5565ce79923b75a2ac8e8ef2a1d7adf517 (diff) | |
selftests/zram: fix kernel_gte() for POSIX sh
Commit fc4eb486a59d ("selftests/zram: Skip max_comp_streams
interface on newer kernel") added kernel_gte() to zram_lib.sh.
The function uses the bash-specific [[ ... ]] conditional, but
zram selftests source this file while running under /bin/sh.
On systems where /bin/sh is dash, such as Debian, the following
test fails:
dash -c '
kernel_major=6; kernel_minor=1; major=6; minor=0
if [ $kernel_major -gt $major ]; then
echo ok
elif [[ $kernel_major -eq $major && $kernel_minor -ge $minor ]]; then
echo ok
fi'
with:
dash: 5: [[: not found
Use separate POSIX test expressions joined by && instead.
Fixes: fc4eb486a59d ("selftests/zram: Skip max_comp_streams interface on newer kernel")
Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'drivers/media/platform/amd/isp4/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
