commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com --- tools/testing/selftests/bpf/test_select_reuseport.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_select_reuseport.c b/tools/testing/selftests/bpf/test_select_reuseport.c index cdbbdab2725f..b14d25bfa830 100644 --- a/tools/testing/selftests/bpf/test_select_reuseport.c +++ b/tools/testing/selftests/bpf/test_select_reuseport.c @@ -616,13 +616,13 @@ static void cleanup_per_test(void)
for (i = 0; i < NR_RESULTS; i++) { err = bpf_map_update_elem(result_map, &i, &zero, BPF_ANY); - RET_IF(err, "reset elem in result_map", - "i:%u err:%d errno:%d\n", i, err, errno); + CHECK(err, "reset elem in result_map", + "i:%u err:%d errno:%d\n", i, err, errno); }
err = bpf_map_update_elem(linum_map, &zero, &zero, BPF_ANY); - RET_IF(err, "reset line number in linum_map", "err:%d errno:%d\n", - err, errno); + CHECK(err, "reset line number in linum_map", "err:%d errno:%d\n", + err, errno);
for (i = 0; i < REUSEPORT_ARRAY_SIZE; i++) close(sk_fds[i]);
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Lorenz
On Wed, Jun 10, 2020 at 11:16:16AM +0100, Lorenz Bauer wrote:
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Is this patch in Linus's tree yet? If so, just tell us the git commit id. If not, it needs to go there first before we can take it to any stable tree.
thanks,
greg k-h
On Wed, 10 Jun 2020 at 12:50, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 11:16:16AM +0100, Lorenz Bauer wrote:
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Is this patch in Linus's tree yet? If so, just tell us the git commit id. If not, it needs to go there first before we can take it to any stable tree.
The patch isn't in Linus' tree because the problem doesn't exist there. It fixes a build problem on v4.19 which was introduced by the backport of an earlier fix of mine, commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs").
There is a similar fix from Andrii Nakryiko that went into 5.4 as commit aee43146cc10 ("selftest/bpf: fix backported test_select_reuseport selftest changes"), which I hadn't seen at the time.
Lorenz
On Wed, Jun 10, 2020 at 01:10:14PM +0100, Lorenz Bauer wrote:
On Wed, 10 Jun 2020 at 12:50, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 11:16:16AM +0100, Lorenz Bauer wrote:
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Is this patch in Linus's tree yet? If so, just tell us the git commit id. If not, it needs to go there first before we can take it to any stable tree.
The patch isn't in Linus' tree because the problem doesn't exist there. It fixes a build problem on v4.19 which was introduced by the backport of an earlier fix of mine, commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs").
There is a similar fix from Andrii Nakryiko that went into 5.4 as commit aee43146cc10 ("selftest/bpf: fix backported test_select_reuseport selftest changes"), which I hadn't seen at the time.
Ah, ok, that wasn't very obvious, sorry. I'll queue this up after the next round of kernels are released in a day or so...
thanks,
greg k-h
On Wed, 10 Jun 2020 at 13:24, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 01:10:14PM +0100, Lorenz Bauer wrote:
On Wed, 10 Jun 2020 at 12:50, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 11:16:16AM +0100, Lorenz Bauer wrote:
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote:
commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") uses a macro RET_IF which doesn't exist in the v4.19 tree. It is defined as follows:
#define RET_IF(condition, tag, format...) ({ if (CHECK_FAIL(condition)) { printf(tag " " format); return; } })
CHECK_FAIL in turn is defined as:
#define CHECK_FAIL(condition) ({ int __ret = !!(condition); int __save_errno = errno; if (__ret) { test__fail(); fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); } errno = __save_errno; __ret; })
Replace occurences of RET_IF with CHECK. This will abort the test binary if clearing the intermediate state fails.
Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") Reported-by: kernel test robot rong.a.chen@intel.com Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Is this patch in Linus's tree yet? If so, just tell us the git commit id. If not, it needs to go there first before we can take it to any stable tree.
The patch isn't in Linus' tree because the problem doesn't exist there. It fixes a build problem on v4.19 which was introduced by the backport of an earlier fix of mine, commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs").
There is a similar fix from Andrii Nakryiko that went into 5.4 as commit aee43146cc10 ("selftest/bpf: fix backported test_select_reuseport selftest changes"), which I hadn't seen at the time.
Ah, ok, that wasn't very obvious, sorry. I'll queue this up after the next round of kernels are released in a day or so...
No, it was my bad. What can I do to avoid this next time? I've tried to follow the -stable FAQ, but that didn't work as you can see ;)
Lorenz
On Wed, Jun 10, 2020 at 02:34:16PM +0100, Lorenz Bauer wrote:
On Wed, 10 Jun 2020 at 13:24, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 01:10:14PM +0100, Lorenz Bauer wrote:
On Wed, 10 Jun 2020 at 12:50, Greg KH gregkh@linuxfoundation.org wrote:
On Wed, Jun 10, 2020 at 11:16:16AM +0100, Lorenz Bauer wrote:
On Fri, 22 May 2020 at 01:09, Sasha Levin sashal@kernel.org wrote:
On Thu, May 21, 2020 at 03:48:41PM +0100, Lorenz Bauer wrote: >commit 634efb750435 ("selftests: bpf: Reset global state between >reuseport test runs") uses a macro RET_IF which doesn't exist in >the v4.19 tree. It is defined as follows: > > #define RET_IF(condition, tag, format...) ({ > if (CHECK_FAIL(condition)) { > printf(tag " " format); > return; > } > }) > >CHECK_FAIL in turn is defined as: > > #define CHECK_FAIL(condition) ({ > int __ret = !!(condition); > int __save_errno = errno; > if (__ret) { > test__fail(); > fprintf(stdout, "%s:FAIL:%d\n", __func__, __LINE__); > } > errno = __save_errno; > __ret; > }) > >Replace occurences of RET_IF with CHECK. This will abort the test binary >if clearing the intermediate state fails. > >Fixes: 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs") >Reported-by: kernel test robot rong.a.chen@intel.com >Signed-off-by: Lorenz Bauer lmb@cloudflare.com
Thanks for the backport Lorenz. We'll need to wait for it to make it into Linus's tree before queueing up for the stable trees.
Apologies for sending the patch too early (?), I'm still new to this process. I've just hit this on 4.19.127. Do you want me to re-submit the patch somewhere?
Is this patch in Linus's tree yet? If so, just tell us the git commit id. If not, it needs to go there first before we can take it to any stable tree.
The patch isn't in Linus' tree because the problem doesn't exist there. It fixes a build problem on v4.19 which was introduced by the backport of an earlier fix of mine, commit 634efb750435 ("selftests: bpf: Reset global state between reuseport test runs").
There is a similar fix from Andrii Nakryiko that went into 5.4 as commit aee43146cc10 ("selftest/bpf: fix backported test_select_reuseport selftest changes"), which I hadn't seen at the time.
Ah, ok, that wasn't very obvious, sorry. I'll queue this up after the next round of kernels are released in a day or so...
No, it was my bad. What can I do to avoid this next time?
Be _VERY_ explicit as to why this is only a 4.19 patch, and what this means, and why it is so. We see hundreds of patches a day, and almost none of them are this type of "special" case, so it must have to stand-out as you are doing something not very usual.
thanks,
greg k-h
linux-stable-mirror@lists.linaro.org