[LU-12760] sanity test_161d incorrect use of stack_trap Created: 13/Sep/19  Updated: 12/Dec/19  Resolved: 09/Oct/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0
Fix Version/s: Lustre 2.13.0, Lustre 2.12.4

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

stack_trap uses two arguments, the second being the signal to trap.

Yes test_161d has this:

        stack_trap "rm -f $tempfile"

the end result is this:

== sanity test 161d: create with concurrent .lustre/fid access ======================================= 07:42:56 (1568374976)
mdd.lustre-MDT0000.changelog_mask=+hsm
Registered 1 changelog users: 'cl13'
fail_loc=0x8000140c
fail_val=5
  PID TTY          TIME CMD
  490 pts/0    00:00:00 bash
/home/green/git/lustre-release/lustre/tests/test-framework.sh: line 6086: trap: : invalid signal specification
/home/green/git/lustre-release/lustre/tests/test-framework.sh: line 6093: trap: : invalid signal specification
/home/green/git/lustre-release/lustre/tests/test-framework.sh: line 6094: trap: : invalid signal specification
/home/green/git/lustre-release/lustre/tests/test-framework.sh: line 6095: trap: : invalid signal specification
/home/green/git/lustre-release/lustre/tests/test-framework.sh: eval: line 6099: unexpected EOF while looking for matching `''
/home/green/git/lustre-release/lustre/tests/test-framework.sh: eval: line 6100: syntax error: unexpected end of file

sohuld add EXIT to the the end of stack_trap call.



 Comments   
Comment by Andreas Dilger [ 14/Sep/19 ]

I'd rather that the default signalspec was EXIT, since that seems to be the only signal that we use anyway:

stack_trap()
{       
        local arg="$1"
        local sigspec="${2:-EXIT}"

That way it would only need to be specified if it was some other signal.

Comment by Gerrit Updater [ 14/Sep/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36186
Subject: LU-12760 tests: stack_trap defaults to sigspec=EXIT
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 567a1ff65de6dad06c3f9bde52542c980b2fd48f

Comment by Gerrit Updater [ 09/Oct/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36186/
Subject: LU-12760 tests: stack_trap defaults to sigspec=EXIT
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5a911faae25784a91fc085debeb6dbe8512d80b6

Comment by Peter Jones [ 09/Oct/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 05/Dec/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/36938
Subject: LU-12760 tests: stack_trap defaults to sigspec=EXIT
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: a85a6c73a51c158b695697d71eaeb88ef12d633c

Comment by Gerrit Updater [ 12/Dec/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36938/
Subject: LU-12760 tests: stack_trap defaults to sigspec=EXIT
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 517c08e2e83eaf14ecf03eb593246fb2e408bf69

Generated at Sat Feb 10 02:55:24 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.