1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TomatoUSB source - the mess that is release/src-rt/router/udev/test

Discussion in 'Tomato Firmware' started by koitsu, Jul 6, 2013.

  1. koitsu

    koitsu Network Guru Member

    Does anyone know if the completely broken mess that is this directory is actually used by the build process?

    There are tons of symbolic links in this directory that are broken/point to invalid locations of things, which causes all sorts of utilities (such as grep -r) to throw hundreds of nastygrams (specifically 543 nastygrams) when trying to open() a symlink that points to a non-existent thing. Example:

    Code:
    grep: warning: ./sys/block/rd!c0d0/device/driver/0:0:0:0: recursive directory loop
    
    Proof:

    Code:
    jdc@debian:~/tomato/release/src-rt/router/udev/test$ grep -r foobarblat . 2>&1 | grep -c "grep: warning"
    543
    
    There are 433 entries in the sys/ directory, all of which don't really seem to serve a purpose (from what I can tell, but that's why I'm asking!):

    Code:
    jdc@debian:~/tomato/release/src-rt/router/udev/test$ find sys | wc -l
    433
    
    I get the impression someone (maybe Jon Zarate?) did a make buildtest at some point in release/src-rt/router/udev, followed by make test or make tests. The scripts that create this sys/ directory filled with nonsense are the test/udevstart-test.pl and test/udev-test.pl scripts.

    I would really like to see this cleaned up...
     
  2. Toastman

    Toastman Super Moderator Staff Member Member

    Koitsu, I remember Teddy mentioning this a few years ago, saying much the same thing. It doesn't make any sense to me either. Shibby, Vic, what do you think?
     
  3. RMerlin

    RMerlin Network Guru Member

    That one also made me scratch my head recently, especially since the ARM SDK from Asus had some differences in the udev folder, making it a pain to merge with all those circular links. I will eventually have a look at it, see if it even gets used at all by the build system.
     
  4. RMerlin

    RMerlin Network Guru Member

    I just did an Asuswrt-Merlin build for RT-AC56U without that sys directory, and it seemed to work out just fine. It might indeed be some leftovers only needed for tests - which I doubt either of us run in our build process.
     
  5. koitsu

    koitsu Network Guru Member

    Sounds like a good candidate for git rm then. :D My gut feeling is that it's someone doing udev testing from long ago (my guess is pre-VCS (version control system) days) and someone blindly added it when it came time to switch to a VCS.

    The udev code we have seems to be really ancient compared to what common Linuxes today use, but migrating to something new is a separate topic/subject. I only mention it because when I went trying to find the "official udev site" (to examine its code/see if that sys/ directory was present there), all I found was the newer udev stuff (quite different).
     
  6. Toastman

    Toastman Super Moderator Staff Member Member

    I vote we exorcise it :p
     
  7. darkknight93

    darkknight93 Networkin' Nut Member

    exorcise? You mean:
    ku-medium.gif
     
  8. Toastman

    Toastman Super Moderator Staff Member Member

  9. RMerlin

    RMerlin Network Guru Member

Share This Page