From: Masatake YAMATO Date: Fri, 4 Feb 2022 17:40:10 +0000 (+0900) Subject: tests: (lsfd) delete "largefile" flag in the output before the comparison X-Git-Tag: v2.38-rc2~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5fd69c9b3f7c028693f10d64fa4fe65d3b2651;p=thirdparty%2Futil-linux.git tests: (lsfd) delete "largefile" flag in the output before the comparison The original code didn't considered that syscalls opening a directory on mips64 GNU/Linux took O_LARGEFILE flag. This misconsideration made the mkfds-directory test FAILED as reported in https://github.com/util-linux/util-linux/issues/1511#issuecomment-1029968595. Reported-by: Anatoly Pugachev Signed-off-by: Masatake YAMATO --- diff --git a/tests/ts/lsfd/mkfds-directory b/tests/ts/lsfd/mkfds-directory index 93b302523a..cae5f2ab23 100755 --- a/tests/ts/lsfd/mkfds-directory +++ b/tests/ts/lsfd/mkfds-directory @@ -25,6 +25,7 @@ ts_check_test_command "$TS_HELPER_MKFDS" ts_check_prog "stat" ts_check_prog "id" +ts_check_prog "sed" ts_cd "$TS_OUTDIR" @@ -36,7 +37,16 @@ EXPR= coproc MKFDS { "$TS_HELPER_MKFDS" directory $FD; } if read -u ${MKFDS[0]} PID; then EXPR='(PID == '"${PID}"') and (FD == '"$FD"')' - ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "${EXPR}" + ${TS_CMD_LSFD} -n -o ASSOC,MODE,TYPE,FLAGS,NAME -Q "${EXPR}" | { + # + # Normalize the output: + # + # See https://github.com/util-linux/util-linux/issues/1511#issuecomment-1029968595 + # It seems that syscalls opening a directory on mips64 GNU/Linux take the + # O_LARGEFILE flag. + # + sed -e 's/largefile,\|,largefile//' + } echo 'ASSOC,MODE,TYPE,FLAGS,NAME': $? LSFD_PID=$(${TS_CMD_LSFD} --raw -n -o PID -Q "${EXPR}")