Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Michal Prívozník wrote: > On 1/7/22 13:38, Ani Sinha wrote: > > > > > > > Ok fine but still, life is not ideal ... libraries do have bugs. > > In that case, where do we draw the line? Say pthread has a bug and it > doesn't spawn threads. Worse, it doesn't even return any erro

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Michal Prívozník
On 1/7/22 13:38, Ani Sinha wrote: > > > Ok fine but still, life is not ideal ... libraries do have bugs. In that case, where do we draw the line? Say pthread has a bug and it doesn't spawn threads. Worse, it doesn't even return any error value. Should we mitigate that too? I'd say stick with w

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Daniel P. Berrangé wrote: > On Fri, Jan 07, 2022 at 06:04:04PM +0530, Ani Sinha wrote: > > > > > > On Fri, 7 Jan 2022, Daniel P. Berrangé wrote: > > > > > On Fri, Jan 07, 2022 at 05:24:18PM +0530, Ani Sinha wrote: > > > > > > > > > > > > On Fri, 7 Jan 2022, Ján Tomko wrote: >

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Daniel P . Berrangé
On Fri, Jan 07, 2022 at 06:04:04PM +0530, Ani Sinha wrote: > > > On Fri, 7 Jan 2022, Daniel P. Berrangé wrote: > > > On Fri, Jan 07, 2022 at 05:24:18PM +0530, Ani Sinha wrote: > > > > > > > > > On Fri, 7 Jan 2022, Ján Tomko wrote: > > > > > > > On a Friday in 2022, Ani Sinha wrote: > > > > > On

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Daniel P. Berrangé wrote: > On Fri, Jan 07, 2022 at 05:24:18PM +0530, Ani Sinha wrote: > > > > > > On Fri, 7 Jan 2022, Ján Tomko wrote: > > > > > On a Friday in 2022, Ani Sinha wrote: > > > > On Fri, 7 Jan 2022, Michal Prívozník wrote: > > > > > I don't think so. Just like we

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Michal Prívozník
On 1/7/22 09:34, Ani Sinha wrote: > > > On Fri, 7 Jan 2022, Michal Prívozník wrote: > >> On 1/7/22 09:05, Ani Sinha wrote: >>> >>> >>> On Fri, 7 Jan 2022, Michal Privoznik wrote: >>> Both virProcessGetStatInfo() and virProcessGetSchedInfo() are Linux centric. Provide stubs for non-Linu

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Ján Tomko wrote: > On a Friday in 2022, Ani Sinha wrote: > > > > > > On Fri, 7 Jan 2022, Ján Tomko wrote: > > > > > On a Friday in 2022, Ani Sinha wrote: > > > > On Fri, 7 Jan 2022, Michal Prívozník wrote: > > > > > I don't think so. Just like we've discussed under one patch

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ján Tomko
On a Friday in 2022, Ani Sinha wrote: On Fri, 7 Jan 2022, Ján Tomko wrote: On a Friday in 2022, Ani Sinha wrote: > On Fri, 7 Jan 2022, Michal Prívozník wrote: > > I don't think so. Just like we've discussed under one patch of yours, a > > function should either report error in all cases or no

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Daniel P . Berrangé
On Fri, Jan 07, 2022 at 05:24:18PM +0530, Ani Sinha wrote: > > > On Fri, 7 Jan 2022, Ján Tomko wrote: > > > On a Friday in 2022, Ani Sinha wrote: > > > On Fri, 7 Jan 2022, Michal Prívozník wrote: > > > > I don't think so. Just like we've discussed under one patch of yours, a > > > > function sho

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Ján Tomko wrote: > On a Friday in 2022, Ani Sinha wrote: > > On Fri, 7 Jan 2022, Michal Prívozník wrote: > > > I don't think so. Just like we've discussed under one patch of yours, a > > > function should either report error in all cases or none. And in case of > > > virProce

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ján Tomko
On a Friday in 2022, Ani Sinha wrote: On Fri, 7 Jan 2022, Michal Prívozník wrote: I don't think so. Just like we've discussed under one patch of yours, a function should either report error in all cases or none. And in case of virProcessGetSchedInfo() the linux version does report error I see

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ján Tomko
On a Friday in 2022, Michal Privoznik wrote: Both virProcessGetStatInfo() and virProcessGetSchedInfo() are Linux centric. Provide stubs for non-Linux platforms. Signed-off-by: Michal Privoznik --- src/util/virprocess.c | 24 1 file changed, 24 insertions(+) Reviewed-b

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Peter Krempa
On Fri, Jan 07, 2022 at 08:55:16 +0100, Michal Privoznik wrote: > Both virProcessGetStatInfo() and virProcessGetSchedInfo() are > Linux centric. Provide stubs for non-Linux platforms. Fixes: d73852c49962fbfe652fc7bec595a3f242faf847 > > Signed-off-by: Michal Privoznik > --- > src/util/virproces

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Michal Prívozník wrote: > On 1/7/22 09:05, Ani Sinha wrote: > > > > > > On Fri, 7 Jan 2022, Michal Privoznik wrote: > > > >> Both virProcessGetStatInfo() and virProcessGetSchedInfo() are > >> Linux centric. Provide stubs for non-Linux platforms. > >> > >> Signed-off-by: Micha

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Michal Prívozník
On 1/7/22 09:05, Ani Sinha wrote: > > > On Fri, 7 Jan 2022, Michal Privoznik wrote: > >> Both virProcessGetStatInfo() and virProcessGetSchedInfo() are >> Linux centric. Provide stubs for non-Linux platforms. >> >> Signed-off-by: Michal Privoznik >> --- >> src/util/virprocess.c | 24 +++

Re: [PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-07 Thread Ani Sinha
On Fri, 7 Jan 2022, Michal Privoznik wrote: > Both virProcessGetStatInfo() and virProcessGetSchedInfo() are > Linux centric. Provide stubs for non-Linux platforms. > > Signed-off-by: Michal Privoznik > --- > src/util/virprocess.c | 24 > 1 file changed, 24 insertions(

[PATCH] virprocess: Provide non-Linux stubs for virProcessGet{Stat, Sched}Info

2022-01-06 Thread Michal Privoznik
Both virProcessGetStatInfo() and virProcessGetSchedInfo() are Linux centric. Provide stubs for non-Linux platforms. Signed-off-by: Michal Privoznik --- src/util/virprocess.c | 24 1 file changed, 24 insertions(+) diff --git a/src/util/virprocess.c b/src/util/virprocess.