Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-24 Thread Andreas Schwab
On Mär 24 2021, Heinrich Schuchardt wrote: > And foo is obviously "changed between the setjmp invocation and longjmp > call". > > The current version of the patch is: > https://patchwork.ozlabs.org/project/uboot/patch/20210323181127.32411-3-xypron.g...@gmx.de/ > > So I guess we have to declare

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-24 Thread Heinrich Schuchardt
On 24.03.21 13:39, Andreas Schwab wrote: > On Mär 24 2021, Heinrich Schuchardt wrote: > >> And foo is obviously "changed between the setjmp invocation and longjmp >> call". >> >> The current version of the patch is: >>

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-24 Thread Andreas Schwab
On Mär 22 2021, Sean Anderson wrote: > int test_longjmp_ret(int i) > { > jmp_buf env; > int ret; > int foo = i; > > ret = setjmp(env); > if (ret) > return foo; > foo = 0x1000; > longjmp(env, i); > /* We should not arrive here */ > return foo;

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-24 Thread Heinrich Schuchardt
On 24.03.21 10:18, Andreas Schwab wrote: > On Mär 22 2021, Sean Anderson wrote: > >> int test_longjmp_ret(int i) >> { >> jmp_buf env; >> int ret; >> int foo = i; >> >> ret = setjmp(env); >> if (ret) >> return foo; >> foo = 0x1000; >> longjmp(env, i); >>

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-23 Thread Sean Anderson
On 3/22/21 12:42 PM, Heinrich Schuchardt wrote: On 22.03.21 14:30, Sean Anderson wrote: On 3/22/21 9:23 AM, Sean Anderson wrote: On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2:     no change

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Heinrich Schuchardt
On 22.03.21 14:30, Sean Anderson wrote: > > On 3/22/21 9:23 AM, Sean Anderson wrote: >> >> On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: >>> Provide a unit test for the longjmp() library function >>> >>> Signed-off-by: Heinrich Schuchardt >>> --- >>> v2: >>>     no change >>> --- >>>  

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Sean Anderson
On 3/22/21 9:23 AM, Sean Anderson wrote: On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44

Re: [PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Sean Anderson
On 3/22/21 7:02 AM, Heinrich Schuchardt wrote: Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44 2 files changed, 45

[PATCH v2 2/2] test: unit test for longjmp

2021-03-22 Thread Heinrich Schuchardt
Provide a unit test for the longjmp() library function Signed-off-by: Heinrich Schuchardt --- v2: no change --- test/lib/Makefile | 1 + test/lib/longjmp.c | 44 2 files changed, 45 insertions(+) create mode 100644 test/lib/longjmp.c diff