aufover / rpm-symbiotic

RPM packaging of staticafi/symbiotic
MIT License
0 stars 3 forks source link

`sbt-instr` should not leave `log.txt` in `${PWD}` #5

Open kdudka opened 2 years ago

kdudka commented 2 years ago

It breaks the tests/rm/rm3.sh regression test of GNU coreutils:

--- exp 2021-12-03 14:36:22.602444792 +0100
+++ out 2021-12-03 14:36:09.277692425 +0100
@@ -2,6 +2,7 @@
 rm: remove directory 'z'
 rm: remove directory 'z/d'
 rm: remove regular empty file 'z/empty'
+rm: remove regular empty file 'z/log.txt'
 rm: remove symbolic link 'z/slink'
 rm: remove symbolic link 'z/slinkdot'
 rm: remove write-protected directory 'z/du'
lzaoral commented 2 years ago

This is caused by following line in src/instr.cpp:

https://github.com/staticafi/sbt-instrumentation/blob/ccfe9ae8e2ff91fceae94071e2f4cfa4224addee/src/instr.cpp#L52

kdudka commented 2 years ago

If we really need the log, it needs to be created in SYMBIOTIC_CAPTURE_DIR.