MSI in 3.15.2 reports missing file instead of syntax error

Bug #1503661 reported by nickez on 2015-10-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
EPICS Base
Low
Andrew Johnson

Bug Description

The following two files work in MSI 1.6, but fail with "missing file" in 3.15.2. Notice the extra curly brace at the end of the substitutions file.

$ cat example.template
${ONE} ${TWO}

$ cat test.subs
file example.template {
 pattern {ONE, TWO}
 {1, 2}
 {3, 4}
}
}

vagrant @ localhost : ~/temp
$ /opt/epics/bases/base-3.14.12.5/extensions/msi1-6/O.centos7-x86_64/msi -Stest.subs -I. -I.. > test.db

vagrant @ localhost : ~/temp
$ /opt/epics/bases/base-3.15.2/bin/centos7-x86_64/msi -Stest.subs -I. -I.. -otest.db
msi: No template file
Usage: msi [options] [template]
  stdin is used if neither template nor substitution file is given
  options:
    -h Print this help message
    -D Output file dependencies, not substitutions
    -V Undefined macros generate an error
    -g All macros have global scope
    -o<FILE> Send output to <FILE>
    -I<DIR> Add <DIR> to include file search path
    -M<SUBST> Add <SUBST> to (global) macro definitions
              (<SUBST> takes the form VAR=VALUE,...)
    -S<FILE> Expand the substitutions in FILE

Expected behavior:
Generate "syntax" error.

Andrew Johnson (anj) on 2015-10-07
Changed in epics-base:
importance: Undecided → Low
milestone: none → 3.15.branch
Andrew Johnson (anj) on 2015-10-07
Changed in epics-base:
status: New → Triaged
Changed in epics-base:
assignee: nobody → Andrew Johnson (anj)
Changed in epics-base:
milestone: 3.15.branch → 3.15.5
milestone: 3.15.5 → 3.15.branch
Andrew Johnson (anj) on 2018-07-23
Changed in epics-base:
status: Triaged → In Progress
Andrew Johnson (anj) wrote :

I think I have this fixed:

Hex$ more example.template test.subs
::::::::::::::
example.template
::::::::::::::
${ONE} ${TWO}
::::::::::::::
test.subs
::::::::::::::
file example.template {
  pattern {ONE, TWO}
  {1, 2}
  {3, 4}
}
}
Hex$ ../bin/linux-x86_64/msi -Stest.subs -o test.db
msi: Parse error, unexpected '}'
  in substitution file 'test.subs' at line 7:
  }
Hex$ ls
example.template test.subs

The attached patch contains just the changes needed to fix this and related problems, although I'm going to commit additional internal changes to msi that include code reformatting, various minor cleanups and the addition of debugging tracing macros.

Andrew Johnson (anj) on 2018-07-25
Changed in epics-base:
status: In Progress → Fix Committed
milestone: 3.15.branch → 3.15.6
Changed in epics-base:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers