diff mbox series

benchtests: make compare_strings.py accept string as attribute value

Message ID 3a3f209d-9464-265c-4eb6-13649a53db52@linux.alibaba.com
State New
Headers show
Series benchtests: make compare_strings.py accept string as attribute value | expand

Commit Message

Su Lifan Feb. 25, 2022, 8:58 a.m. UTC
Commit ac759b1fbf28a82d99afde9046f8b72c7cba5dae added attribute
"overlap" to bench-memmove-walk, whose value is a string. This change
makes compare_strings.py fail since benchout_strings.schema.json
requires the values of attributes to be number.

This patch relaxes such constraint.
---
 benchtests/scripts/benchout_strings.schema.json | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--
2.32.0

Comments

Siddhesh Poyarekar Feb. 25, 2022, 9:15 a.m. UTC | #1
On 25/02/2022 14:28, Su Lifan via Libc-alpha wrote:
> Commit ac759b1fbf28a82d99afde9046f8b72c7cba5dae added attribute
> "overlap" to bench-memmove-walk, whose value is a string. This change
> makes compare_strings.py fail since benchout_strings.schema.json
> requires the values of attributes to be number.
> 
> This patch relaxes such constraint.

LGTM.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

> ---
>   benchtests/scripts/benchout_strings.schema.json | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/benchtests/scripts/benchout_strings.schema.json
> b/benchtests/scripts/benchout_strings.schema.json
> index 7c9a67134b..bfd9b4e6c0 100644
> --- a/benchtests/scripts/benchout_strings.schema.json
> +++ b/benchtests/scripts/benchout_strings.schema.json
> @@ -28,7 +28,12 @@
>   		    "items": {"type": "number"}
>                      }
>   		 },
> -		 "additionalProperties": {"type": "number"},
> +		 "additionalProperties": {
> +		   "oneOf": [
> +		     { "type": "number" },
> +		     { "type": "string" }
> +		   ]
> +		 },
>   		 "minProperties": 2
>   	      }
>   	    }
> --
> 2.32.0
>
diff mbox series

Patch

diff --git a/benchtests/scripts/benchout_strings.schema.json
b/benchtests/scripts/benchout_strings.schema.json
index 7c9a67134b..bfd9b4e6c0 100644
--- a/benchtests/scripts/benchout_strings.schema.json
+++ b/benchtests/scripts/benchout_strings.schema.json
@@ -28,7 +28,12 @@ 
 		    "items": {"type": "number"}
                    }
 		 },
-		 "additionalProperties": {"type": "number"},
+		 "additionalProperties": {
+		   "oneOf": [
+		     { "type": "number" },
+		     { "type": "string" }
+		   ]
+		 },
 		 "minProperties": 2
 	      }
 	    }