* [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options
@ 2023-06-12 12:07 Ahmad Fatoum
2023-06-12 12:07 ` [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file Ahmad Fatoum
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 12:07 UTC (permalink / raw)
To: oss-tools
From: Ahmad Fatoum <ahmad@a3f.at>
Building with newer meson versions alerts us that specifying defaults
with a string type for non-string types is deprecated. This type
confusion was not intentional, so fix that.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
meson_options.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meson_options.txt b/meson_options.txt
index f80643aa6c73..04d9854a4b1b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,24 +2,24 @@
option(
'state-backward-compatibility',
type : 'boolean',
- value : 'false',
+ value : false,
description : 'barebox-state: when using the "direct" storage backend, keep the on-disk format readable by barebox <= v2016.08.0')
option(
'lock-device',
type : 'boolean',
- value : 'false',
+ value : false,
description : 'lock device node instead of creating lockfile in /run')
# build options
option(
'barebox-state',
type : 'boolean',
- value : 'true',
+ value : true,
description : 'Build barebox-state utility')
option(
'tests',
type : 'boolean',
- value : 'true',
+ value : true,
description : 'Enable/Disable test suite')
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file
2023-06-12 12:07 [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Ahmad Fatoum
@ 2023-06-12 12:07 ` Ahmad Fatoum
2023-07-27 8:23 ` Roland Hieber
2023-06-12 12:07 ` [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default Ahmad Fatoum
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 12:07 UTC (permalink / raw)
To: oss-tools
From: Ahmad Fatoum <ahmad@a3f.at>
When backend points at a device that couldn't be resolved, barebox-state
should fail instead of taking another device.
This is meant to address issues like the one fixed by commit
e7d71f099659 ("libdt: fix of_get_devicepath looking up sibling if
device unavailable"), but the error case there can't be reproduced
exactly, because loop devices have no common parent. Still one test
is better than no test until we start testing in Qemu.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
test/09-no-disk-fail.dts | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 test/09-no-disk-fail.dts
diff --git a/test/09-no-disk-fail.dts b/test/09-no-disk-fail.dts
new file mode 100644
index 000000000000..49cfa852525d
--- /dev/null
+++ b/test/09-no-disk-fail.dts
@@ -0,0 +1,26 @@
+/dts-v1/;
+
+#include "barebox-state.dtsi"
+
+/ {
+ expected-dev = "";
+
+ disk: loopfile0 {
+ compatible = "barebox,hostfile";
+ barebox,filename = "/dev/barebox-state-dev-does-not-exist";
+ barebox,blockdev;
+ };
+
+ otherdisk: loopfile1 {
+ compatible = "barebox,hostfile";
+ barebox,filename = __GPT_LOOPDEV__;
+ barebox,blockdev;
+ };
+};
+
+&state {
+ backend = <&disk>;
+ backend-type = "raw";
+ backend-stridesize = <0x40>;
+ backend-storage-type = "direct";
+};
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default
2023-06-12 12:07 [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Ahmad Fatoum
2023-06-12 12:07 ` [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file Ahmad Fatoum
@ 2023-06-12 12:07 ` Ahmad Fatoum
2023-07-27 8:23 ` Roland Hieber
2023-07-27 8:23 ` [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Roland Hieber
2023-08-01 10:10 ` Roland Hieber
3 siblings, 1 reply; 7+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 12:07 UTC (permalink / raw)
To: oss-tools
From: Ahmad Fatoum <ahmad@a3f.at>
We shouldn't expect users to override optimization levels, so let's have
a sensible default.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/meson.build b/meson.build
index be92446f137a..e03e1dbf6e85 100644
--- a/meson.build
+++ b/meson.build
@@ -9,6 +9,7 @@ project(
default_options: [
'c_std=gnu11',
'warning_level=2',
+ 'optimization=2',
],
license : 'GPL-2.0-only',
)
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options
2023-06-12 12:07 [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Ahmad Fatoum
2023-06-12 12:07 ` [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file Ahmad Fatoum
2023-06-12 12:07 ` [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default Ahmad Fatoum
@ 2023-07-27 8:23 ` Roland Hieber
2023-08-01 10:10 ` Roland Hieber
3 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2023-07-27 8:23 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: oss-tools
On Mon, Jun 12, 2023 at 02:07:52PM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <ahmad@a3f.at>
>
> Building with newer meson versions alerts us that specifying defaults
> with a string type for non-string types is deprecated. This type
> confusion was not intentional, so fix that.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
> meson_options.txt | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meson_options.txt b/meson_options.txt
> index f80643aa6c73..04d9854a4b1b 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -2,24 +2,24 @@
> option(
> 'state-backward-compatibility',
> type : 'boolean',
> - value : 'false',
> + value : false,
> description : 'barebox-state: when using the "direct" storage backend, keep the on-disk format readable by barebox <= v2016.08.0')
>
> option(
> 'lock-device',
> type : 'boolean',
> - value : 'false',
> + value : false,
> description : 'lock device node instead of creating lockfile in /run')
>
> # build options
> option(
> 'barebox-state',
> type : 'boolean',
> - value : 'true',
> + value : true,
> description : 'Build barebox-state utility')
>
> option(
> 'tests',
> type : 'boolean',
> - value : 'true',
> + value : true,
> description : 'Enable/Disable test suite')
> --
> 2.39.2
>
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file
2023-06-12 12:07 ` [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file Ahmad Fatoum
@ 2023-07-27 8:23 ` Roland Hieber
0 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2023-07-27 8:23 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: oss-tools
On Mon, Jun 12, 2023 at 02:07:53PM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <ahmad@a3f.at>
>
> When backend points at a device that couldn't be resolved, barebox-state
> should fail instead of taking another device.
>
> This is meant to address issues like the one fixed by commit
> e7d71f099659 ("libdt: fix of_get_devicepath looking up sibling if
> device unavailable"), but the error case there can't be reproduced
> exactly, because loop devices have no common parent. Still one test
> is better than no test until we start testing in Qemu.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
> ---
> test/09-no-disk-fail.dts | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 test/09-no-disk-fail.dts
>
> diff --git a/test/09-no-disk-fail.dts b/test/09-no-disk-fail.dts
> new file mode 100644
> index 000000000000..49cfa852525d
> --- /dev/null
> +++ b/test/09-no-disk-fail.dts
> @@ -0,0 +1,26 @@
> +/dts-v1/;
> +
> +#include "barebox-state.dtsi"
> +
> +/ {
> + expected-dev = "";
> +
> + disk: loopfile0 {
> + compatible = "barebox,hostfile";
> + barebox,filename = "/dev/barebox-state-dev-does-not-exist";
> + barebox,blockdev;
> + };
> +
> + otherdisk: loopfile1 {
> + compatible = "barebox,hostfile";
> + barebox,filename = __GPT_LOOPDEV__;
> + barebox,blockdev;
> + };
> +};
> +
> +&state {
> + backend = <&disk>;
> + backend-type = "raw";
> + backend-stridesize = <0x40>;
> + backend-storage-type = "direct";
> +};
> --
> 2.39.2
>
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default
2023-06-12 12:07 ` [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default Ahmad Fatoum
@ 2023-07-27 8:23 ` Roland Hieber
0 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2023-07-27 8:23 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: oss-tools
On Mon, Jun 12, 2023 at 02:07:54PM +0200, Ahmad Fatoum wrote:
> From: Ahmad Fatoum <ahmad@a3f.at>
>
> We shouldn't expect users to override optimization levels, so let's have
> a sensible default.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Roland Hieber <rhi@pengutronix.de>
> ---
> meson.build | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meson.build b/meson.build
> index be92446f137a..e03e1dbf6e85 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -9,6 +9,7 @@ project(
> default_options: [
> 'c_std=gnu11',
> 'warning_level=2',
> + 'optimization=2',
> ],
> license : 'GPL-2.0-only',
> )
> --
> 2.39.2
>
>
>
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options
2023-06-12 12:07 [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Ahmad Fatoum
` (2 preceding siblings ...)
2023-07-27 8:23 ` [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Roland Hieber
@ 2023-08-01 10:10 ` Roland Hieber
3 siblings, 0 replies; 7+ messages in thread
From: Roland Hieber @ 2023-08-01 10:10 UTC (permalink / raw)
To: oss-tools, Ahmad Fatoum
On Mon, 12 Jun 2023 14:07:52 +0200, Ahmad Fatoum wrote:
> Building with newer meson versions alerts us that specifying defaults
> with a string type for non-string types is deprecated. This type
> confusion was not intentional, so fix that.
>
>
Applied, thanks!
[1/3] meson: options: use defaults of type boolean for boolean options
commit: 4e7ad815b856bfd4758097d3bb8cd79ea82d5653
[2/3] test: add test case with non-existent /dev/file
commit: 885bb2feac99a05711f2f51fe8e781a5f890239c
[3/3] meson: set optimization level to -O2 by default
commit: 6dc8b1a948cf063334f4cc6ecef05e769981590a
Best regards,
--
Roland Hieber, Pengutronix e.K. | r.hieber@pengutronix.de |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-08-01 10:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 12:07 [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Ahmad Fatoum
2023-06-12 12:07 ` [OSS-Tools] [PATCH 2/3] test: add test case with non-existent /dev/file Ahmad Fatoum
2023-07-27 8:23 ` Roland Hieber
2023-06-12 12:07 ` [OSS-Tools] [PATCH 3/3] meson: set optimization level to -O2 by default Ahmad Fatoum
2023-07-27 8:23 ` Roland Hieber
2023-07-27 8:23 ` [OSS-Tools] [PATCH 1/3] meson: options: use defaults of type boolean for boolean options Roland Hieber
2023-08-01 10:10 ` Roland Hieber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox