Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tar input files not noticed #42

Open
GoogleCodeExporter opened this issue Mar 26, 2015 · 3 comments
Open

tar input files not noticed #42

GoogleCodeExporter opened this issue Mar 26, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run the test/creat test via 'python build.py' in that dir
2. echo "// changes" >> test/creat/a.c
3. re-run 'python build.py'

What is the expected output? What do you see instead?

  I expect foo.tar.gz to get rebuilt ; it doesn't.  

What version of the product are you using? On what operating system?

  f10c4063ab4bc1f0ccb7a8bac3d9c7a485918652 on ubuntu 12.04

Please provide any additional information below.

  Looking in .deps, there's only an entry for foo.tar.gz as an output, no listed inputs.
  I did an strace and see not the expected open()s of a.c and b.c, but instead: openat(AT_FDCWD, "b.c", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC) 

Looks like solving this will, as a by-product, solve the fchdir() problem.

Original issue reported on code.google.com by pjimen...@gmail.com on 4 Jun 2013 at 8:41

@GoogleCodeExporter
Copy link
Author

Original comment by simon.al...@gmail.com on 13 Sep 2013 at 12:36

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Hello, very good and promising tool.

I tried to fix this issue.
Check attached patch.

Original comment by BeChris1...@gmail.com on 12 Mar 2014 at 9:37

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

I have taken a look at the patch, and it looks good as a partial fix.

If I understand it correctly it will only match openat and statat calls if the 
special file handle AT_FDCWD is used. So it will only work if the call is going 
to use the CWD. This is good, because we track the CWD. The downside is that it 
will still fail to match any calls that specify a directory by file handle. To 
correctly observe those calls would require tracking open file handles. It 
remains to be seen how many programs actually use that functionality, so it may 
be better to open a new bug for that feature. 

The only other shortcoming is some other xxxat calls are missing (e.g. mkdirat) 

I will merge it into fabricate.py as a partial fix, as it is certainly an 
improvement over what we have currently.




Original comment by simon.al...@gmail.com on 13 Mar 2014 at 5:32

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants