* [Buildroot] [PATH 1/2] support/testing: rename variables for readability
@ 2017-05-27 21:58 Luca Ceresoli
2017-05-27 21:58 ` [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature Luca Ceresoli
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Luca Ceresoli @ 2017-05-27 21:58 UTC (permalink / raw)
To: buildroot
The 'lines' variable is overwritten with its own fields. Thus it
contains a line first, and then a list of fields -- it never contains
'lines'.
Use two different variables named 'line' and 'fields' to make the code
more readable.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
support/testing/tests/fs/test_ext.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py
index f7e2e85055e1..d35eea8bb5fa 100644
--- a/support/testing/tests/fs/test_ext.py
+++ b/support/testing/tests/fs/test_ext.py
@@ -21,10 +21,10 @@ def dumpe2fs_run(builddir, image):
return ret.strip().splitlines()
def dumpe2fs_getprop(out, prop):
- for lines in out:
- lines = lines.split(": ")
- if lines[0] == prop:
- return lines[1].strip()
+ for line in out:
+ fields = line.split(": ")
+ if fields[0] == prop:
+ return fields[1].strip()
def boot_img_and_check_fs_type(emulator, builddir, fs_type):
img = os.path.join(builddir, "images", "rootfs.{}".format(fs_type))
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature
2017-05-27 21:58 [Buildroot] [PATH 1/2] support/testing: rename variables for readability Luca Ceresoli
@ 2017-05-27 21:58 ` Luca Ceresoli
2017-05-28 0:57 ` Ricardo Martincoski
2017-05-28 0:45 ` [Buildroot] [PATH 1/2] support/testing: rename variables for readability Ricardo Martincoski
2017-05-28 12:55 ` Thomas Petazzoni
2 siblings, 1 reply; 6+ messages in thread
From: Luca Ceresoli @ 2017-05-27 21:58 UTC (permalink / raw)
To: buildroot
We only have a positive test for it, in ext4. Let's have a negative
one as well.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
support/testing/tests/fs/test_ext.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py
index d35eea8bb5fa..ea3d3f11d7e7 100644
--- a/support/testing/tests/fs/test_ext.py
+++ b/support/testing/tests/fs/test_ext.py
@@ -86,6 +86,7 @@ BR2_TARGET_ROOTFS_EXT2_3=y
out = dumpe2fs_run(self.builddir, "rootfs.ext3")
self.assertEqual(dumpe2fs_getprop(out, REVISION_PROP), "1 (dynamic)")
self.assertIn("has_journal", dumpe2fs_getprop(out, FEATURES_PROP))
+ self.assertNotIn("extent", dumpe2fs_getprop(out, FEATURES_PROP))
exit_code = boot_img_and_check_fs_type(self.emulator,
self.builddir, "ext3")
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATH 1/2] support/testing: rename variables for readability
2017-05-27 21:58 [Buildroot] [PATH 1/2] support/testing: rename variables for readability Luca Ceresoli
2017-05-27 21:58 ` [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature Luca Ceresoli
@ 2017-05-28 0:45 ` Ricardo Martincoski
2017-05-28 12:55 ` Thomas Petazzoni
2 siblings, 0 replies; 6+ messages in thread
From: Ricardo Martincoski @ 2017-05-28 0:45 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, May 27, 2017 at 06:58 PM, Luca Ceresoli wrote:
> The 'lines' variable is overwritten with its own fields. Thus it
> contains a line first, and then a list of fields -- it never contains
> 'lines'.
>
> Use two different variables named 'line' and 'fields' to make the code
> more readable.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Regards,
Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature
2017-05-27 21:58 ` [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature Luca Ceresoli
@ 2017-05-28 0:57 ` Ricardo Martincoski
0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Martincoski @ 2017-05-28 0:57 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, May 27, 2017 at 06:58 PM, Luca Ceresoli wrote:
> We only have a positive test for it, in ext4. Let's have a negative
> one as well.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Regards,
Ricardo
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATH 1/2] support/testing: rename variables for readability
2017-05-27 21:58 [Buildroot] [PATH 1/2] support/testing: rename variables for readability Luca Ceresoli
2017-05-27 21:58 ` [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature Luca Ceresoli
2017-05-28 0:45 ` [Buildroot] [PATH 1/2] support/testing: rename variables for readability Ricardo Martincoski
@ 2017-05-28 12:55 ` Thomas Petazzoni
2017-05-28 21:07 ` Luca Ceresoli
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-05-28 12:55 UTC (permalink / raw)
To: buildroot
Hello,
On Sat, 27 May 2017 23:58:46 +0200, Luca Ceresoli wrote:
> The 'lines' variable is overwritten with its own fields. Thus it
> contains a line first, and then a list of fields -- it never contains
> 'lines'.
>
> Use two different variables named 'line' and 'fields' to make the code
> more readable.
>
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
> support/testing/tests/fs/test_ext.py | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Both applied to master. Thanks!
For some reason, your first patch had a broken prefix: [PATH] instead
of [PATCH]. I guess you hand-edited the patch, and made a typo?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATH 1/2] support/testing: rename variables for readability
2017-05-28 12:55 ` Thomas Petazzoni
@ 2017-05-28 21:07 ` Luca Ceresoli
0 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2017-05-28 21:07 UTC (permalink / raw)
To: buildroot
Hi,
On 28/05/2017 14:55, Thomas Petazzoni wrote:
> Hello,
>
> On Sat, 27 May 2017 23:58:46 +0200, Luca Ceresoli wrote:
>> The 'lines' variable is overwritten with its own fields. Thus it
>> contains a line first, and then a list of fields -- it never contains
>> 'lines'.
>>
>> Use two different variables named 'line' and 'fields' to make the code
>> more readable.
>>
>> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>> ---
>> support/testing/tests/fs/test_ext.py | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> Both applied to master. Thanks!
Thanks.
> For some reason, your first patch had a broken prefix: [PATH] instead
> of [PATCH]. I guess you hand-edited the patch, and made a typo?
That's weird, sorry about that. But at times I open my patches with
emacs just for a last-time check before I do git send-email. Perhaps I
hit a few wrong keystrokes in that moment.
Maybe I should switch to an editor that is not editing files when it is
started... :)
--
Luca
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-28 21:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-27 21:58 [Buildroot] [PATH 1/2] support/testing: rename variables for readability Luca Ceresoli
2017-05-27 21:58 ` [Buildroot] [PATCH 2/2] support/testing: fs/ext: add a negative test for the "extent" feature Luca Ceresoli
2017-05-28 0:57 ` Ricardo Martincoski
2017-05-28 0:45 ` [Buildroot] [PATH 1/2] support/testing: rename variables for readability Ricardo Martincoski
2017-05-28 12:55 ` Thomas Petazzoni
2017-05-28 21:07 ` Luca Ceresoli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.