Skip to contentSkip to conversation

Removing a duplicate condition.

PATCH In review Isaac Young 3 participants 3 messages Feb 11, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Removing a duplicate condition.

---
 tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +1 -1
index 098bcae5f827..0954c7a8aa08 100644
@@ -823,7 +823,7 @@ void test_select_reuseport(void)
 
 	saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
 	saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
-	if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)
+	if (saved_tcp_syncookie < 0)
 		goto out;
 
 	if (enable_fastopen())
Signature · 1 line
2.24.1
#1 lore raw
Quoted 11 lines · Isaac Young
---
 tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +0 -0
index 098bcae5f827..0954c7a8aa08 100644

tools/testing/selftests/bpf/prog_tests/select_reuseport.c void test_select_reuseport(void) · line 827

Quoted 6 lines
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +1 -1
@@ -823,7 +823,7 @@ void test_select_reuseport(void)
 
        saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
        saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
-       if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)
+       if (saved_tcp_syncookie < 0)
                goto out;

please resend this patch to bpf@vger and cc maintainers. Also see bpf_devel_QA.rst
Thanks

maintainer
#2 lore raw
In reply to Isaac Young

Please include subsystem and test name in the subject line.

Quoted 1 line · Isaac Young

Missing commit log

tools/testing/selftests/bpf/prog_tests/select_reuseport.c void test_select_reuseport(void) · line 826

Quoted 13 lines
---
  tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +0 -1
index 098bcae5f827..0954c7a8aa08 100644
@@ -823,7 +823,7 @@ void test_select_reuseport(void)
 
  	saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
  	saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
-	if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)

This might not be the right fix. I think the check should be if (saved_tcp_fo < 0 || saved_tcp_syncookie < 0)

at least makes the most sense based on the code.

tools/testing/selftests/bpf/prog_tests/select_reuseport.c void test_select_reuseport(void) · line 829

Quoted 5 lines
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +1 -0
+	if (saved_tcp_syncookie < 0)
  		goto out;
 
  	if (enable_fastopen())

thanks,
-- Shuah