support/testing/tests/fs/test_f2fs: fix test after f2fs-tools bump
PATCH 1/1 support/testing/tests/fs/test_f2fs: fix test after f2fs-tools bump
In commit9267b0f14d3d5f4715bad444f44eae47d9d5627c ("package/f2fs-tools: bump to version 1.15.0"), f2fs-tools was bumped from 1.14.0 to 1.15.0.
It turns out that this version bump causes the output of dump.f2fs to slightly change.
In version 1.14.0, it looked like this:
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 262144 (128 MB)
Info: MKFS version
"Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: FSCK version
from "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"
to "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 262144 (128 MB)
Info: CKPT version = 70c101c3
Info: checkpoint state = 181 : trimmed nat_bits unmount
In version 1.15.0, it looked like this:
Info: MKFS version
"Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: FSCK version
from "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"
to "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: Segments per section = 1
Info: Sections per zone = 1
Info: total FS sectors = 262144 (128 MB)
Info: CKPT version = b89f8bb
Info: checkpoint state = 181 : trimmed nat_bits unmount
You will notice that the message "Info: total sectors = 262144 (128 MB)" is no longer present, and only "Info: total FS sectors = 262144 (128 MB)" is not present.
Except our test case was precisely looking for this "Info: total sectors" string in the output, causing the test to fail.
We fix this by simply matching on "Info: total FS sectors" now.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/2884634814
--- support/testing/tests/fs/test_f2fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/fs/test_f2fs.py +1 -1
@@ -30,7 +30,7 @@ class TestF2FS(infra.basetest.BRTest): img = os.path.join(self.builddir, "images", "rootfs.f2fs") out = infra.run_cmd_on_host(self.builddir, ["host/sbin/dump.f2fs", img]) out = out.splitlines() - prop = dumpf2fs_getprop(out, "Info: total sectors") + prop = dumpf2fs_getprop(out, "Info: total FS sectors") self.assertEqual(prop, "262144 (128 MB)") kernel = os.path.join(self.builddir, "images", "zImage")
Signature · 6 lines
2.37.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedThomas, All,
On 2022-08-15 22:47 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 43 lines
In commit
9267b0f14d3d5f4715bad444f44eae47d9d5627c("package/f2fs-tools: bump to version 1.15.0"), f2fs-tools was bumped from 1.14.0 to 1.15.0.It turns out that this version bump causes the output of dump.f2fs to slightly change.
In version 1.14.0, it looked like this:
Info: Segments per section = 1
Info: Sections per zone = 1
Info: sector size = 512
Info: total sectors = 262144 (128 MB)
Info: MKFS version
"Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: FSCK version
from "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"to "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: total FS sectors = 262144 (128 MB)
Info: CKPT version =70c101c3
Info: checkpoint state = 181 : trimmednat_bitsunmountIn version 1.15.0, it looked like this:
Info: MKFS version
"Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: FSCK version
from "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 20
22"to "Linux version 5.4.0-124-generic (buildd@lcy02-amd64-089) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #140-Ubuntu SMP Thu Aug 4 02:23:37 UTC 2022"
Info: superblock features = 0 :
Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
Info: Segments per section = 1
Info: Sections per zone = 1
Info: total FS sectors = 262144 (128 MB)
Info: CKPT version = b89f8bb
Info: checkpoint state = 181 : trimmednat_bitsunmount
Quoted 3 lines
You will notice that the message "Info: total sectors = 262144 (128 MB)" is no longer present, and only "Info: total FS sectors = 262144 (128 MB)" is not present.
OK, sneaky, sneaky, and I missed fixing the 'not' in that last sentence...
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 34 lines
Except our test case was precisely looking for this "Info: total sectors" string in the output, causing the test to fail.
We fix this by simply matching on "Info: total FS sectors" now.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/2884634814
Signed-off-by Thomas Petazzoni <[email protected]>--- support/testing/tests/fs/test_f2fs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)support/testing/tests/fs/test_f2fs.py +1
-1@@ -30,7 +30,7 @@ class TestF2FS(infra.basetest.BRTest): img = os.path.join(self.builddir, "images", "rootfs.f2fs") out = infra.run_cmd_on_host(self.builddir, ["host/sbin/dump.f2fs", img]) out = out.splitlines() - prop = dumpf2fs_getprop(out, "Info: total sectors") + prop = dumpf2fs_getprop(out, "Info: total FS sectors") self.assertEqual(prop, "262144 (128 MB)") kernel = os.path.join(self.builddir, "images", "zImage")Signature · 6 lines
2.37.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot