1. 10

    I’ve been building a C testing framework for work and heard about Snow on Lobsters, so I’m planning to peruse it’s features for inspiration. The one I’m building isn’t as macro-heavy/macro-driven but I think there are a number of advantages to leveraging macros so I want to see what I can add.

    1. 5

      You should have a look at greatest, which has worked out great for me in the past. I don’t do a lot of C, but dropped my own little testing setup for greatest, and haven’t looked back.

      1. 2

        I’ll check it out, thanks for the link. At a glance, my framework does look similar.

        Probably worth mentioning, I am sort of targeting this at folks that develop software using the traditional full cycle SDLC and have to live through that cycle many many times. As a result, I also have a goal to formally support requirements engineering. Basically what that means is that as a test engineer writes a test for a developer to implement against, they can optionally map it to either a requirement (by ID), a type of requirement (functional, non-functional, performance, etc), or a set of requirements (multiple IDs). On a very large project with many moving parts, support for this in a test tool can be invaluable.

        The nice side benefit of this is that if you’re using a tool like Git, you can scroll through major points in the Git history and clearly see the progression of development not just by what tests are passing, but also by how many of the requirements solicited from the customer/stakeholder are satisfied. Eventually, I’ll support generating metrics from the tests in a common business/professional format (such as an Excel spreadsheet, so managers can create visualizations and whatnot).

        I think it’ll be useful for developers because they don’t just have to point at a results table and say “I’m passing all the tests”, they can point at a results table and say “I’m passing all the tests and here’s also proof that the tests passing fully cover all the initial requirements laid out, therefore the product you asked for is built” (and of course if they don’t like what they got, they can go talk to the requirements engineer :P )

        1. 6

          Hi, greatest author here. :)

          Something that might be useful in your situation: with greatest, if you have formal requirements IDs, you could use them as tags in the test function names, and then run tests based on those – you can use the -t command line switch in the default test runner to run tests based on test name / substring match. (Similarly, -x skips matching tests, so, for example, you could skip tests with __slow in the name.) If you name tests, say, TEST handle_EEPROM_calibration_read_failure__ENG_471(void) { /* ... */ }, then ./tests -t ENG_471 would run that. (Running tests by name also helps with quick feedback loops during development.)

          I did some automotive embedded work several years ago. We had a whole requirement traceability system that involved scraping requirement IDs out of comment headers for tests, which eventually fed into coverage reports.

          1. 1

            Oh wow, that’s pretty cool. That tagging system can certainly be useful for more than just the requirement IDs but ya, that would work. Being able to filter tests by the tags is also really neat and I hadn’t thought of that as a feature.

      2. 1

        I’d be curious to see what someone could come up with if the test framework didn’t use the C preprocessor and used something else instead. Might be a fun exercise. But then again, maybe I’m just not liking the preprocessor lately.

        1. 1

          What would it look like to drive tests, for C programs, in say Lua? It seems like a wonderful idea, but I’m not sure if the boilerplate stuff can be automated in such a way to make it feasible…

          1. 1

            I’m not sure either, but it still might be an interesting exercise (or mini research project). Maybe I should be the one to look into it since I’m the one that spoke up. ;)

            1. 1

              Actually, this sounds like something @silentbicycle has probably already tried. Might be worth checking in with him first. :)

      1. 3

        OSH AUR has been updated to v0.3.0 as well. If anyone has issues installing, please let me know. https://aur.archlinux.org/packages/osh/

        1. 3

          this is bait. do not execute a random obfuscated python script.

          1. 2

            oh ja, that’s for sure. Don’t execute random anything, but the style is definitely written to mimic the various tools we see in the space at the very least.

            I think my fav comment to this was responding to the “my ssh tool is too dangerous to release” thing; definitely going for the “we have an internet badass over here” direction, even if unintentionally.

            1. 2

              It’s odd, the author says that the tool is too dangerous to release but then they released it anyway

              1. 1

                in the past that was often done for “cred,” to make things look more bad ass than they actually were. Here I have no idea, but it came across as silly to me.

          1. 1

            I added some other features in my fork for those that are interested. There’s a pull request in there somewhere but the original jrnl developer isn’t too active anymore so it hasn’t been merged yet or anything.

            https://github.com/timetoplatypus/jrnl

            • import a jrnl from JSON
            • export a jrnl to a pretty print HTML format
              • no HTML stripping from jrnl entries, so you can add any other decorators you’d like by inlining them in the entry.
            1. 47

              https://forums.developer.apple.com/thread/79235

              November 13th, this was a known behavior

              1. 6

                Your comment should be on the top. Looks like apple should have responded two weeks ago. It would be interesting to study how widely exploited this bug has been. Does anybody have an estimate how many people could have seen that solution post on the developer forum?

                1. 2

                  Does anybody have an estimate how many people could have seen that solution post on the developer forum?

                  One fewer than should have seen it.

                2. 3

                  So odd… The solution of entering “root” twice is given as if that’s just kind of a normal thing to do if you need to create an admin account. Is this behavior perhaps actually intentional, but should only work if there are no existing admin accounts?

                  1. 1

                    Here is the security patch: https://support.apple.com/en-us/HT208315

                  1. 5

                    Not able to reproduce this behavior. On Mac OS, I believe the root account is disabled by default; it gets enabled when a password is set for it. I wonder if the behavior they’re reporting is still present when a root password has been set.

                    1. 7

                      It is not, it gets fixed by setting a root password.

                      I’ve been able to reproduce this on my 5K iMac but not my 13” TB MacBook Pro.

                    1. 2

                      Sauce: https://github.com/carld/micro-lisp

                      Edit: Just realized the link is at the bottom of that page too. Anyway, pretty cool; thanks for sharing.

                      1. 4

                        Maybe I’m missing something, but this is an advert for a VPN service. Why?

                        1. 1

                          Mainly because it is new and people seem to trust proton mail. In my mind a release from a trusted company is noteworthy.

                          1. 1

                            This can’t be that new… I’ve been using ProtonVPN for months now.

                            Edit: They graduated out of beta on 20 June 2017 according to this article.

                            1. 1

                              Ya it’s been out for a bit

                          2. 1

                            You’re not missing something and I’m not really advertising it but ok. The post was simply meant to be informative with regards to a prominent email service offering a VPN service as well.

                          1. 2

                            The AUR for OSH has been updated for those that want to install v0.2 on Arch Linux: https://aur.archlinux.org/packages/osh/

                            1. 5

                              Why are you installing to /usr/local? Packages are supposed to go to /usr directly.

                              1. 1

                                It’s the filesystem location specified in the GNU Coding Standard

                                Executable programs are installed in one of the following directories.

                                bindir: The directory for installing executable programs that users can run. This should normally be /usr/local/bin, but write it as $(exec_prefix)/bin.

                                1. 5

                                  Packages should never be installed to /usr/local

                                  https://wiki.archlinux.org/index.php/arch_packaging_standards

                                  Arch users expect packages to install in /usr, so it makes more sense to follow the Arch packaging standards here.

                                  1. 2

                                    Fair enough, I can make that adjustment. Thanks for sharing that link.

                                  2. 3

                                    GNU expects downstream packagers (“installers”) to change the install location, which is why the prefix variable exists. /usr/local/ is an appropriate default for “from-source” installs, to avoid conflicts with packages.

                                1. 15

                                  XNU is a part of Darwin and has been free software published at https://opensource.apple.com/source/xnu/ for the last 17 years.

                                  The github mirror might be new, I don’t know how to check that at a glance.

                                  Or is it that https://github.com/opensource-apple/xnu is the one that has been free software all along, and https://github.com/apple/darwin-xnu is a new repo with some previously unreleased bits?

                                  1. 20

                                    Seems like the breaking news is that the ARM parts have been released.

                                    1. 2

                                      Aha, cool.

                                      1. 1

                                        Right, should have put that in the title. I don’t see an option to edit at the moment though.

                                      1. 1

                                        Yep, that’s the one.

                                      1. [Comment removed by author]

                                        1. 2

                                          jrnl has a feature to export journal files to JSON and Markdown. There wasn’t a feature to import a journal from a JSON/Markdown-formatted journal file, though, so I started coding that a few days ago. The JSON importer is pretty much finished but I haven’t done the Markdown one yet; you’re welcome to implement that if you happen to like Python. https://github.com/timetoplatypus/jrnl

                                        1. 3

                                          The moral of the story? You can’t hide on the internet anymore. Your sentence structure and word use is MORE unique than your own fingerprint. If an organization, like the NSA, wants to find you they will.

                                          I can’t change my fingerprint, at least not without some painful self-mutilation. I can change my writing style whenever I’m logged in to my troll accounts. And as the linked github project hints, it oughtn’t be too hard to use a program to normalise one’s writing style.

                                            1. 1

                                              Maybe some kind of translator from english to globish could help. Translation from more complex language structures to the simpler ones, so fingerprints of your own language will be lost.

                                              1. 1

                                                Google translate, and back again. If this post is correct, it was the usage of 50 words. So, really, you need a thesaurus integrated into your writing setup to vary adjectives and adverbs and such, too.

                                            1. 4

                                              Lobste.rs has an option to SSH/telnet into the application. The Lobsters logo in shell would be something cool to show as a login banner @jcs

                                              1. 3

                                                Finally getting around to doing a swing migration of a couple terabytes of data. It’s been living on an old NTFS drive, so I’m swinging it over to a new hard drive. I’ll reformat the NTFS drive and bring the data back over (I want the new drive for something else because it’s bigger).

                                                I’m running Arch Linux and was hoping I could format both the drives with ZFS, but it’s not supported with my current kernel :( EXT4 it is

                                                1. 2

                                                  Which kernel are you running? The zfs-dkms package in AUR might suit your needs.

                                                  1. 1

                                                    Second: I use zfs-dkms-git, spl-dkms-git, spl-utils-git and zfs-utils-git on four kernels. The only caveat is that pacmanʼs DKMS trigger doesnʼt always try to build spl and zfs in the right order, so itʼs important to check that one doesnʼt need to do sudo dkms install zfs/0.7.0 -k 4.… by hand.

                                                    1. 2

                                                      I’ve been using the standard kernel that ships with Arch. At this time, it’s 4.11.7. I remember hearing about those DKMS packages (I think from the Arch wiki for ZFS?) so I may have to give that a shot

                                                    1. 0

                                                      /s

                                                      1. 8

                                                        Please, don’t do that to titles.

                                                        1. 6

                                                          Fixed, though I have the sense that I missed a joke. Or maybe it’s just too late at night, so it feels that way. But either way, the title should match the upstream.

                                                          1. 1

                                                            No worries, upstream title works fine

                                                    1. [Comment removed by author]

                                                      1. 5

                                                        When I toyed with alternate layouts, Colemak was my favorite. Keeping ZXCVB intact is essential for undo/cut/copy/paste/bold shortcuts.

                                                        1. 5

                                                          Ya I’ve been on Colemak for about two years now (I think?) and I’ve liked it so far. I don’t think I type faster, necessarily, but I do think I can type for longer without strain. Plus, it comes with most modern Linux distributions (including Arch Linux).

                                                          1. 3

                                                            It’s also installed almost everywhere by default. In X.org, I’ve even got Czech and Polish AltGr variants of it.

                                                            Swap Ctrl with Caps Lock and you’ve got a pretty comfy layout.

                                                            1. 6

                                                              This is my setup; dvorak, with swapped ctrl and caps lock (plus swapped alt and super - I almost never use alt, yet it takes up the prime real estate right next to space).

                                                              In conjunction with using ctrl+c instead of esc to enter normal mode in vim, I’m a pretty happy camper.

                                                          1. 2

                                                            This looks like a mix of stuff from SIGINT and IAD groups. Information Assurance Directorate (IAD) has long tried to develop hardening guides and security enhancements for commercial software. Low chance of a backdoor for them but do check code quality before using it. The SIGINT stuff check even more.

                                                            Looks like some useful tools in there, though. Surprising was Pathfinder since I thought it was totally NASA. (Shrugs)

                                                            1. 2

                                                              Agreed, certainly a good idea to code review. I’m hoping someone that’s tried implementing some of this stuff comments. I’ve been thinking about standing up that goSecure VPN application, and I’m curious about performance when running on a Raspberry Pi 3.