Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #30002

Closed (moved)
Open
Opened Apr 03, 2019 by rl1987@rl1987

shellcheck: test_key_expiration.sh issues


In src/test/test_key_expiration.sh line 9:
if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then
                          ^--^ SC2086: Double quote to prevent globbing and word splitting.
                                           ^--^ SC2086: Double quote to prevent globbing and word splitting.


In src/test/test_key_expiration.sh line 16:
UNAME_OS=`uname -s | cut -d_ -f1`
         ^----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.


In src/test/test_key_expiration.sh line 50:
check_no_file() { [ -e "$1" ] && die "$1 was not supposed to exist" || true; }
                              ^-- SC2015: Note that A && B || C is not if-then-else. C may run when A is true.


In src/test/test_key_expiration.sh line 51:
check_files_eq() { cmp "$1" "$2" || die "$1 and $2 did not match: `dump $1` vs `dump $2`"; }
                                                                  ^-------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                                                        ^-- SC2086: Double quote to prevent globbing and word splitting.
                                                                               ^-------^ SC2006: Use $(...) notation instead of legacy backticked `...`.
                                                                                     ^-- SC2086: Double quote to prevent globbing and word splitting.


In src/test/test_key_expiration.sh line 54:
DATA_DIR=`mktemp -d -t tor_key_expiration_tests.XXXXXX`
         ^-- SC2006: Use $(...) notation instead of legacy backticked `...`.


In src/test/test_key_expiration.sh line 63:
trap "rm -rf '$DATA_DIR'" 0
              ^-------^ SC2064: Use single quotes, otherwise this expands now rather than when signalled.


In src/test/test_key_expiration.sh line 66:
DATA_DIR=`cd "${DATA_DIR}" && pwd`
         ^-----------------------^ SC2006: Use $(...) notation instead of legacy backticked `...`.

For more information:
  https://www.shellcheck.net/wiki/SC2064 -- Use single quotes, otherwise this...
  https://www.shellcheck.net/wiki/SC2015 -- Note that A && B || C is not if-t...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.4.1.x-final
Milestone
Tor: 0.4.1.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#30002