[LU-17009] runtests failed to read file name with backslash Created: 02/Aug/23  Updated: 31/Aug/23  Resolved: 31/Aug/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.16.0, Lustre 2.15.4
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

If a file in /etc dir has a name with backslash, then runtests will fail because the following codes read the file considering the backslash as an escape character:

        cat $findfiles | tr "\0" "\n" | ( rc=0; while read f; do
                diff -q "$f" "$dst/$f" || rc=18
        done

We need to add "-r" option to read:

-r     Backslash does not act as an escape character.  The backslash is considered to be part of the line.  In particular, a backslash-newline pair may not then be used as a line continuation.


 Comments   
Comment by Gerrit Updater [ 02/Aug/23 ]

"Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51847
Subject: LU-17009 tests: fix runtests to read file name with backslash
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 14044bdfe5fa600bd2c2339032ae8bb54e24b5fb

Comment by Gerrit Updater [ 31/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51847/
Subject: LU-17009 tests: fix runtests to read file name with backslash
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 77b133766bb5a44313cef19db695ba468eeb5572

Comment by Peter Jones [ 31/Aug/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:31:51 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.