[parted-devel] [PATCH] When labeling a disk in --script mode, fail if it is in use.

Jim Meyering jim at meyering.net
Fri May 11 16:07:45 UTC 2007


Otavio Salvador <otavio at debian.org> wrote:

> Jim Meyering <jim at meyering.net> writes:
>
> <...>
>> +++ b/tests/t1100-busy-label.sh
> <...>
>> +# There's a race condition here: on udev-based systems, ${dev}1
>
> This comment isn't clear enough. I misunderstand it as a typo at first
> look. I think you can rephrase it to say that the device (e.g:
> /dev/sda1) can take some time to be created or such...

I changed it to this:

# There's a race condition here: on udev-based systems, the partition#1
# device, ${dev}1 (i.e., /dev/sdd1) is not created immediately, and
# without some delay, this mount command would fail. ...

> <...>
>> +++ b/tests/test-lib.sh
> <...>
>> -# If $srcdir is not set, set it, if it's ".".  Otherwise, fail.
>> -if test -a "$srcdir"; then
>> -    if test -f test-lib.sh; then
>> -	srcdir=.
>> -    else
>> -	error '$srcdir is not set; either set it, or run the test' \
>> -	    'from the source directory'
>> -    fi
>> -fi
>> -
>
> This hook doesn't look to be related but a small refactoring. I'd
> suggest you to group this and the previous commit (the one for
> init.sh) that isn't related there and make a single commit doing it.

That change actually belongs with today's first patch,
so I've put it there and pushed everything.

> You might together change together t0000-basic.sh to use the new way
> of creating the input that. The line I found that needs it is:
>
> test_expect_success 'create interactive input' 'printf "y\n\n" > in'

For now, I've simply omitted the clean-up change that
you found objectionable.



More information about the parted-devel mailing list