[PATCH] tests: (lsfd::column-xmode) ignore "rwx" mappings

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

 



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@xxxxxxxxxx>
---
 tests/ts/lsfd/column-xmode | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ts/lsfd/column-xmode b/tests/ts/lsfd/column-xmode
index 7fea4b0ec..dd8539837 100755
--- a/tests/ts/lsfd/column-xmode
+++ b/tests/ts/lsfd/column-xmode
@@ -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"
-- 
2.41.0




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux