From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Bates Subject: [PATCH net-next] tc-testing: Add newline when writing test case files Date: Thu, 29 Mar 2018 15:58:10 -0400 Message-ID: <1522353490-30164-1-git-send-email-lucasb@mojatatu.com> Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, Lucas Bates To: davem@davemloft.net Return-path: Received: from mail-io0-f193.google.com ([209.85.223.193]:37153 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbeC2T6j (ORCPT ); Thu, 29 Mar 2018 15:58:39 -0400 Received: by mail-io0-f193.google.com with SMTP id y128so8996340iod.4 for ; Thu, 29 Mar 2018 12:58:38 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: When using the -i feature to generate random ID numbers for test cases in tdc, the function that writes the JSON to file doesn't add a newline character to the end of the file, so we have to add our own. Signed-off-by: Lucas Bates --- tools/testing/selftests/tc-testing/tdc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/tc-testing/tdc.py b/tools/testing/selftests/tc-testing/tdc.py index 44de4a2..87a04a8 100755 --- a/tools/testing/selftests/tc-testing/tdc.py +++ b/tools/testing/selftests/tc-testing/tdc.py @@ -490,6 +490,7 @@ def generate_case_ids(alltests): testlist.append(t) outfile = open(f, "w") json.dump(testlist, outfile, indent=4) + outfile.write("\n") outfile.close() def filter_tests_by_id(args, testlist):