DependableSystemsLab / LLFI

LLFI is an LLVM based fault injection tool, that injects faults into the LLVM IR of the application source code. The faults can be injected into specific program points, and the effect can be easily tracked back to the source code. Please refer to the paper below. NOTE: If you publish a paper using LLFI, please add it to PaperLLFI.bib
http://blogs.ubc.ca/karthik/2014/02/23/quantifying-the-accuracy-of-high-level-fault-injection-techniques/
Other
68 stars 35 forks source link

LLFI help uses old style print statement #17

Closed karthikp-ubc closed 10 years ago

karthikp-ubc commented 10 years ago

Python 3 no longer supports the print statement, yet this is what the Python scripts use.

We need to upgrade them to use the new print() function instead. See below for an example:

http://docs.python.org/3.0/whatsnew/3.0.html

stevem2014git commented 10 years ago

There are other issues with Python 2 vs. Python 3. One other case that came up is for subprocess communication. The member function .communicate sends out byte code which needs to be decoded to string before being used. Example: p = subprocess.Popen(execlist, stdout = subprocess.PIPE) outputFile.write(p.communicate()[0]) works on Python 2.x but in Python 3.x needs conversion. The following works. p = subprocess.Popen(execlist, stdout = subprocess.PIPE) outputFile.write(p.communicate()[0].decode(encoding='UTF-8'))

regards, Steve

karthikp-ubc commented 10 years ago

Closing this issue as this was just updated by Justin. Please reopen if it does not fix the problem. Thanks,