]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (lsfd::column-xmode) ignore "rwx" mappings
authorMasatake YAMATO <yamato@redhat.com>
Tue, 14 Nov 2023 02:21:22 +0000 (11:21 +0900)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Nov 2023 08:06:03 +0000 (09:06 +0100)
This change fixes the issue about lsfd reported in
https://marc.info/?l=util-linux-ng&m=169972678725084&w=2

column-xmode test case assumes an executable file has only
one "x" mapping like:

    % pmap $$ | grep ${SHELL##*/}
    1292343:   zsh
    0000562386c1c000     92K r---- zsh
    0000562386c33000    716K r-x-- zsh <<
    0000562386ce6000     88K r---- zsh
    0000562386cfc000      8K r---- zsh
    0000562386cfe000     24K rw--- zsh

However, this assumption is wrong on Sparc64:

    % pmap $$
    1490470:   zsh
    0000010000000000    792K r-x-- zsh <<
    00000100001fe000      8K r---- zsh
    0000010000200000     32K rwx-- zsh <<

Two "x" mappings are found.
As a result, the original test case failed.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
tests/ts/lsfd/column-xmode

index 7fea4b0ecf11c203e20a557258dbb88e17138375..dd8539837ee221473f52ff016768f3f7681d0bdf 100755 (executable)
@@ -82,7 +82,7 @@ ts_init_subtest "XMODE-w-bit"
 wait "${MKFDS_PID}"
 ts_finalize_subtest
 
-EXPR='(ASSOC == "mem") and (INODE == '"$INO"') and (MODE != "r--") and (MODE != "rw-")'
+EXPR='(ASSOC == "mem") and (INODE == '"$INO"') and (MODE != "r--") and (MODE != "rw-") and (MODE != "rwx")'
 ts_init_subtest "MODE-x-bit"
 if [ "$QEMU_USER" == "1" ]; then
     ts_skip_subtest "running under qemu-user emulation"