Path: csiph.com!goblin3!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Changqing Li Newsgroups: gnu.bash.bug Subject: test run-new-exp: improvement of test warning Date: Fri, 23 Nov 2018 10:01:14 +0800 Lines: 62 Approved: bug-bash@gnu.org Message-ID: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------451C6B8D4FD0A170831D834B" X-Trace: usenet.stanford.edu 1542939937 4538 208.118.235.17 (23 Nov 2018 02:25:37 GMT) X-Complaints-To: action@cs.stanford.edu To: Envelope-to: bug-bash@gnu.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 Content-Language: en-US X-Originating-IP: [128.224.162.228] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 192.103.53.11 X-Mailman-Approved-At: Thu, 22 Nov 2018 21:25:35 -0500 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14842 --------------451C6B8D4FD0A170831D834B Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Hi, Test run-new-exp maybe fail when run as root, but not real fail, detail please see the attached patch. Version info: Bash 4.4.18 -- BRs Sandy(Li Changqing) --------------451C6B8D4FD0A170831D834B Content-Type: text/x-patch; name="0001-run-new-exp-add-a-warning-of-not-real-failure.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-run-new-exp-add-a-warning-of-not-real-failure.patch" >From 87a5bb56391fa6f2cd2604e01d5b6b5d6142fcb3 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Fri, 23 Nov 2018 09:50:26 +0800 Subject: [PATCH] run-new-exp: add a warning of not real failure run-new-exp test fail when run as root user, but not fail as non-root user. since in new-exp.right, we use $ as prompt, but for root. it is #, this is not a real fail. Maybe also should add a warning here Signed-off-by: Changqing Li --- tests/run-new-exp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/run-new-exp b/tests/run-new-exp index 8777c7b..d3ae5e0 100644 --- a/tests/run-new-exp +++ b/tests/run-new-exp @@ -5,6 +5,9 @@ echo "warning: this a test failure" >&2 echo "warning: if you have exported variables beginning with the string _Q," >&2 echo "warning: diff output may be generated. If so, please do not consider" >&2 echo "warning: this a test failure" >&2 +echo "warning: Beside above 2 tests, another test maybe fail if your run test" >&2 +echo "warning: as root user, root user's prompt is #, non-root user's prompt's" >&2 +echo "warning: prompt is $, Please do not consider this a test failure" >&2 ${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > ${BASH_TSTOUT} diff ${BASH_TSTOUT} new-exp.right && rm -f ${BASH_TSTOUT} -- 2.7.4 --------------451C6B8D4FD0A170831D834B--