LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-29-2015, 11:50 PM   #1
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Why is VIM's Test Suite Crap?


I'm talking about when you build VIM from source... The test suite (make check) is either broken or garbage that needs replaced. It dumps binary and control characters to the screen that often scramble the terminal beyond recovery.

Yes, I've tried "make check &> test-log" too. Then tried to grep that for error and you know what, that fried the terminal too, as soon as the command exited.

If the test doesn't provide reliable and usable output, why hasn't it just been scrapped? I know I'm not suffering anymore reboots over it.

I just want to know if there's some secret reason it does this... Like for testing something specific I'm not familiar with. If not, I already have my answer... I read and article a couple of years ago about the extent that obsolete crap exists in open source code, simply because no one as ever thought to remove it.
 
Old 08-30-2015, 04:58 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Luridis View Post
The test suite (make check) is either broken or garbage that needs replaced. (..) I read and article a couple of years ago about the extent that obsolete crap exists in open source code, simply because no one as ever thought to remove it.
File a detailed bug report?
 
Old 08-30-2015, 01:07 PM   #3
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by unSpawn View Post
File a detailed bug report?
It seems to do a whole hell of a lot of it for someone not to have noticed. But, I'll do some research.

Personally, even though it is still useful and I have no issue with using it, I think things like Vi and Emacs are obsolete designs, even for console only work. Most of that stuff was designed for remote terminals over very low baud rates. So, it might still be preferred for editing files on say... a spacecraft over low speed RF.

Note: I do still think the console is relevant and I even prefer it for some work. I just mean these older hot-key, minimal screen change designs that become unfriendly if you stop using them for 6 months. And yes, I'm aware that if you use them every day it's no problem and they have powerful features. I just wish they'd update the UI. I always end up forgetting something and need to go to another term to see the manual.
 
Old 08-30-2015, 03:17 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Luridis View Post
It seems to do a whole hell of a lot of it for someone not to have noticed. But, I'll do some research.
Frankly, a little research before posting might have been better. You might have asked "How to use Vim's test suite?", instead of why it is crap.

Unless you are simply determined to rant, maybe this will help you understand how it works.

First of all, note that the make check build target is exactly that - a build target for make. As such, it works by invoking shell commands and in general writing the output of those commands to the shell, or as redirected by the make rules.

It is NOT an interactive test suite application. So whether or not you think the output is garbage depends a lot on what your expectations were. What were you expecting it to do?

Looking at the makefile rules, it automates various operations with Vim by invoking a suite of scripts found in .../src/testdir/testxx.in, and writes the results to similarly named testxx.out files. You see the individual test results by looking into those out files. Some of the tests include use of non-ascii characters (it is a test...) and some are intended to produce an error - that is the object of the test. Consequently it may indeed write garbage out! This from the .../src/Makefile:

Code:
# Execute the test scripts.  Run these after compiling Vim, before installing.
# This doesn't depend on $(VIMTARGET), because that won't work when configure
# wasn't run yet.  Restart make to build it instead.
#
# This will produce a lot of garbage on your screen, including a few error
# messages.  Don't worry about that.
# If there is a real error, there will be a difference between "testXX.out" and
# a "testXX.ok" file.
# If everything is alright, the final message will be "ALL DONE".  If not you
# get "TEST FAILURE".
#
test check:
        $(MAKE) -f Makefile $(VIMTARGET)
        if test -n "$(MAKEMO)" -a -f $(PODIR)/Makefile; then \
                cd $(PODIR); $(MAKE) -f Makefile check VIM=../$(VIMTARGET); \
        fi
        -if test $(VIMTARGET) != vim -a ! -r vim; then \
                ln -s $(VIMTARGET) vim; \
        fi
        cd testdir; $(MAKE) -f Makefile $(GUI_TESTTARGET) VIMPROG=../$(VIMTARGET) $(GUI_TESTARG)
        $(MAKE) -f Makefile unittest

unittesttargets:
        $(MAKE) -f Makefile $(UNITTEST_TARGETS)

unittest unittests: $(UNITTEST_TARGETS)
        @for t in $(UNITTEST_TARGETS); do \
                ./$$t || exit 1; echo $$t passed; \
        done

# Run individual test, assuming that Vim was already compiled.
test1 test2 test3 test4 test5 test6 test7 test8 test9 \
        test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 \
        test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
        test30 test31 test32 test33 test34 test35 test36 test37 test38 test39 \
So, please understand that the check (aka test) make targets produce their output as files, and what is written to the shell from which it is run is largely a by-product of the tests.

If this produces side effects that mangle your shell environment, entirely likely, simply run it inside a throw-away terminal window, or redirect the output to a file that you can browse after the fact...

Code:
make check 2>&1 >mycheckfile
In fairness, I quickly looked online for some extra guidance for using the make check target and did not find anything obviously useful. On the other hand, as said, it is a make target, so it should depend only on the user's knowledge of make in order to be used. If you are building it, there is the implicit assumption that you know how to read the target comments. That would be more useful than concluding that it is all just crap and obsolete, simply because you do not know how to use it.

Otherwise you might be better using your distro's Vim package and let them run the tests, or skipping the tests if they don't mean anything to you.

Last edited by astrogeek; 08-30-2015 at 03:42 PM. Reason: tpos, typs, typox
 
Old 08-30-2015, 04:28 PM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Original Poster
Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by astrogeek View Post
In fairness, I quickly looked online for some extra guidance for using the make check target and did not find anything obviously useful. On the other hand, as said, it is a make target, so it should depend only on the user's knowledge of make in order to be used. If you are building it, there is the implicit assumption that you know how to read the target comments. That would be more useful than concluding that it is all just crap and obsolete, simply because you do not know how to use it.

Otherwise you might be better using your distro's Vim package and let them run the tests, or skipping the tests if they don't mean anything to you.
You're right, I should have looked a little closer. I try not to knee-jerk on things, but when I am groggy and irritated, sometimes venting slips through. I didn't stop to think it was possibly error testing, and possibly deliberate attempts to crash the program.

Something I've always found odd about human nature is that we tend to behave differently when following someone else's instructions. Something goes wrong and we panic, where we would not have if we were trying to figure it out ourselves. And well... I'm just as guilty. Sorry about that.
 
Old 08-30-2015, 04:32 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by Luridis View Post
...we tend to behave differently when following someone else's instructions...
Indeed we do!

Glad that helped, good luck!
 
  


Reply

Tags
error, make, terminal, vim



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
glibc test suite errors edgezors Linux From Scratch 6 07-21-2011 02:25 PM
CD-R test suite for CentOS 4/5 slinx Linux - Software 1 01-28-2010 04:38 PM
Phoronix Test Suite anupamjamatia Linux - Software 1 11-13-2008 08:36 AM
performance test suite kadamsuvarna Linux - General 1 12-27-2006 09:48 PM
Hardware Test Suite DaKKoN Linux - Software 1 08-12-2004 08:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration