[parted-devel] Version 2 of the scripting patch.
Jim Meyering
jim at meyering.net
Fri Jun 20 12:25:51 UTC 2008
Joel Andres Granados <jgranado at redhat.com> wrote:
> I followed all of Jims suuggestions and added an additional detail :) To avoid having the message be a bit long I put a "\n" at the beginning of the "are you sure..." string. Thats about it.
> I was a pain getting the strings to compare correctly in the tests :)
Thanks for persevering.
Writing good tests isn't easy.
A few additional changes are required, but I'll take care
of the rest. For example, when running tests as non-root,
they fail due to this:
* expecting success: $compare outI errI
--- outI 2008-06-20 09:55:21.000000000 +0000
+++ errI 2008-06-20 09:55:21.000000000 +0000
@@ -1,4 +1,3 @@
-WARNING: You are not superuser. Watch out for permissions.
Warning: You requested a partition from 512B to 50.7kB.
The closest location we can manage is 17.4kB to 33.8kB.
Is this still acceptable to you?
The first change set below fixes that and also removes some
unnecessary duplication in generating the expected output files.
The 2nd uses the same sed command as used in another test
(candidate now to be factored out into test-lib.sh), for consistency.
[note that there are literal ^M (CR) bytes in the patch]
The 3rd converts 14 tests to a 2x-loop over just 7 tests.
The 4th adjusts the now-failing t3000-constraints.sh test
to accommodate the changed diagnostic.
I expect to push your change set and the four below later today.
Jim
More information about the parted-devel
mailing list