Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-4724

Syntax error in wtperf_ckpt.sh when running 'dash' as default shell

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.0, 4.1.11
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Sprint:
      Storage Engines 2019-04-22

      Description

      Job wiredtiger-test-check-long started to fail recently since running on the new Jenkins machines (Ubuntu 18.04 LTS). [[ is a valid 'bash' syntax while not recognised by 'dash' - the default 'sh' on Ubuntu OS. 

      http://build.wiredtiger.com:8080/job/wiredtiger-test-check-long/1103/

      + chmod a+x ../../../bench/wtperf/runners/wtperf_ckpt.sh ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/wtperf_track.sh
      + echo 'Run truncate btree job (mongodb oplog)'
      Run truncate btree job (mongodb oplog)
      + ../../../bench/wtperf/runners/wtperf_run.sh ../../../bench/wtperf/runners/mongodb-oplog.wtperf 1
      ../../../bench/wtperf/runners/wtperf_run.sh: 27: ../../../bench/wtperf/runners/wtperf_run.sh: [[: not found
      ../../../bench/wtperf/runners/wtperf_run.sh: 42: ../../../bench/wtperf/runners/wtperf_run.sh: Syntax error: "(" unexpected
      + cleanup
      + status=2 

      The code segment that had the syntax error:

      while [[ $# -gt 0 ]] ; do
              if test "$1" == "NOCREATE"; then
                      create=0
              else
                      wtarg+=" $1"
              fi
              shift # Consume this arg
      done 

      We could either fix the while loop line to be compatible with 'dash', or specify 'bash' on the shebang line.

        Attachments

          Activity

            People

            • Assignee:
              sue.loverso Susan LoVerso
              Reporter:
              luke.chen Luke Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: