Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-29 Thread Thomas Huth

On 27/09/2022 23.35, Alex Bennée wrote:

It seems the depth of path we need to support can vary depending on
the order of the init constructors getting called. It seems
--enable-lto shuffles things around just enough to push you over the
limit.

Signed-off-by: Alex Bennée 
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186
---
  tests/qtest/libqos/qgraph.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
index 6e94824d09..5c0046e989 100644
--- a/tests/qtest/libqos/qgraph.h
+++ b/tests/qtest/libqos/qgraph.h
@@ -24,7 +24,7 @@
  #include "libqos-malloc.h"
  
  /* maximum path length */

-#define QOS_PATH_MAX_ELEMENT_SIZE 50
+#define QOS_PATH_MAX_ELEMENT_SIZE 64
  
  typedef struct QOSGraphObject QOSGraphObject;

  typedef struct QOSGraphNode QOSGraphNode;


Acked-by: Thomas Huth 




Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-28 Thread Paolo Bonzini
Il mar 27 set 2022, 23:35 Alex Bennée  ha scritto:

> It seems the depth of path we need to


With s/path/stack/,

Acked-by: Paolo Bonzini 

Paolo

 support can vary depending on

the order of the init constructors getting called. It seems
> --enable-lto shuffles things around just enough to push you over the
> limit.
>
> Signed-off-by: Alex Bennée 
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186
> ---
>  tests/qtest/libqos/qgraph.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
> index 6e94824d09..5c0046e989 100644
> --- a/tests/qtest/libqos/qgraph.h
> +++ b/tests/qtest/libqos/qgraph.h
> @@ -24,7 +24,7 @@
>  #include "libqos-malloc.h"
>
>  /* maximum path length */
> -#define QOS_PATH_MAX_ELEMENT_SIZE 50
> +#define QOS_PATH_MAX_ELEMENT_SIZE 64
>
>  typedef struct QOSGraphObject QOSGraphObject;
>  typedef struct QOSGraphNode QOSGraphNode;
> --
> 2.34.1
>
>


Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-28 Thread Paolo Bonzini
Oh, wait, this is not a path! This is the stack for a graph visit, and the
limit is not the maximum length of the path, but rather the number of nodes
in the graph.

In other words, QOS_PATH_MAX_ELEMENT_SIZE is being overloaded and using it
in qos_node_stack is wrong. The solution is to use a linked list there, for
now the patch is okay.

Paolo

Il mer 28 set 2022, 10:48 Alex Bennée  ha scritto:

>
> Paolo Bonzini  writes:
>
> > What is an example of one such huge path? This would mean that LTO is
> changing the set of tests that are run, which is
> > unexpected.
>
> It does look like the LTO build runs more tests although its hard to
> diff as the order if different:
>
> ➜  grep "list" without-lto | wc -l
> 201
> 09:45:35 alex@zen:qemu.git/builds/arm.all  on  gitdm/next [$!?⇡]
> ➜  grep "list" ../debug/with-lto | wc -l
> 195
>
> Logs attached:
>
>
> >
> > Paolo
> >
> > Il mar 27 set 2022, 23:35 Alex Bennée  ha
> scritto:
> >
> >  It seems the depth of path we need to support can vary depending on
> >  the order of the init constructors getting called. It seems
> >  --enable-lto shuffles things around just enough to push you over the
> >  limit.
> >
> >  Signed-off-by: Alex Bennée 
> >  Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186
> >  ---
> >   tests/qtest/libqos/qgraph.h | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >  diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
> >  index 6e94824d09..5c0046e989 100644
> >  --- a/tests/qtest/libqos/qgraph.h
> >  +++ b/tests/qtest/libqos/qgraph.h
> >  @@ -24,7 +24,7 @@
> >   #include "libqos-malloc.h"
> >
> >   /* maximum path length */
> >  -#define QOS_PATH_MAX_ELEMENT_SIZE 50
> >  +#define QOS_PATH_MAX_ELEMENT_SIZE 64
> >
> >   typedef struct QOSGraphObject QOSGraphObject;
> >   typedef struct QOSGraphNode QOSGraphNode;
> >  --
> >  2.34.1
>
>
> --
> Alex Bennée
>


Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-28 Thread Alex Bennée

Paolo Bonzini  writes:

> What is an example of one such huge path? This would mean that LTO is 
> changing the set of tests that are run, which is
> unexpected.

It does look like the LTO build runs more tests although its hard to
diff as the order if different:

➜  grep "list" without-lto | wc -l
201
09:45:35 alex@zen:qemu.git/builds/arm.all  on  gitdm/next [$!?⇡] 
➜  grep "list" ../debug/with-lto | wc -l
195

Logs attached:

