[Piglit] [PATCH] core: don't try to resolve the real path of the file
Ilia Mirkin
imirkin at alum.mit.edu
Tue Feb 25 17:12:12 PST 2014
On Tue, Feb 25, 2014 at 7:55 PM, Ken Phillis Jr <kphillisjr at gmail.com> wrote:
> On Mon, Feb 10, 2014 at 11:34 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> To elaborate a bit on why I think I'm right, let me provide this example:
>>
>> $ mkdir somepath
>> $ cat > somepath/script.py
>> import sys
>> print open(sys.argv[1], "r").read()
>> $ cat > testfile
>> testing
>> $ python somepath/script.py testfile
>> testing
>>
>> Note that being able to read/write the "somepath" dir had absolute no
>> effect on anything. open() works relative to the cwd. (And so does
>> realpath, for that matter.)
>>
>> -ilia
>
> This is not exactly as easy to give a solid example but in my case I
> generally use a system installed version of python scripts, so the
> order of commands would be...
>
> $ cat > /usr/bin/my-script.py
> #!/usr/bin/env python
> import sys
> print open(sys.argv[1], "r").read()
> $chmod 755 /usr/bin/my-script.py
> $ cat > testfile
> testing
> $ my-script.py testfile
> testing
Sure. But this changes nothing... in any case, I checked my change to
piglit in a while ago. If you're having trouble with
piglit-summary.py, please report in detail what's going wrong.
-ilia
More information about the Piglit
mailing list