Обсуждение: Issue with plpython write_file and read_file tests

Поиск
Список
Период
Сортировка

Issue with plpython write_file and read_file tests

От
"Jim C. Nasby"
Дата:
Setting up the buildfarm on a machine I've discovered an issue with the
plpython write_file and read_file tests. The problem can be seen at
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=platypus&dt=2005-06-20%2018:15:00
The specific issue is that the test doesn't clean up after itself,
leaving /tmp/plpython behind. This raised it's ugly head when I tested
the buildfarm stuff as one user and then switched to using a different
user.

What would be the best way to handle this? A delete_file plpython
function might work, though if read_file fails then you'd still have a
file left to clean up, so it seems like it might be better to put the
cleanup functionality in the test suite. ISTM it would also be good if
the test honored $TEMP.
-- 
Jim C. Nasby, Database Consultant               decibel@decibel.org 
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"


Re: Issue with plpython write_file and read_file tests

От
Tom Lane
Дата:
"Jim C. Nasby" <decibel@decibel.org> writes:
> Setting up the buildfarm on a machine I've discovered an issue with the
> plpython write_file and read_file tests. The problem can be seen at
> http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=platypus&dt=2005-06-20%2018:15:00
> The specific issue is that the test doesn't clean up after itself,
> leaving /tmp/plpython behind. This raised it's ugly head when I tested
> the buildfarm stuff as one user and then switched to using a different
> user.

> What would be the best way to handle this?

Remove that test altogether.  It'd only be sane in a test of a trusted
plpython language, which we have not got now.  I would imagine that the
original writer of the code never expected the write to succeed at all.
        regards, tom lane