Re: [Toybox] [mkroot] Cannot Overwrite non-directory "$ROOT/bin/" with directory "[Path to overlay]"

2024-05-06 Thread Oliver Webb via Toybox
On Sunday, May 5th, 2024 at 21:21, Rob Landley wrote: > Oh, the other todo item here is "multiple overlays". The current overlay > package > was a quick hack, never did the design work to figure out what what more > complication should look like. Partly waiting for people to complain to me >

Re: [Toybox] Fw: Re: Dude.

2024-05-04 Thread Oliver Webb via Toybox
And here is a C-c C-v'd reply email I made to it (explanation for my actions now that I had the full context, mainly) -- After some thought, yeah you can cc: this to the list or put it in your blog. If you only cc: your

[Toybox] Fw: Re: Dude.

2024-05-04 Thread Oliver Webb via Toybox
(Rob wants this on the list anyways, and he hasn't CC:-ed it. I want it on the list for multiple reasons. (I gave him permission to cc it in a reply email I intend to forward to the list)) "the main reason to eschew programming in closed environments is that you can't embarrass people in

[Toybox] [PATCH] strings: -w

2024-04-29 Thread Oliver Webb via Toybox
I assume Rob is boycotting my patches because I took his repeated abrasiveness towards people as a sign that his "ruthless pragmatism" could be met with "ruthless pragmatism" (Instead of being pushed away from the project like the other hobbyists (I've seen several) who didn't wanna deal how Rob

[Toybox] Feature request for kconfig: switch on/off stuff directly in make invocation

2024-04-28 Thread Oliver Webb via Toybox
Almost 100% of the time I run menuconfig, I already know exactly what changes I am going to make and am only invoking menuconfig because I don't wanna manually switch them on (e.g. defconfig +/- THIS_CMD). This works okay, but makes things harder to automate and takes extra time. mkroot has

[Toybox] [PATCH] cpio: -m longopt (busybox/buildroot wants)

2024-04-27 Thread Oliver Webb via Toybox
Caught this while trying to build buildroot while my cpio binary was symlinked to toybox. Busybox under buildroot apparently wants -m's longopt "--preserve-modification-time". Attached - Oliver Webb 0001-cpio-m-longopt-buildroot-busybox-uses.patch Description: Binary data

[Toybox] [mkroot] Cannot Overwrite non-directory "$ROOT/bin/" with directory "[Path to overlay]"

2024-04-27 Thread Oliver Webb via Toybox
Doing minimal linux system setup with mkroot and trying to create a minimal environment with a native toolchain to run autoconf in. This would mean getting the native static toolchain for my architecture from https://landley.net/toybox/downloads/binaries/toolchains/latest/. Mounting the image

Re: [Toybox] [PATCH] readelf: Zero Pad -S section numbers (More scriptable through cut/awk)

2024-04-26 Thread Oliver Webb via Toybox
On Fri, Apr 26, 2024 at 10:35, enh via Toybox <[toybox@lists.landley.net](mailto:On Fri, Apr 26, 2024 at 10:35, enh via Toybox < wrote: > but this isn't what anyone else's readelf does... > > so now anyone scripting has _two_ problems. (or a bug, if they've only > tested against toybox. Our

[Toybox] [PATCH] strings.test: testing -> testcmd

2024-04-25 Thread Oliver Webb via Toybox
Again, not trying to flood Rob with a storm of patches, but this isn't a very nuanced patch that could spark technical discussion imo (I already have strings -s[SEP] and -w(count \r and \n) implemented but I'm waiting to submit those) Attached. - Oliver Webb From

[Toybox] [PATCH] readelf: Zero Pad -S section numbers (More scriptable through cut/awk)

2024-04-25 Thread Oliver Webb via Toybox
- Oliver Webb From 02b0b9a214f64f0685ec42529d3a80ea3bf71d9b Mon Sep 17 00:00:00 2001 From: Oliver Webb Date: Thu, 25 Apr 2024 20:43:01 -0500 Subject: [PATCH] readelf: Zero Padd -S section numbers (More scriptable through cut/awk) --- toys/other/readelf.c | 2 +- 1 file changed, 1

[Toybox] Poke about various minor patches

2024-04-23 Thread Oliver Webb via Toybox
Like I've said before, I'm trying not to flood Rob with patches. And poking about the larger todo items every week wouldn't be helpful to anybody. So here's some of the smaller patches that are >1 week old: UTF-8 Handling Patchs:

Re: [Toybox] [PATCH] xxd: buffer input via stdio.

2024-04-22 Thread Oliver Webb via Toybox
On Monday, April 22nd, 2024 at 18:45, Rob Landley wrote: > On 4/22/24 17:17, enh via Toybox wrote: > > > --- > > toys/other/xxd.c | 6 -- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > What's the issue this fixes? It's not: > > for i in $(seq 1 100); do echo $i; sleep 1; done |

Re: [Toybox] [PATCH] xxd: -d Decimal Lables flag, Don't cap at one file

2024-04-22 Thread Oliver Webb via Toybox
On Monday, April 22nd, 2024 at 17:17, enh via Toybox wrote: > ah, yeah, the include path uses the full buffer and -r uses stdio > buffering, but "regular" xxd was doing neither. i've sent out the > trivial patch to switch to stdio. Thanks, on my machine it improves the speed by about 10Mb/s

Re: [Toybox] [PATCH] xxd: -d Decimal Lables flag, Don't cap at one file

2024-04-22 Thread Oliver Webb via Toybox
> On Sat, Apr 20, 2024 at 7:38 PM Oliver Webb via Toybox > toybox@lists.landley.net wrote: > > xxd also runs on average about 5 times slower than vim xxd, this is > > because of read reading 16 bytes at a time, also not hard to fix, but > > very hard to fix cleanly. >

[Toybox] [PATCH] unix2dos: OLDTOY -> NEWTOY

2024-04-21 Thread Oliver Webb via Toybox
I don't wanna flood Rob with patches (Especially since he's been mostly off the list lately). But this isn't a very large or complex patch. Attached - Oliver Webb P.S. I sent out this email, but my mailer froze mid-sending and I don't know if it's got though, the list hasn't sent it back to

Re: [Toybox] [PATCH] test.c: [ 10 -eq 010 ] but [[ 10 -ne 010 ]]

2024-04-21 Thread Oliver Webb via Toybox
Another Possible Solution is to remove support for octal in atolx, the use of zero padded numbers is probably a lot less common than any modern use of octal. Patch 2.0 is attached, Nothing breaks in the test suite - Oliver Webb From 49e73c9d8d19bb590f79c92065dbb133cad50565 Mon Sep 17 00:00:00

[Toybox] [PATCH] test.c: [ 10 -eq 010 ] but [[ 10 -ne 010 ]]

2024-04-21 Thread Oliver Webb via Toybox
[Issue 498](https://github.com/landley/toybox/issues/498) Apparently a "Security Issue" when dealing with 0 padded numbers like strftime %m. (Which only matters on some BSD systems where toybox test is being used but toybox date is not). I'm not entirely convinced this is a good idea since this

[Toybox] [PATCH] xxd: -d Decimal Lables flag, Don't cap at one file

2024-04-20 Thread Oliver Webb via Toybox
Looking at xxd, I noticed that the -b[inary] flag wasn't there, Having some facility to print binary is nice, but since printf doesn't have anything in built for it implementing it isn't hard, but it looks _ugly_. Which is why I decided not to do that in this patch. xxd also runs on average about

[Toybox] [mkroot] mkroot package to build lua

2024-04-20 Thread Oliver Webb via Toybox
(Posting this to the list because discussion on the list is preferred over GitHub) Since there is discussion about building a ruby interpreter under mkroot. I decided to take a shot at building a lua interpreter under mkroot. This is as easy as easy can be. Being pure ANSI C, there are a few

Re: [Toybox] [PATCH] "What's autoconf whining about now?": Grep apparently

2024-04-18 Thread Oliver Webb via Toybox
(Solving issue 461) The sed autoconf problem is also in grep, where it wants exclusively GNU grep to the point where you don't have "GNU" in your version string autoconf will whine. The problem and solution are identical to sed's, C-c C-v from the sed code with a few changes Patch is

Re: [Toybox] Microsoft github took down the xz repo.

2024-04-16 Thread Oliver Webb via Toybox
On Tue, Apr 16, 2024 at 07:53, Rob Landley wrote: >>> Going through the list of "minimal tools" on https://suckless.org/rocks/, > > Not really a fan of that site. I did a roadmap section on them long ago > (https://landley.net/toybox/roadmap.html#sbase), but I'm trying to implement > mostly

Re: [Toybox] Microsoft github took down the xz repo.

2024-04-14 Thread Oliver Webb via Toybox
To revive a old thread with new technical info I stumbled upon: On Saturday, March 30th, 2024 at 15:58, Rob Landley wrote: > I set up gitea for Jeff on a j-core internal server, and it was fine except it > used a BUNCH of memory and cpu for very vew users. Running cgi on dreamhost's > servers

[Toybox] httpd: How is this supposed to be _used_?

2024-04-13 Thread Oliver Webb via Toybox
I've been doing networking stuff (Setting up a website), and since I don't want to deal with Apache or the systemd stuff required to do nginx. I decided to give toybox httpd a try. My use case is as simple as simple can be for this type of work, providing some statically generated web pages on

Re: [Toybox] [PATCH] nuke wcrtomb()

2024-04-11 Thread Oliver Webb via Toybox
On Thu, Apr 11, 2024 at 03:37, Jarno Mäkipää wrote: > there is slight difference between wctoutf8 and wcrtomb, wcrtomb > returns -1 if its presented with non valid char, of its char is not > presentable on current locale. I think wctoutf8 only returns positive > integers. wctouf8 cannot fail

[Toybox] [PATCH] fix single command builds by adding config symbols

2024-04-10 Thread Oliver Webb via Toybox
Found out about "make change" and decided to run it to see which commands break. The "make ipaddr" issue addressed in a previous thread is present on ping6, nc, halt, poweroff, and prlimit ('[' also experiences this but didn't fix it in this patch). The solution is the same too, different USE_

[Toybox] [PATCH] nuke wcrtomb()

2024-04-09 Thread Oliver Webb via Toybox
Not pulling in 2 localization functions (One from libc, one from lib.c) reduces executable size, also more portable on glibc systems because locale installation nonsense. No typecasting to int's either. 15 bytes saved in bloatcheck. tests pass for everything with changes applied (Except the

[Toybox] [PATCH] ip.c: addr by default? Fix "make ipaddr" breaks due to no config symbols

2024-04-08 Thread Oliver Webb via Toybox
Since someone made a github issue requesting ip, I took a closer look at ip.c The first thing I noticed is that "ip" with no args returns usage text instead of help text (Like sed did before that got fixed some time months ago) or defaulting to "ip addr" (Which is what ip usually does). Not a big

Re: [Toybox] Release 0.8.11 is out.

2024-04-08 Thread Oliver Webb via Toybox
On Monday, April 8th, 2024 at 20:57, Oliver Webb via Toybox wrote: > On Monday, April 8th, 2024 at 20:49, Rob Landley r...@landley.net wrote: > > > Yeah, a bit overdue. Lemme know if anything in the release notes isn't > > clear. > > > The quickstart webpage see

Re: [Toybox] Release 0.8.11 is out.

2024-04-08 Thread Oliver Webb via Toybox
On Monday, April 8th, 2024 at 20:49, Rob Landley wrote: > Yeah, a bit overdue. Lemme know if anything in the release notes isn't clear. The quickstart webpage seems to go to a 404, have you synced it? - Oliver Webb ___ Toybox mailing list

Re: [Toybox] utf8towc(), stop being defective on null bytes ([PATCH])

2024-04-08 Thread Oliver Webb via Toybox
On Monday, April 8th, 2024 at 12:22, Oliver Webb via Toybox wrote: > On Mon, Apr 8, 2024 at 12:00, Rob Landley wrote: > > > On 4/8/24 11:53, Oliver Webb wrote: > > > Still, U+ is a valid code point, and having a special case especially > > > for it > >

[Toybox] prereq build, what is the motivation behind building od?

2024-04-08 Thread Oliver Webb via Toybox
Although I may be wrong, "od" doesn’t seem to be in the build infrastructure. What’s the reason for it being a "prereq" command. Also, have you thought about specifying FILES through the command line to reduce build time by only building what we need to. Scanning for commands with “which” and

Re: [Toybox] utf8towc(), stop being defective on null bytes

2024-04-08 Thread Oliver Webb via Toybox
On Mon, Apr 8, 2024 at 12:00, Rob Landley <[r...@landley.net](mailto:On Mon, Apr 8, 2024 at 12:00, Rob Landley < wrote: > On 4/8/24 11:53, Oliver Webb wrote: >> Still, U+ is a valid code point, and having a special case especially >> for it >> that isn’t mentioned but you have to watch out

Re: [Toybox] utf8towc(), stop being defective on null bytes

2024-04-08 Thread Oliver Webb via Toybox
>> Null bytes aren't always "terminators". You can embed null bytes into data >> and still >> want to do utf8 processing with it. > > that's questionable ... the desire to have ASCII NUL in utf-8 > sequences (without breaking the "utf-8 sequences are usable as c > strings" property) is the main

Re: [Toybox] [PATCH] xzcat.c: Backport ARM64 decoder and read errors from stdin

2024-04-08 Thread Oliver Webb via Toybox
Sent from [Proton Mail](https://proton.me/mail/home) for iOS On Sun, Apr 7, 2024 at 19:40, Oliver Webb <[aquahobby...@proton.me](mailto:On Sun, Apr 7, 2024 at 19:40, Oliver Webb < wrote: > These seem to be easier to work with than things like the concatenated file > decoder > since the BCJ

Re: [Toybox] utf8towc(), stop being defective on null bytes

2024-04-07 Thread Oliver Webb via Toybox
On Sunday, April 7th, 2024 at 03:54, Rob Landley wrote: > As for moving it again someday, unnecessarily moving files is churn that makes > the history harder to see, and lib/*.c has never been a strict division (more > "one giant file seems a bit much"). The basic conversion to/from utf8 is >

[Toybox] utf8towc(), stop being defective on null bytes

2024-04-06 Thread Oliver Webb via Toybox
Heya, looking more at the utf8 code in toybox. The first thing I spotted is that utf8towc() and wctoutf8() are both in lib.c instead of utf8.c, why haven't they been moved yet, is it easier to track code that way? Also, the documentation (header comment) should probably mention that they store

[Toybox] [PATCH] Poke about another bc.c cleanp patch

2024-04-03 Thread Oliver Webb via Toybox
I submitted this to Rob about 2 weeks ago, but I forgot to CC the list. Here's it resubmitted (attached). The patch itself is various cleanup (Removal of -s -w, and anything "posixError", removal of unneeded typedefs, compacting case statements, removing unneeded indirection, etc) - Oliver

Re: [Toybox] more gnu nonsense: cp -n

2024-04-01 Thread Oliver Webb via Toybox
On Mon, Apr 1, 2024 at 10:31, enh via Toybox <[toybox@lists.landley.net](mailto:On Mon, Apr 1, 2024 at 10:31, enh via Toybox < wrote: > hadn't seen this one before... > > cp: warning: behavior of -n is non-portable Really? Having „Warn if GNU extensions“ flags is one thing, doing it by default

Re: [Toybox] Microsoft github took down the xz repo.

2024-03-30 Thread Oliver Webb via Toybox
On Saturday, March 30th, 2024 at 15:06, Rob Landley wrote: > FYI, Microsoft Github disabled the xz repository because it became > "controversial" (I.E. there was an exploit in the news). > > https://social.coop/@eb/112182149429056593 > > https://github.com/tukaani-project/xz They couldn't have

Re: [Toybox] [PATCH] Clean up xz a good amount

2024-03-29 Thread Oliver Webb via Toybox
On Friday, March 29th, 2024 at 17:59, enh wrote: > > > so, TIL that upstream already added a risc-v bcj implementation... > > > > I always thought that the xz decompresser we use in toybox ("xx-embeded") > > and the main > > one (The one with the CVE) were different projects (Separate git

Re: [Toybox] [PATCH] Clean up xz a good amount

2024-03-29 Thread Oliver Webb via Toybox
> > ah, crap, that's another thing to put on the riscv64 to-do list... > > (thanks for bringing that to light!) > > so, TIL that upstream already added a risc-v bcj implementation... I always thought that the xz decompresser we use in toybox ("xx-embeded") and the main one (The one with the

[Toybox] [PATCH] modeprobe.c and last.c: Codeshare identical llist_add()

2024-03-26 Thread Oliver Webb via Toybox
2 identical versions of the same function, variable names and everything 31 bytes saved in bloatcheck - Oliver Webb From 684ec909bc8922260f1196985095545900d2ae2e Mon Sep 17 00:00:00 2001 From: Oliver Webb Date: Tue, 26 Mar 2024 14:58:23 -0500 Subject: [PATCH] Codeshare 2 identicle versions

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-24 Thread Oliver Webb via Toybox
On Sunday, March 24th, 2024 at 04:09, Rob Landley wrote: > On 3/24/24 01:00, Oliver Webb wrote: > This isn't the hard part. To me, the hard part is wanting to share lib/.c code > with this new binary, which implies it would live in toys/example/.c, which > means in the NEW design it would be a

Re: [Toybox] Poke about the bc.c cleanup patches I submitted a while ago

2024-03-24 Thread Oliver Webb via Toybox
(Forgot to CC the list, sorry) On Sunday, March 24th, 2024 at 01:25, Oliver Webb wrote: About a month ago I submitted two patches that started to cleaup bc.c (http://lists.landley.net/pipermail/toybox-landley.net/2024-February/030067.html and

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-24 Thread Oliver Webb via Toybox
On Saturday, March 23rd, 2024 at 20:41, Rob Landley wrote: > On 3/21/24 23:59, Oliver Webb wrote: > > On Thursday, March 21st, 2024 at 22:45, Rob Landley r...@landley.net wrote: > > > On 3/17/24 14:52, Oliver Webb wrote: > > > > > > > Same here, I can remember the posix commands. > > > > > > Can

Re: [Toybox] test.sh: Don't override "C" command path in TEST_HOST if it's set

2024-03-22 Thread Oliver Webb via Toybox
> On 3/21/24 21:38, Oliver Webb via Toybox wrote: > > > A mildly annoying issue of you are trying to test with different > > implementations of commands > > such as plan9 ones or sbase or busybox ones, things with different > > conflicting implementation

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-21 Thread Oliver Webb via Toybox
On Thursday, March 21st, 2024 at 22:45, Rob Landley wrote: > On 3/17/24 14:52, Oliver Webb wrote: > > Also a problem if you want to switch Version Control systems or distribute > > tarballs without a .git/ directory. > > I already DID switch version control systems (from mercurial to git), and

[Toybox] test.sh: Don't override "C" command path in TEST_HOST if it's set

2024-03-21 Thread Oliver Webb via Toybox
A mildly annoying issue of you are trying to test with different implementations of commands such as plan9 ones or sbase or busybox ones, things with different conflicting implementations of things like xxd or vi. With this patch you can do "make test_cmd TEST_HOST=1 C=/path/to/other/cmd" and

Re: [Toybox] [PATCH] more.c: More stuff, down cursor key scrolls down. Also stuff about less

2024-03-21 Thread Oliver Webb via Toybox
On Thursday, March 21st, 2024 at 15:53, Rob Landley wrote: > I note that "more" is from the days of daisy wheel teletypes, and was thus > designed to work ok without a tty or interaction through cursor keys (you can > export $COLUMNS and $LINES or just let it guess 80x25), and "less" requires a

Re: [Toybox] [PATCH] chattr.test: awk -> cut so mkroot can run it

2024-03-20 Thread Oliver Webb via Toybox
(Typo in the patch someone pointed out, fixed here, s/cud/cut/d, the test that has it was skipped on my system so didn't spot it. Every test still fails in the same way even on TEST_HOST) Patch does what it says on the tin. First thing I caught while doing a test of all commands in mkroot

[Toybox] [PATCH] chattr.test: awk -> cut so mkroot can run it

2024-03-20 Thread Oliver Webb via Toybox
Patch does what it says on the tin. First thing I caught while doing a test of all commands in mkroot chattr fails all tests on my system (A ton of "Operation not permitted" errors, on ext4), but the failures are consistent with TEST_HOST so I guess chattr doing what it's supposed to? (Yes, I

[Toybox] [RFC] mkroot: Possible solution to running tests in a vacum: Use the host bash in a chroot

2024-03-20 Thread Oliver Webb via Toybox
A target for the 0.9 release is the test suite running under mkroot, Which is also required for passwd to be re-promoted (We need to test it in a vacuum). Since toysh in it's current state isn't good enough to run test.sh, a possible solution until it does become good enough is to use the host

Re: [Toybox] [PATCH] more.c: More stuff, down cursor key scrolls down. Also stuff about less

2024-03-20 Thread Oliver Webb via Toybox
On Wednesday, March 20th, 2024 at 11:39, Rob Landley wrote: > More never had the ability to go backwards, less did. Different command. >From the more help text you get when you press "h": b or ctrl-B Skip backwards k screenfuls of text [1] ... > > Looking at the other keybindings

[Toybox] [PATCH] more.c: More stuff, down cursor key scrolls down. Also stuff about less

2024-03-19 Thread Oliver Webb via Toybox
I spotted the more implementation in pending. Looking at it, it's missing quite a lot of stuff, Such as the ability to go back in a file. It's built in a way where nothing is accumulated, Which means that support for that would require a half-rewrite. What does POSIX specify as far as

Re: [Toybox] [PATCH] vi.c: Backspace to merge lines when at beginning, get_endline is no more, cleanup

2024-03-19 Thread Oliver Webb via Toybox
(Sorry this took so long to respond to, the email sat in my drafts as I got preoccupied with other stuff) On Friday, March 8th, 2024 at 02:47, Jarno Mäkipää wrote: > if you want backspace to jump into previous line, you should not call > ex commands dispatcher in middle of normal mode.

[Toybox] [PATCH] csplit.c: Test cases, started fixing regressions

2024-03-17 Thread Oliver Webb via Toybox
For the last few days I've been looking at csplit again, trying to get tests implemented. I added about a dozen in the attached patch, did catch a handful regressions I didn't notice when I was making this (was manually testing because I didn't know how to use the test suite), so I guess it's

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-17 Thread Oliver Webb via Toybox
On Thursday, March 14th, 2024 at 12:04, enh wrote: > at a high level, it does seem like many/most people interpret "pending" as > "almost done" (he says, being part of the problem himself, having several > pending things building and shipping on all Android devices) whereas in > actual fact it

Re: [Toybox] [PATCH] toysh: Shut up TEST_HOST, correct 3 test cases

2024-03-17 Thread Oliver Webb via Toybox
On Fri, Mar 8, 2024 at 19:46, Rob Landley <[r...@landley.net](mailto:On Fri, Mar 8, 2024 at 19:46, Rob Landley < wrote: > On 3/7/24 19:39, Oliver Webb via Toybox wrote: >> Looking at toysh again since the toybox test suite should run under it >> (in mkroot or under a ch

[Toybox] [PATCH] Shut up egrep instead of replacing it

2024-03-15 Thread Oliver Webb via Toybox
In a thread from just over a month ago, Rob suggested adding 2>/dev/null in calls to egrep to shut up warnings instead of replace it and bow down to the FSF. http://lists.landley.net/pipermail/toybox-landley.net/2024-February/030030.html "can I just defer this until it's actually _removed_ not

Re: [Toybox] interesting new (?) env(1) options

2024-03-15 Thread Oliver Webb via Toybox
> But that doesn't become part of the help text (maybe it should?) and doesn't > cover multiple commands in the same source file. And xzcat.c does it wrong. We could just fix xzcat then with a one line patch if it's the only thing that breaks the norm. > Anyway: if a "toybox cheat sheet" seems

[Toybox] xzcat.c: What do we want from upstream?

2024-03-14 Thread Oliver Webb via Toybox
Slightly more then 2 weeks ago (Feb 28th), I posted a requested evaluation of upstream changes (http://lists.landley.net/pipermail/toybox-landley.net/2024-February/030095.html) For the xz decompressor we are using. Of these, the most important commits (from my evaluation) are: (I truncated the

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-14 Thread Oliver Webb via Toybox
> Not "I have a problem", but "it IS a problem". Well it's good that you're here > to define objective reality. Without such a universal arbiter we would all be > lost a world of opinion and nuance. It is if you are trying to audit it to understand what it is doing so you can fix 80 broken test

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-13 Thread Oliver Webb via Toybox
Added P.S.: If this is territorial, just admit it. I won't bring up the "is keeping territory a good thing in a open-source project?" argument. I never mentioned territory because I don't think like that (I've waited for and welcomed cleanup passes on code I'm actively developing). You mentioned

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-13 Thread Oliver Webb via Toybox
> On 3/8/24 21:22, Oliver Webb via Toybox wrote: > > Reading through sh.c, most of the variable names are 2 letters long > > (repeating the same letter), > > I switched from single character local variables to double character ones > because they're easier to search for

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-08 Thread Oliver Webb via Toybox
Forgot to mention some things, A Erratum so I don't sound stupid. On Friday, March 8th, 2024 at 19:47, Oliver Webb via Toybox wrote: > On Friday, March 8th, 2024 at 19:15, Rob Landley r...@landley.net wrote: [..] > > > The nommu stuff seems to have only > > > been done on

Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-08 Thread Oliver Webb via Toybox
TL;DR: Rant about sh.c's variable names I forgot to include in main email, I have a patch to start fixing it but it conflicts with other stuff and I have to re-do it Reading through sh.c, most of the variable names are 2 letters long (repeating the same letter), for short functions (<20 lines)

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-08 Thread Oliver Webb via Toybox
On Friday, March 8th, 2024 at 19:15, Rob Landley wrote: > On 3/8/24 00:02, Oliver Webb wrote: > > > On Wednesday, March 6th, 2024 at 01:22, Rob Landley r...@landley.net wrote: > > > > > It's actually "reset" that should yank the tty out of cooked mode, which I > > > believe it does now. > > >

[Toybox] [PATCH] toysh: fix -Wuse-after-free

2024-03-08 Thread Oliver Webb via Toybox
This patch fixes a use after free warning in the select statement processing Since my patch for the test suite did not modify sh.c this patch and the last one I submitted do not conflict - Oliver Webb From b99d35655ce9c0fb9120c9a09bb05472d620bc80 Mon Sep 17 00:00:00 2001 From: Oliver Webb

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-07 Thread Oliver Webb via Toybox
On Wednesday, March 6th, 2024 at 01:22, Rob Landley wrote: > It's actually "reset" that should yank the tty out of cooked mode, which I > believe it does now. > > Why we have both "clear" and "reset", I couldn't tell you. reset sets tty settings while clear doesn't, large enough difference to

[Toybox] [PATCH] toysh: Shut up TEST_HOST, correct 3 test cases

2024-03-07 Thread Oliver Webb via Toybox
Looking at toysh again since the toybox test suite should run under it (in mkroot or under a chroot) A problem seems to be that there is no return command, which breaks runtest.sh to it's core. Dont know how to add one in yet On my version of bash (5.2.26) TEST_HOST fails on 3 test cases, and

Re: [Toybox] [PATCH] vi.c: Backspace to merge lines when at beginning, get_endline is no more, cleanup

2024-03-07 Thread Oliver Webb via Toybox
On Thursday, March 7th, 2024 at 14:23, Jarno Mäkipää wrote: [...] > Feel free to fix it up, some other features are simpler since you can > just read the man page and make it behave accordingly, but backspace > is maybe not very trivial one since its either you follow heirloom vi, > or make some

[Toybox] [PATCH] vi.c: Backspace to merge lines when at beginning, get_endline is no more, cleanup

2024-03-06 Thread Oliver Webb via Toybox
Looking at vi.c again, (I _know_ I can write code better then I did in October, and since the cleanup pass hasn't happened yet I thought I'd start improving things now) noticed there was no support for merging lines when doing a backspace at the start of a line (e.g. deleting blank lines by

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-05 Thread Oliver Webb via Toybox
On Tuesday, March 5th, 2024 at 18:31, enh wrote: > On Tue, Mar 5, 2024 at 4:01 PM Oliver Webb via Toybox > > \e[3J is a widely implemented extension (so is \ec), not standardized, but > > linux tty's, VTE terminals (gnome-terminal and the dozen derivatives of it), > > st, x

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-05 Thread Oliver Webb via Toybox
(Yes, I did read "I believe there is no point in continuing this conversation.", but there are still some questions and statements I feel the need to respond to) On Tuesday, March 5th, 2024 at 16:32, Mouse wrote: > except for a recent spate of programs that insist on > throwing X3.64 at me even

Re: [Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-05 Thread Oliver Webb via Toybox
On Tuesday, March 5th, 2024 at 15:31, Mouse wrote: > > "\ec" is supported by linux ttys, and clears the screen in all > > terminals I tested. And "\e[3J" has been supported by linux since > > 3.0, and clears the scrollback buffer in every terminal I've tested > > that has one, and is a NOP for

[Toybox] [PATCH] clear.c: Clear scrollback buffer on non-vte (gnome based) terminals

2024-03-05 Thread Oliver Webb via Toybox
>From https://landley.net/notes-2022.html#17-10-2022: the smallest one is "clear" which is actually fraught (the escape does not reset the TTY out of "cooked" mode, ncurses clear doesn't seem to effect tty settings (unix2dox because -opost): $ stty raw && stty | unix2dos speed 38400 baud; line =

Re: [Toybox] Debugging of the mkpasswd.c ASAN error (It's glibc's fault)

2024-03-04 Thread Oliver Webb via Toybox
On Monday, March 4th, 2024 at 17:58, Rob Landley wrote: > Eh, it's us triggering it. Presumably we did something if a zillion other > people > haven't seen it. That said, a null pointer dereference isn't an off by one > error > or "allocation isn't quite large enough because the buffer's 22

[Toybox] [PATCH] tests for sha3sum

2024-03-04 Thread Oliver Webb via Toybox
Nothing to really note here. I noticed there were no tests for sha3sum, so I added some in the attached patch - Oliver Webb From c5ccd89fe39c453ec532bc823cb8828f80deeebe Mon Sep 17 00:00:00 2001 From: Oliver Webb Date: Mon, 4 Mar 2024 18:18:06 -0600 Subject: [PATCH] tests for sha3sum ---

[Toybox] Debugging of the mkpasswd.c ASAN error (It's glibc's fault)

2024-03-04 Thread Oliver Webb via Toybox
I took a closer look at the mkpassword.c error I reported in October. The problem seems to only happen when ASAN is enabled, and is _inside_ glibc's crypt(). Putting "dprintf(2, "%p, %p, %p -- %s, %s\n", toys.optargs, toybuf, salt, *toys.optargs ? : toybuf, salt);" Just

Re: [Toybox] [PATCH] Minor formatting and cleanup in getopt.c

2024-03-01 Thread Oliver Webb via Toybox
On Thursday, February 29th, 2024 at 19:03, Rob Landley wrote: > On 2/28/24 18:23, Oliver Webb via Toybox wrote: > > > I've been looking at some of the other pending commands, And found a getopt > > implementation from 2017 by AOSP. > > Looking at the source code, it d

[Toybox] [PATCH] (gzipped patch due to size) Remove large amount of auto-generated test cases for bc

2024-02-29 Thread Oliver Webb via Toybox
Heya, Was trying to not bother the list on Feb 29th because 0.9 (0.8.11?) was supposed to come out, And I didn't wanna delay it with things like bc cleanup. That being said, I was looking at the test suite for bc and... Almost all of the cases are in tests/files/bc, which is over 400k in size

[Toybox] Can we remove 'catv' from the status page next release

2024-02-28 Thread Oliver Webb via Toybox
In the status page, catv is under "not started yet", catv was a command that existed in toybox since 2006 (commit 1521a9e, Slightly older then oneit). And ended up being removed in 2022 because no one uses it. Since the next release of toybox is coming some time in the future, could we make

[Toybox] [PATCH] Minor formatting and cleanup in getopt.c

2024-02-28 Thread Oliver Webb via Toybox
I've been looking at some of the other pending commands, And found a getopt implementation from 2017 by AOSP. Looking at the source code, it doesn't seem unclean, nor overly large (about 100 lines). It does use getopt_long_only, a GNU extension of glibc, but musl has that so it will work on

Re: [Toybox] [PATCH] Clean up xz a good amount

2024-02-28 Thread Oliver Webb via Toybox
On Wednesday, February 28th, 2024 at 13:51, Rob Landley wrote: > On 2/28/24 13:49, Rob Landley wrote: > > > I need to track "git log" from the last known "upstream" version to see what > > they changed and apply interesting fixes (like arm64 support, apparently). > > Promoting the command should

Re: [Toybox] [PATCH] bc.c: uchar typedef is pointless, we -funsigned-char

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 23:02, Rob Landley wrote: > On 2/27/24 21:46, Oliver Webb wrote: > > > On Tuesday, February 27th, 2024 at 19:19, Rob Landley r...@landley.net > > wrote: > > > > > On 2/27/24 13:46, Oliver Webb via Toybox wrote: >

Re: [Toybox] [PATCH] bc.c: uchar typedef is pointless, we -funsigned-char

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 19:19, Rob Landley wrote: > On 2/27/24 13:46, Oliver Webb via Toybox wrote: > > > Since we build toybox with -funsigned-char, there is no reason to have a > > type for unnsigned chars in bc.c, > > since that is the default for all cha

Re: [Toybox] [PATCH] Clean up xz a good amount

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 20:51, Oliver Webb via Toybox wrote: > On Tuesday, February 27th, 2024 at 20:01, Rob Landley r...@landley.net wrote: > > > On 2/27/24 19:23, Oliver Webb wrote: > > > > > The below patch does a bunch cleanup on xzcat.c. > > &

Re: [Toybox] [PATCH] Clean up xz a good amount

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 20:01, Rob Landley wrote: > On 2/27/24 19:23, Oliver Webb wrote: > > > The below patch does a bunch cleanup on xzcat.c. > > It resolves the ifdefs that were in the code (But everything they were > > checking was defined so they didn't do anything) > > Adds

Re: [Toybox] [PATCH] bc.c: deobfuscation of bc_lib

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 15:22, Mouse wrote: > > > > And also, bc_program_stdin_name never changes from "" so > > > > there's no reason to make it a variable > > > > Well, I [...] would say that there is at least potentially reason to > > > > leave it as a variable even if it's never

[Toybox] [PATCH] ts.c: Remove MAYFORK, Add in LINEBUF

2024-02-27 Thread Oliver Webb via Toybox
Back in September when I wrote ts, I added TOYFLAG_MAYFORK in the flags, this patch removes that. TOYFLAG_LINEBUF for ts makes sense, the main use case for ts is creating log files for daemons (foobard | ts | tee logfile). If something happens (Kernel Panic, Power Off, SIGKILL, etc) It should

Re: [Toybox] [PATCH] bc.c: deobfuscation of bc_lib

2024-02-27 Thread Oliver Webb via Toybox
On Tuesday, February 27th, 2024 at 14:00, Mouse wrote: > > And also, bc_program_stdin_name never changes from "" so > > there's no reason to make it a variable > > > Well, I haven't read all the context. But I would say that there is at > least potentially reason to leave it as a variable even

[Toybox] [PATCH] bc.c: uchar typedef is pointless, we -funsigned-char

2024-02-27 Thread Oliver Webb via Toybox
Since we build toybox with -funsigned-char, there is no reason to have a type for unnsigned chars in bc.c, since that is the default for all chars. And removing it gets rid of a typedef - Oliver Webb From f91d771e43969a437ba96428b336d547e30ec76e Mon Sep 17 00:00:00 2001 From: Oliver Webb

[Toybox] [PATCH] bc.c: deobfuscation of bc_lib

2024-02-27 Thread Oliver Webb via Toybox
The -l library in bc.c is stored in a obfuscated block of numbers, even though it's a ASCII string. Why? I don't know, but I took the string bc_lib and turned it from a block of numbers into something someone could look at and at least have a vague idea of what's happening in it. This patch

Re: [Toybox] [PATCH] POSIX's unexpand command

2024-02-23 Thread Oliver Webb via Toybox
On Friday, February 23rd, 2024 at 21:14, Mouse wrote: > > unexpand "converts spaces to tabs". > > > This commands behavior is so simple (s/ /\t/g) that it can be > > knocked out in a couple hours, > > Well...sort of. unexpand without -a can be, sure. With -a, it's more > complicated, unless you

[Toybox] [PATCH] POSIX's unexpand command

2024-02-23 Thread Oliver Webb via Toybox
Browsing through list archives from 2020, I found a mention of the unexpand command (in POSIX) >From >http://lists.landley.net/pipermail/toybox-landley.net/2020-May/019792.html: unexpand "converts spaces to tabs". Haven't gotten around to it yet. :) This commands behavior is so simple (s/

Re: [Toybox] [PATCH] toysh can't build without test_main, get kconfig to do something about this.

2024-02-21 Thread Oliver Webb via Toybox
On Wednesday, February 21st, 2024 at 17:56, Rob Landley wrote: > On 2/21/24 16:47, Oliver Webb via Toybox wrote: > > > If you `make allnoconfig menuconfig' and switch the shell on, the build > > will fail because test_main() isn't being built: > > > > .

[Toybox] [PATCH] toysh can't build without test_main, get kconfig to do something about this.

2024-02-21 Thread Oliver Webb via Toybox
If you `make allnoconfig menuconfig' and switch the shell on, the build will fail because test_main() isn't being built: ./sbin/ld: generated/obj/main.o:(.data.rel.toy_list+0xa8): undefined reference to `test_main' /sbin/ld: generated/obj/main.o:(.data.rel.toy_list+0xc8): undefined reference

[Toybox] Thoughts on seperating shell dependencies and MAYFORK commands?

2024-02-19 Thread Oliver Webb via Toybox
When doing "make sh", scripts/single.sh looks for MAYFORK commands to pull in as builtin's Which means any command that is declared with MAYFORK is automatically included into the shell when doing "make sh". TOYFLAG_MAYFORK is essentially "if we are calling this in the shell, don't fork/exec to

[Toybox] [PATCH] toysh: [ isn't a bultin in single command binaries while test and [[ are. Also shut up arch by replacing egrep with grep -E

2024-02-10 Thread Oliver Webb via Toybox
Hello, I was benchmarking toysh against shells like dash and bash by calling the [ command 1,000,000 times, assuming it was a builtin on toysh. dash and bash can do this in less than 10 seconds, while toysh takes 16.5 _minutes_. After some fiddling with strace, I noticed it was forking off the

[Toybox] [PATCH] Added wc -L longest line option

2023-11-04 Thread Oliver Webb via Toybox
Heya, I added a -L[ongest line] option to wc I thought that this option was considered and discarded since it isn't that hard to implement and is a GNU extension. But grep-ing through the list archives shows no mention of a -L option in relation to wc. I added the -L option in the below patch,

  1   2   >