All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] sctp: insert a space to isolate two word
@ 2018-06-04  3:26 Sun Lianwen
  2018-06-04  5:52 ` Petr Vorel
  0 siblings, 1 reply; 3+ messages in thread
From: Sun Lianwen @ 2018-06-04  3:26 UTC (permalink / raw)
  To: ltp

In statement tst_brkm(TBROK, tst_exit, "a b"
              "c");
There is need a space between word "b" and "c" to isolate these
two words, otherwise will print "a bc"

Reported-by: Wei Xingshen <weixshen@gmail.com>
Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
---
 utils/sctp/testlib/sctputil.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
index 564925ce9..6f873d8d2 100644
--- a/utils/sctp/testlib/sctputil.c
+++ b/utils/sctp/testlib/sctputil.c
@@ -198,7 +198,7 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags,
 		
 	sn = (union sctp_notification *)buf;
 	if (sn->sn_header.sn_type != expected_sn_type)
-		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
+		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
 			 "expected:%d", sn->sn_header.sn_type,
 			  expected_sn_type);
 	
@@ -237,7 +237,7 @@ test_check_buf_data(void *buf, int datalen, int msg_flags,
 		    uint32_t expected_ppid)
 {
 	if (msg_flags & MSG_NOTIFICATION)
-		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
+		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
 			 "datamsg");
 
 	if (expected_datalen <= 0)
-- 
2.17.0




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] sctp: insert a space to isolate two word
  2018-06-04  3:26 [LTP] [PATCH] sctp: insert a space to isolate two word Sun Lianwen
@ 2018-06-04  5:52 ` Petr Vorel
  2018-06-04  6:19   ` Sun Lianwen
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Vorel @ 2018-06-04  5:52 UTC (permalink / raw)
  To: ltp

Hi Sun,

> In statement tst_brkm(TBROK, tst_exit, "a b"
>               "c");
> There is need a space between word "b" and "c" to isolate these
> two words, otherwise will print "a bc"

> Reported-by: Wei Xingshen <weixshen@gmail.com>
> Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
> ---
>  utils/sctp/testlib/sctputil.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
> index 564925ce9..6f873d8d2 100644
> --- a/utils/sctp/testlib/sctputil.c
> +++ b/utils/sctp/testlib/sctputil.c
> @@ -198,7 +198,7 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags,

>  	sn = (union sctp_notification *)buf;
>  	if (sn->sn_header.sn_type != expected_sn_type)
> -		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
> +		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
>  			 "expected:%d", sn->sn_header.sn_type,
>  			  expected_sn_type);

> @@ -237,7 +237,7 @@ test_check_buf_data(void *buf, int datalen, int msg_flags,
>  		    uint32_t expected_ppid)
>  {
>  	if (msg_flags & MSG_NOTIFICATION)
> -		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
> +		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
>  			 "datamsg");

Correct, thanks for fix. Personally I prefer to join the string to have it on single line,
although it's over 80 chars (better for git grep). There are more of these strings in the
file.


Kind regards,
Petr

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [LTP] [PATCH] sctp: insert a space to isolate two word
  2018-06-04  5:52 ` Petr Vorel
@ 2018-06-04  6:19   ` Sun Lianwen
  0 siblings, 0 replies; 3+ messages in thread
From: Sun Lianwen @ 2018-06-04  6:19 UTC (permalink / raw)
  To: ltp

Hi Petr,

On 06/04/2018 01:52 PM, Petr Vorel wrote:
> Hi Sun,
> 
>> In statement tst_brkm(TBROK, tst_exit, "a b"
>>               "c");
>> There is need a space between word "b" and "c" to isolate these
>> two words, otherwise will print "a bc"
> 
>> Reported-by: Wei Xingshen <weixshen@gmail.com>
>> Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
>> ---
>>  utils/sctp/testlib/sctputil.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>> diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
>> index 564925ce9..6f873d8d2 100644
>> --- a/utils/sctp/testlib/sctputil.c
>> +++ b/utils/sctp/testlib/sctputil.c
>> @@ -198,7 +198,7 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags,
> 
>>  	sn = (union sctp_notification *)buf;
>>  	if (sn->sn_header.sn_type != expected_sn_type)
>> -		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
>> +		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
>>  			 "expected:%d", sn->sn_header.sn_type,
>>  			  expected_sn_type);
> 
>> @@ -237,7 +237,7 @@ test_check_buf_data(void *buf, int datalen, int msg_flags,
>>  		    uint32_t expected_ppid)
>>  {
>>  	if (msg_flags & MSG_NOTIFICATION)
>> -		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
>> +		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
>>  			 "datamsg");
> 
> Correct, thanks for fix. Personally I prefer to join the string to have it on single line,
> although it's over 80 chars (better for git grep). There are more of these strings in the
> file.
> 
Thanks your advise, I will rewrite a patch
> 
> Kind regards,
> Petr
> 
> 
> .
> 
Thanks 
Sun Lianwen



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-04  6:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04  3:26 [LTP] [PATCH] sctp: insert a space to isolate two word Sun Lianwen
2018-06-04  5:52 ` Petr Vorel
2018-06-04  6:19   ` Sun Lianwen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.