]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (test) test POS column
authorMasatake YAMATO <yamato@redhat.com>
Thu, 14 Oct 2021 13:55:28 +0000 (22:55 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Thu, 21 Oct 2021 12:06:39 +0000 (21:06 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/expected/lsfd/mkfds-ro-regular-file
tests/ts/lsfd/mkfds-ro-regular-file

index 024e8060e9f755c252f96b17f034cad9b06f96ec..bcbfc352ee3fcfab0de61de99ee426379e634aa6 100644 (file)
@@ -1,5 +1,5 @@
-    3  r--  REG /etc/passwd
-ASSOC,MODE,TYPE,NAME: 0
+    3  r--  REG /etc/passwd   1
+ASSOC,MODE,TYPE,NAME,POS: 0
 PID[RUN]: 0
 PID[STR]: 0
 INODE[RUN]: 0
index 5c4a843c5d5552b5064fadc87d9a4907537bdb38..3340b0e106ed7430374eaa1ee61b029d23e11d9c 100755 (executable)
@@ -33,11 +33,11 @@ FD=3
 EXPR=
 
 {
-    coproc MKFDS { "$TS_HELPER_MKFDS" ro-regular-file $FD; }
+    coproc MKFDS { "$TS_HELPER_MKFDS" ro-regular-file $FD offset=1; }
     if read -u ${MKFDS[0]} PID; then
        EXPR='(PID == '"${PID}"') and (FD == '"$FD"')'
-       ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,NAME -Q "${EXPR}"
-       echo 'ASSOC,MODE,TYPE,NAME': $?
+       ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,NAME,POS -Q "${EXPR}"
+       echo 'ASSOC,MODE,TYPE,NAME,POS': $?
 
        LSFD_PID=$(${TS_CMD_LSFD} --raw -n -o PID -Q "${EXPR}")
        echo 'PID[RUN]:' $?