qos_push: 0
qos_traverse_graph: visited = 0
qos_traverse_graph:  list = 0x5628504c70a0
qos_push: 1
qos_push: 2
qos_traverse_graph: visited = 0
qos_traverse_graph: aarch64/xlnx-zcu102 list = 0x5628504c7170
qos_push: 3
qos_traverse_graph: visited = 0
qos_traverse_graph: generic-sdhci list = 0x5628504c3480
qos_push: 4
qos_traverse_graph: visited = 0
qos_traverse_graph: sdhci list = 0x56285049f720
qos_push: 5
qos_traverse_graph: visited = 0
qos_traverse_graph: sdhci-tests/registers list = (nil)
qos_pop: 5
qos_traverse_graph: visited = 1
qos_pop: 4
qos_traverse_graph: visited = 1
qos_pop: 3
qos_traverse_graph: visited = 1
qos_pop: 2
qos_traverse_graph: visited = 0
qos_traverse_graph: aarch64/virt list = 0x5628504c7f40
qos_push: 2
qos_traverse_graph: visited = 0
qos_traverse_graph: generic-pcihost list = 0x5628504c6f40
qos_push: 3
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-bus-generic list = 0x5628504c6dd0
qos_push: 4
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-bus list = 0x56285048f860
qos_push: 5
qos_push: 6
qos_push: 7
qos_push: 8
qos_push: 9
qos_push: 10
qos_push: 11
qos_push: 12
qos_push: 13
qos_push: 14
qos_push: 15
qos_push: 16
qos_push: 17
qos_push: 18
qos_push: 19
qos_push: 20
qos_push: 21
qos_push: 22
qos_push: 23
qos_push: 24
qos_push: 25
qos_push: 26
qos_push: 27
qos_push: 28
qos_push: 29
qos_push: 30
qos_push: 31
qos_push: 32
qos_push: 33
qos_push: 34
qos_push: 35
qos_push: 36
qos_push: 37
qos_push: 38
qos_push: 39
qos_push: 40
qos_push: 41
qos_traverse_graph: visited = 0
qos_traverse_graph: AC97 list = 0x56285048eec0
qos_push: 42
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 43
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 43
qos_traverse_graph: visited = 1
qos_pop: 42
qos_traverse_graph: visited = 1
qos_pop: 41
qos_traverse_graph: visited = 0
qos_traverse_graph: e1000 list = 0x562850491820
qos_push: 41
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 42
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 42
qos_traverse_graph: visited = 1
qos_pop: 41
qos_traverse_graph: visited = 1
qos_pop: 40
qos_traverse_graph: visited = 0
qos_traverse_graph: e1000-82544gc list = 0x562850492080
qos_push: 40
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 41
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 41
qos_traverse_graph: visited = 1
qos_pop: 40
qos_traverse_graph: visited = 1
qos_pop: 39
qos_traverse_graph: visited = 0
qos_traverse_graph: e1000-82545em list = 0x562850492980
qos_push: 39
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 40
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 40
qos_traverse_graph: visited = 1
qos_pop: 39
qos_traverse_graph: visited = 1
qos_pop: 38
qos_traverse_graph: visited = 0
qos_traverse_graph: i82550 list = 0x562850493690
qos_push: 38
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 39
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 39
qos_traverse_graph: visited = 1
qos_pop: 38
qos_traverse_graph: visited = 1
qos_pop: 37
qos_traverse_graph: visited = 0
qos_traverse_graph: i82551 list = 0x562850493e40
qos_push: 37
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 38
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 38
qos_traverse_graph: visited = 1
qos_pop: 37
qos_traverse_graph: visited = 1
qos_pop: 36
qos_traverse_graph: visited = 0
qos_traverse_graph: i82557a list = 0x562850494660
qos_push: 36
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 37
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 37
qos_traverse_graph: visited = 1
qos_pop: 36
qos_traverse_graph: visited = 1
qos_pop: 35
qos_traverse_graph: visited = 0
qos_traverse_graph: i82557b list = 0x562850494e20
qos_push: 35
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device list = 0x56285049ec70
qos_push: 36
qos_traverse_graph: visited = 0
qos_traverse_graph: pci-device-tests/nop list = (nil)
qos_pop: 36
qos_traverse_graph: visited = 1
qos_pop: 35
qos_traverse_graph: visited = 1
qos_pop: 34
qos_traverse_graph: visited = 

Re: [RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-27 Thread Paolo Bonzini
What is an example of one such huge path? This would mean that LTO is
changing the set of tests that are run, which is unexpected.

Paolo

Il mar 27 set 2022, 23:35 Alex Bennée  ha scritto:

> It seems the depth of path we need to support can vary depending on
> the order of the init constructors getting called. It seems
> --enable-lto shuffles things around just enough to push you over the
> limit.
>
> Signed-off-by: Alex Bennée 
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186
> ---
>  tests/qtest/libqos/qgraph.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
> index 6e94824d09..5c0046e989 100644
> --- a/tests/qtest/libqos/qgraph.h
> +++ b/tests/qtest/libqos/qgraph.h
> @@ -24,7 +24,7 @@
>  #include "libqos-malloc.h"
>
>  /* maximum path length */
> -#define QOS_PATH_MAX_ELEMENT_SIZE 50
> +#define QOS_PATH_MAX_ELEMENT_SIZE 64
>
>  typedef struct QOSGraphObject QOSGraphObject;
>  typedef struct QOSGraphNode QOSGraphNode;
> --
> 2.34.1
>
>


[RFC PATCH] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-09-27 Thread Alex Bennée
It seems the depth of path we need to support can vary depending on
the order of the init constructors getting called. It seems
--enable-lto shuffles things around just enough to push you over the
limit.

Signed-off-by: Alex Bennée 
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186
---
 tests/qtest/libqos/qgraph.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h
index 6e94824d09..5c0046e989 100644
--- a/tests/qtest/libqos/qgraph.h
+++ b/tests/qtest/libqos/qgraph.h
@@ -24,7 +24,7 @@
 #include "libqos-malloc.h"
 
 /* maximum path length */
-#define QOS_PATH_MAX_ELEMENT_SIZE 50
+#define QOS_PATH_MAX_ELEMENT_SIZE 64
 
 typedef struct QOSGraphObject QOSGraphObject;
 typedef struct QOSGraphNode QOSGraphNode;
-- 
2.34.1