Skip to contentSkip to conversation

net: Disable building tst_get_unused_port in old API

PATCH New Petr Vorel 2 participants 3 messages May 24, 2019

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH 1/1 net: Disable building tst_get_unused_port in old API

Commit fa6a4e708 moved tst_get_unused_port into new API, but left code in Makefile built it also for old API. It was up to make which of these was copied last and remain installed.

Also remove comparison for tst_get_unused_port from ltpapicmd.c.

Fixes fa6a4e708 ("net: Introduce TST_GET_UNUSED_PORT() macro into C API")

---
Hi,

sorry for introducing a regression.

Kind regards,
Petr

---
 tools/apicmds/Makefile    | 2 +-
 tools/apicmds/ltpapicmd.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
tools/apicmds/Makefile +1 -1
index 11763e2cc..4b2a60495 100644
@@ -28,7 +28,7 @@ CPPFLAGS		+= -D_GNU_SOURCE
 
 MAKE_TARGETS		:= $(addprefix tst_,brk brkm exit \
 			     res resm ncpus ncpus_conf ncpus_max \
-			     get_unused_port fs_has_free)
+			     fs_has_free)
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
 
tools/apicmds/ltpapicmd.c +1 -2
index f7e2a5eab..c4fab3218 100644
@@ -262,8 +262,7 @@ int main(int argc, char *argv[])
 	tst_total = getenv("TST_TOTAL");
 	tst_cntstr = getenv("TST_COUNT");
 	if (TCID == NULL || tst_total == NULL || tst_cntstr == NULL) {
-		 if(!strcmp(cmd_name, "tst_fs_has_free") &&
-		    !strcmp(cmd_name, "tst_get_unused_port")) {
+		 if(!strcmp(cmd_name, "tst_fs_has_free")) {
 			fprintf(stderr,
 				"\nSet variables TCID, TST_TOTAL, and TST_COUNT before each test:\n"
 				"export TCID=<test name>\n"
Signature · 1 line
2.21.0
#1 lore raw

PATCH 1/1 net: Disable building tst_get_unused_port in old API

Hi!

Quoted 7 lines

Commit fa6a4e708 moved tst_get_unused_port into new API, but left code in Makefile built it also for old API. It was up to make which of these was copied last and remain installed.

Also remove comparison for tst_get_unused_port from ltpapicmd.c.

Fixes fa6a4e708 ("net: Introduce TST_GET_UNUSED_PORT() macro into C API")

Sorry for not catching that during review, this is obviously fine, acked.

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#2 lore raw

PATCH 1/1 net: Disable building tst_get_unused_port in old API

Hi,

Quoted 10 lines
Quoted 7 lines

Commit fa6a4e708 moved tst_get_unused_port into new API, but left code in Makefile built it also for old API. It was up to make which of these was copied last and remain installed.

Also remove comparison for tst_get_unused_port from ltpapicmd.c.

Fixes fa6a4e708 ("net: Introduce TST_GET_UNUSED_PORT() macro into C API")

Sorry for not catching that during review, this is obviously fine, acked.

Thanks for a review, merged.

Kind regards,
Petr