Re: [Toybox] microcom.c discarding data due to TCSAFLUSH

2024-05-23 Thread Rob Landley
On 5/20/24 09:42, Yi-Yo Chiang via Toybox wrote: > Is there any particular reason to use TCSAFLUSH here? Partly because it's what strace said busybox and minicom were doing, and partly because I've had serial hardware that produced initial static on more than one occasion. In this case, it looks

Re: [Toybox] [PATCH] netcat: clarify documentation.

2024-05-22 Thread Rob Landley
On 5/20/24 07:06, enh via Toybox wrote: > "Collate" means "sort", but -O is like -o other than buffering. It means "group". (The dictionary says "gather or arrange in the proper sequence".) I can see the confusion, but the collate button on the copier in high school stapled pages together (the

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-22 Thread Rob Landley
On 5/20/24 08:32, Yi-Yo Chiang wrote: > Thanks! Adding TOYFLAG_NOBUF worked. > > I feel the same way about "manual flushing of the output buffer is a terrible > interface". I asked myself the question "Why am I manually flushing so much? > There must be a better way..." multiple times when I

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-22 Thread Rob Landley
On 5/20/24 07:36, enh wrote: >> Adding flushing to xputs() is an Elliott question is because he's the one who >> can presumably keep stdio buffer semantics in his head. They make zero sense >> to >> me. I added a flush to xputsn() because in line buffering mode it was the >> "dangerous" one that

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-19 Thread Rob Landley
On 5/18/24 21:53, Yi-Yo Chiang wrote: > What I wanted to address with this patch are: > > 1. Fix this line of > xputs() https://github.com/landley/toybox/blob/master/toys/net/microcom.c#L113 > The prompt text is not flushed immediately, so it is not shown to the user > until > the escape char is

Re: [Toybox] [PATCH] xputs: Do flush

2024-05-18 Thread Rob Landley
On 5/16/24 06:46, Yi-Yo Chiang via Toybox wrote: > The comment string claims xputs() to write, flush and check error. > However the 'flush' operation is actually missing due to 3e0e8c6 > changing the default buffering mode from 'line' to 'block'. That's sort of an Elliott question? Originally,

Re: [Toybox] netcat -f bug

2024-05-15 Thread Rob Landley
On 5/11/24 02:11, Yi-Yo Chiang wrote: > On Sat, May 11, 2024 at 1:30 AM Rob Landley <mailto:r...@landley.net>> wrote: > > What's your use case triggering this patch? Because without that, I go > off on > various design tangents, as seen below: > > I just w

Re: [Toybox] strlower() bug

2024-05-14 Thread Rob Landley
On 5/14/24 12:12, enh wrote: > On Tue, May 14, 2024 at 1:04 PM Rob Landley wrote: >> >> On 5/14/24 07:10, enh wrote: >> > macOS tests seem to be broken since this commit? >> > >> > FAIL: find strlower edge case >> > echo -ne '' |

Re: [Toybox] strlower() bug

2024-05-14 Thread Rob Landley
On 5/14/24 07:10, enh wrote: > macOS tests seem to be broken since this commit? > > FAIL: find strlower edge case > echo -ne '' | touch aⱥ; find . -iname aȺ > --- expected 2024-05-10 17:32:56.0 + > +++ actual 2024-05-10 17:32:56.0 + > @@ -1 +0,0 @@

[Toybox] I'm aware landley.net is saying "site.not found".

2024-05-13 Thread Rob Landley
That dreamhost server migration they did? (The recent "only 2 years old" version thread?) Does not seem to have correctly updated the DNS record. Of the domain they manage for me. Dreamhost continues to provide nine fives of uptime. I've pinged support already, they'll probably get back to me in

Re: [Toybox] today in "shut up, gnu!"

2024-05-12 Thread Rob Landley
On 4/12/24 13:24, enh via Toybox wrote: > ~/aosp-main-with-phones$ find external/ -name NOTICE -type l -maxdepth 2 > find: warning: you have specified the global option -maxdepth after > the argument -name, but global options are not positional, i.e., > -maxdepth affects tests specified before it

Re: [Toybox] nproc(1)

2024-05-11 Thread Rob Landley
eryone with a working libc just uses sysconf()? >> >> On Tue, Apr 30, 2024 at 8:26 PM Rob Landley wrote: >> > >> > On 4/29/24 16:56, enh via Toybox wrote: >> > > isn't nproc(1) just a call to sysconf(3) with either >> > > _SC_NPROCES

Re: [Toybox] stty bug

2024-05-11 Thread Rob Landley
On 5/10/24 06:15, Yi-Yo Chiang via Toybox wrote: > The _negate & combination_ type of settings are bugged. > > `stty cooked` and `stty raw` works fine, but the negated options: > > $ stty -raw > stty: unknown option: cooked > $ stty -cooked > stty: unknown option: raw Ack, added to the notes

Re: [Toybox] unshare/nsenter and flags

2024-05-11 Thread Rob Landley
On 5/10/24 18:46, Yifan Hong wrote: > I am running all commands as a non-root user. Here are the two commands I run: > > strace ./toybox unshare --mount --map-root-user --user /bin/bash -c 'echo' > 2>&1 > | tee /tmp/user.txt > strace ./toybox unshare --mount --map-root-user /bin/bash -c 'echo'

Re: [Toybox] strlower() bug

2024-05-10 Thread Rob Landley
On 5/8/24 16:27, Ray Gardner wrote: > BTW I was a bit surprised that mentioning my awk for toybox got no reaction. Oh I'm interested, but somebody (probably you) mentioned they were looking into it before, and I'll wait to see some code first. :) (The problem with asking to see code early is

Re: [Toybox] netcat -f bug

2024-05-10 Thread Rob Landley
What's your use case triggering this patch? Because without that, I go off on various design tangents, as seen below: On 5/10/24 06:09, Yi-Yo Chiang via Toybox wrote: > Hi, > The -f option for netcat doesn't seem to be doing anything right now. I should have a test for that, but to be honest I

Re: [Toybox] unshare/nsenter and flags

2024-05-10 Thread Rob Landley
Ok, cycling back to this... On 5/2/24 21:51, enh wrote: >> > it seems like -r _doesn't_ actually imply -U in practice (and they >> > seemed to have strace output to prove it). >> >> So... should it? > > i think so? i have no idea about any of this, but >

Re: [Toybox] strlower() bug

2024-05-08 Thread Rob Landley
On 5/6/24 17:12, Ray Gardner wrote: > While working on an awk implementation for toybox, I found a bug in > strlower(), which is used only in find.c. I've attached some tests to > put in find.test to reveal it. I can't put them here directly because > I don't think the UTF-8 names will come

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

2024-05-07 Thread Rob Landley
On 5/7/24 15:50, Rob Landley wrote: > And THAT was based on the old environment setup I used to do in Firmware Linux > to give User Mode Linux a mostly writeable chroot despite starting with > https://user-mode-linux.sourceforge.net/hostfs.html but that was back before > git > wa

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

2024-05-07 Thread Rob Landley
On 5/6/24 23:33, Oliver Webb wrote: > 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 mor

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

2024-05-05 Thread Rob Landley
On 4/27/24 20:44, Oliver Webb via Toybox wrote: > 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 >

Re: [Toybox] Fw: Re: Dude.

2024-05-05 Thread Rob Landley
On 5/4/24 11:34, Oliver Webb via Toybox wrote: > (Rob wants this on the list anyways, and he hasn't CC:-ed it. If I want to send a message to the list, I'm capable of doing so. As I said in the postscript I don't _object_ to it being on the list (in an "I say the same things in public as in

Re: [Toybox] unshare/nsenter and flags

2024-05-02 Thread Rob Landley
Meanwhile the "implies" in the help text comes from commit fb4a241f35cf two months earlier: Author: Rob Landley Date: Wed Feb 18 15:19:15 2015 -0600 Patch from Isaac Dunham to add -r, fixed up so it doesn't try to include two flag contexts simultaneously. So it looks like Isaac

Re: [Toybox] nproc(1)

2024-04-30 Thread Rob Landley
On 4/29/24 16:56, enh via Toybox wrote: > isn't nproc(1) just a call to sysconf(3) with either > _SC_NPROCESSORS_ONLN for regular behavior, or _SC_NPROCESSORS_CONF for > --all? >From musl src/conf/sysconf.c: case JT_NPROCESSORS_CONF & 255: case JT_NPROCESSORS_ONLN & 255: ;

Re: [Toybox] DreamHost Security Alert

2024-04-25 Thread Rob Landley
On 4/24/24 13:10, Rob Landley wrote: > Alas, my website's likely to be down for a bit while I explain to them that > "the > compiler that got used to build an exploit" and "the exploit" can share > strings > because gnu is incompetent and le

Re: [Toybox] DreamHost Security Alert

2024-04-24 Thread Rob Landley
00 (PDT) From: DreamHost Abuse Team To: r...@landley.net Hello Rob Landley, We have received a report of malware at the following location: hXXps://landley.net/aboriginal/downloads/old/binaries/1.2.6/cross-compiler-armv7l.tar.bz2 This means that your site has likely been compromised. We have take

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

2024-04-22 Thread Rob Landley
On 4/22/24 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. Ah, performance tweak. *shrug* Applied... Rob

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

2024-04-22 Thread Rob Landley
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 | ./xxd Because that won't produce output for a couple minutes... Rob

Re: [Toybox] shuf works on FreeBSD

2024-04-20 Thread Rob Landley
On 4/20/24 03:42, Vidar Karlsen via Toybox wrote: > toys/other/shuf.c builds and runs on FreeBSD and can be enabled in > freebsd_miniconfig with CONFIG_SHUF=y. > > I can't think of a use case for it, but I'm sure there are some. I thought it was enabled in commit 93c8ea40a back in November? Rob

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

2024-04-16 Thread Rob Landley
On 4/15/24 03:53, Jarno Mäkipää wrote: > On Sun, Apr 14, 2024 at 9:14 AM Oliver Webb via Toybox > wrote: >> >> To revive a old thread with new technical info I stumbled upon: >> >> On Saturday, March 30th, 2024 at 15:58, Rob Landley wrote: >> >> >

Re: [Toybox] df not working on FreeBSD

2024-04-16 Thread Rob Landley
On 4/15/24 04:37, Vidar Karlsen via Toybox wrote: > Hello, > > df throws the following error on FreeBSD: > > root@140amd64_noopts-usrports:/usr/local/toybox/bin # ./df / > df: getmntinfo: Invalid argument > > A little bit of poking around shows that getmntinfo expects the second > argument (the

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

2024-04-14 Thread Rob Landley
On 4/13/24 14:09, Oliver Webb via Toybox wrote: > The first thing I ran into is that httpd doesn't do that by default, > running "toybox httpd dist/" won't actually host those pages > on localhost. It's an inetd client: https://en.wikipedia.org/wiki/Inetd toybox netcat -s 127.0.0.1 -p 8

Re: [Toybox] today in "shut up, gnu!"

2024-04-13 Thread Rob Landley
On 4/12/24 13:24, enh via Toybox wrote: > ~/aosp-main-with-phones$ find external/ -name NOTICE -type l -maxdepth 2 > find: warning: you have specified the global option -maxdepth after > the argument -name, but global options are not positional, i.e., > -maxdepth affects tests specified before it

Re: [Toybox] uname no longer broken on FreeBSD?

2024-04-13 Thread Rob Landley
On 4/13/24 03:00, Vidar Karlsen via Toybox wrote: > Hello, > > toys/posix/uname.c builds and runs on Freebsd now. I have tested it on > 13.2-amd64, 14.0-amd64, 13.2-arm64 and 14.0-arm64. I think it's safe to > put CONFIG_UNAME=y back into kconfig/freebsd_miniconfig. Ah, commit d2bada0e42e6 fixed

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

2024-04-12 Thread Rob Landley
On 4/8/24 14:20, Oliver Webb via Toybox wrote: > 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. $ vi scripts/recreate-prereq.sh ... $ grep '^od ' log.txt od "-Anone" "-vtx1"

Re: [Toybox] [PATCH] timeout.test: reduce flake.

2024-04-12 Thread Rob Landley
Catching up. (I let stuff pile up preparing for the release and then took a couple days off, and now I'm at texas linuxfest doing sleep deprived talk prep for tomorrow...) On 4/8/24 15:28, enh via Toybox wrote: > A (presumably overloaded) CI server saw the `exit 0` test time out. > Given that

[Toybox] Release 0.8.11 is out.

2024-04-08 Thread Rob Landley
Yeah, a bit overdue. Lemme know if anything in the release notes isn't clear. Still doing a texas linuxfest talk soonish. Hopefully they post a video eventually... Rob ___ Toybox mailing list Toybox@lists.landley.net

Re: [Toybox] tail test failures?

2024-04-08 Thread Rob Landley
On 4/8/24 11:14, enh via Toybox wrote: > looks like the github CI has been red for ubuntu and macOS since april 5th? > > this revert fixes the current failing test: > > [master 8368f8f9] Revert "Enforce min/max for % input type (time in > seconds w/millisecond granularity)." > > but that just

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

2024-04-08 Thread Rob Landley
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 for is either a bug or a > documentation error. I say it's intentional, you reassert that I'm wrong. I'll leave you to your

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

2024-04-08 Thread Rob Landley
On 4/8/24 11:01, enh wrote: >> > Returning length 0 means we hit a null terminator, >> >> 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

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

2024-04-07 Thread Rob Landley
On 4/6/24 17:48, Oliver Webb via Toybox wrote: > 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? The "yet" seems a bit

[Toybox] scripts/prereq/build.sh

2024-04-05 Thread Rob Landley
I recently added scripts/prereq/build.sh which runs a "cc -I dir *.c" style build against canned headers. Theoretically a portable build not requiring a system to have any command line utilities except "cc" and a shell. (Ok, you still need bash to run scripts/make.sh and scripts/install.sh until

[Toybox] Mkroot talk at texas linuxfest on the 13th.

2024-04-03 Thread Rob Landley
They posted the description. It's basically "45 minutes about mkroot": https://2024.texaslinuxfest.org/talks/mkroot-tiny-linux-system-builder/ Rob ___ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net

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

2024-04-03 Thread Rob Landley
On 4/2/24 01:35, Ryan Prichard wrote: > Apparently upstream coreutils "cp -n" changed between 9.1 and 9.2, and the > Debian maintainers reverted the change temporarily(?) and also added the > "non-portable" error. > > In coreutils 9.1 and older, "cp -n" quietly skipped a file if the > destination 

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

2024-04-01 Thread Rob Landley
On 4/1/24 10:31, enh via Toybox wrote: > hadn't seen this one before... > > cp: warning: behavior of -n is non-portable and may change in future; > use --update=none instead > > (consider me skeptical that a system without -n is going to have > --update=none...) Define non-portable? Freebsd 14

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

2024-03-30 Thread Rob Landley
On 3/30/24 15:16, Oliver Webb wrote: > 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.coo

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

2024-03-30 Thread Rob Landley
On 3/30/24 15:11, Rob Landley wrote: > upstream of the xz-embedded repo with the public domain code I cloned is: > > https://git.tukaani.org/xz-embedded.git > > Which is still available. Although now that I look at it, a5390fd368f8 in september is the last commit that wasn't fr

[Toybox] Microsoft github took down the xz repo.

2024-03-30 Thread Rob Landley
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 I'm assuming if toybox ever has a significant bug, microsoft would respond by deleting

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

2024-03-29 Thread Rob Landley
On 3/29/24 17:50, Oliver Webb wrote: >> > 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

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

2024-03-29 Thread Rob Landley
On 3/29/24 17:28, enh wrote: > On Wed, Feb 28, 2024 at 9:13 AM enh wrote: >> > > @@ -639,6 +640,20 @@ enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s, >> > > struct xz_dec_lzma2 *lzma2, >> > > */ >> > > enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, char id) >> > > { >> > > + switch

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

2024-03-28 Thread Rob Landley
On 3/27/24 08:31, Rob Landley wrote: >>> ipcrm, ipcs, ... >> I don't know how I'm supposed to test resources I have no way to create, >> we'll need ipcmk eventually. These seem more feasible to test, although >> their tests will fail under mkroot until we >> h

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

2024-03-27 Thread Rob Landley
On 3/26/24 15:05, Oliver Webb via Toybox wrote: > 2 identical versions of the same function, variable names and everything > > 31 bytes saved in bloatcheck The problem being it moves code from pending/ to lib/ whose only users are in pending. I've generally just done singly linked list

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

2024-03-27 Thread Rob Landley
On 3/25/24 20:24, enh wrote: > But "dpkg-query -S $(which $NAME)" is pretty easy to do the mapping > yourself on > debian... > > > (yeah, though i suspect anyone trying to do this hypothetical "swap package $X > for toybox" would want the _opposite_ mapping, from package name to all the

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

2024-03-27 Thread Rob Landley
On 3/25/24 20:20, enh wrote: > On Sun, Mar 24, 2024 at 12:45 AM Rob Landley wrote: > On 3/22/24 10:24, enh wrote: > > On Thu, Mar 21, 2024 at 8:45 PM Rob Landley wrote: > >> Anyway, toys/android basically meant (to me), "commands that come from >

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

2024-03-27 Thread Rob Landley
On 3/24/24 10:15, Oliver Webb wrote: > 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

Re: [Toybox] hexdump tests.

2024-03-27 Thread Rob Landley
On 3/25/24 10:42, enh wrote: > On Sun, Mar 24, 2024 at 1:40 AM Rob Landley wrote: >> >> On 3/22/24 15:02, enh wrote: >> >> > CANONICALIZE_SPACE_IF_RUNNING_HOST_VERSION=1? so we trust ourselves but >> >> > no-one >> >> > else? :-) >

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

2024-03-27 Thread Rob Landley
responding to email instead. On 3/24/24 21:45, Oliver Webb wrote: > On Sunday, March 24th, 2024 at 18:27, Rob Landley wrote: > >> > I've been looking to do a cleanup pass on bc because there are a lot of >> > very obvious things >> > that can be removed (typed

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

2024-03-24 Thread Rob Landley
On 3/24/24 18:40, Rob Landley wrote: >> Also, different command names, there's a dozen different vi implementations >> and >> only a few have the name "vi". This is true for some other commands as well > > I've been doing: > > mkdir sub > ln

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

2024-03-24 Thread Rob Landley
On 3/22/24 16:10, Oliver Webb wrote: >> 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

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

2024-03-24 Thread Rob Landley
On 3/24/24 01:00, Oliver Webb wrote: > I've done some research on this too, we have no "select" statements in any of > our config symbols, for a definition of "we" that is "I have intentionally not merged any", since I review and approve all the kconfig command sections in the headers and have

Re: [Toybox] hexdump tests.

2024-03-24 Thread Rob Landley
On 3/22/24 15:02, enh wrote: >> > CANONICALIZE_SPACE_IF_RUNNING_HOST_VERSION=1? so we trust ourselves but >> > no-one >> > else? :-) >> >> I _don't_ trust myself, and I'm not special. (That's policy.) > > yeah, but that's why i suggested > CANONICALIZE_SPACE_IF_RUNNING_HOST_VERSION --- that way

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

2024-03-24 Thread Rob Landley
On 3/22/24 10:26, enh wrote: > On Fri, Mar 22, 2024 at 8:24 AM enh wrote: >> (tbh, just merging "lsb" into "other" would be a step forwards. wtf >> is/was "lsb" anyway? and while i can _usually_ guess "POSIX or not?" >> correctly, "lsb or other" is impossible by virtue of being >> meaningless.) >

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

2024-03-24 Thread Rob Landley
On 3/22/24 10:24, enh wrote: > On Thu, Mar 21, 2024 at 8:45 PM Rob Landley wrote: >> Anyway, toys/android basically meant (to me), "commands that come from and >> are >> maintained by Elliott which I can't even test because they don't apply to a >> vanilla

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

2024-03-24 Thread Rob Landley
On 3/21/24 06:52, Jarno Mäkipää wrote: > On Thu, Mar 21, 2024 at 1:08 AM Rob Landley wrote: >> >> > There is also a testing problem. vi.c doesn't do TEST_HOST because it >> >> > needs a -s option >> >> > to pass in scripts to test with. >&g

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

2024-03-23 Thread Rob Landley
On 3/22/24 18:09, scsijon wrote: > Date: Fri, 22 Mar 2024 08:24:18 -0700 > >> From: enh >> To: Rob Landley >> Cc: Oliver Webb , toybox >> >> Subject: Re: [Toybox] [PATCH] toysh: fix -Wuse-after-free >> Message-ID: >> >> Conte

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

2024-03-23 Thread Rob Landley
On 3/21/24 23:59, Oliver Webb wrote: > On Thursday, March 21st, 2024 at 22:45, Rob Landley wrote: >> On 3/17/24 14:52, Oliver Webb wrote: >> > Same here, I can remember the posix commands. >> >> Can you? I still have to check some from time to time, and the

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

2024-03-22 Thread Rob Landley
On 3/22/24 16:11, Rob Landley wrote: > 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 >>

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

2024-03-22 Thread Rob Landley
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 implementations > of things like xxd or vi. With this patch you can

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

2024-03-21 Thread Rob Landley
On 3/17/24 14:52, Oliver Webb wrote: > 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

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

2024-03-21 Thread Rob Landley
On 3/17/24 10:23, Oliver Webb wrote: > On Fri, Mar 8, 2024 at 19:46, Rob Landley 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 und

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

2024-03-21 Thread Rob Landley
On 3/21/24 16:13, Oliver Webb wrote: > 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 >>

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

2024-03-21 Thread Rob Landley
On 3/20/24 11:47, enh wrote: > On Wed, Mar 20, 2024 at 9:38 AM Rob Landley <mailto:r...@landley.net>> wrote: > > On 3/20/24 00:02, Oliver Webb via Toybox wrote: > > I spotted the more implementation in pending. Looking at it, it's > missing

Re: [Toybox] [PATCH] mount: avoid deferencing NULL.

2024-03-20 Thread Rob Landley
On 3/20/24 16:07, enh via Toybox wrote: > I don't know why I wasn't seeing this yesterday Because /sys was mounted, so readfile() returned a string with its contents. (And/or race condition of the mount going away between reading /proc/mounts and asking for follow-up data about a specific mount

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

2024-03-20 Thread Rob Landley
On 3/20/24 15:20, Oliver Webb via Toybox wrote: > 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

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

2024-03-20 Thread Rob Landley
On 3/20/24 12:38, Oliver Webb via Toybox wrote: > A target for the 0.9 release is the test suite running under mkroot, On all the architectures mkroot supports (endianness, word size, kernel version), under qemu with a known kernel environment so we can test things like insmod with known modules,

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

2024-03-20 Thread Rob Landley
On 3/20/24 11:56, Oliver Webb wrote: > 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

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

2024-03-20 Thread Rob Landley
On 3/20/24 00:39, David Seikel wrote: > On 2024-03-20 05:02:11, Oliver Webb via Toybox wrote: >> But I have to ask the question "If it's so easy, why isn't it in toybox >> yet?" Is it just because >> other TODO items taking up time, or is it because it's harder to implement >> than it seems. >

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

2024-03-20 Thread Rob Landley
On 3/20/24 00:02, Oliver Webb via Toybox wrote: > 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. More never had the ability to go backwards, less did. Different command. > It's built in a way where

Re: [Toybox] mount option to show what a loopback mount is backed by?

2024-03-19 Thread Rob Landley
On 3/18/24 20:16, enh via Toybox wrote: > mount currently shows something like: > > /dev/block/loop86 on /apex/com.android.hardware.tetheroffload@1 type ext4 > (ro,dirsync,seclabel,nodev,noatime) > > but often the user wants to know what "loop86" refers to. and it's unlikely > they > know to

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

2024-03-18 Thread Rob Landley
On 3/17/24 15:10, Ivo van Poorten wrote: >> In THEORY each man page has a "name" section with a one line >> description, and there should be a way to emit them all, but if >> there's a standard way to do it without writing a shell script I >> dunno what it is. I generally just do > > It looks

Re: [Toybox] hexdump tests.

2024-03-18 Thread Rob Landley
On 3/15/24 16:24, enh wrote: > Sure, but that said some tests _DO_ care about the exact amount of > whitespace > (are columns aligned), or tabs vs spaces. > > i know what you mean, but at the same time, i'm struggling to thing of a > single > case i've been involved with where the

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

2024-03-17 Thread Rob Landley
On 3/15/24 17:48, enh wrote: > > > On Fri, Mar 15, 2024 at 3:43 PM Rob Landley <mailto:r...@landley.net>> wrote: > > On 3/15/24 16:27, enh wrote: > >     That said, I'm not implementing --longopts without a short opt until > somebody >

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

2024-03-15 Thread Rob Landley
On 3/15/24 16:27, enh wrote: > That said, I'm not implementing --longopts without a short opt until > somebody > comes to me with a use case. And then I would come up with short options. > Also, > "env" is probably the wrong place to put this unless it's also going to > sprout >

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

2024-03-15 Thread Rob Landley
On 3/15/24 13:40, enh via Toybox wrote: > i've never noticed these before: > >        --block-signal[=SIG] >               block delivery of SIG signal(s) to COMMAND > >        --default-signal[=SIG] >               reset handling of SIG signal(s) to the default > >        --ignore-signal[=SIG]

Re: [Toybox] hexdump tests.

2024-03-15 Thread Rob Landley
On 3/15/24 09:58, enh wrote: > On Thu, Mar 14, 2024 at 9:25 PM Rob Landley wrote: > > I could make ours do that, or I could export NOSPACE=1 at the start o the > > test > > (since each one runs as a child process now meaning environment variable > > assignments won

Re: [Toybox] [PATCH] readelf: fix -n for x86-64 ibt/shstk notes.

2024-03-15 Thread Rob Landley
Applied, but I don't have a local way to reproduce the issue nor did it come with a test. On 3/14/24 19:08, enh via Toybox wrote: > I couldn't work out how to get gcc to actually produce such a thing, but > /bin/dbxtool on my debian box right now has them. I don't seem to have that command. What

[Toybox] hexdump tests.

2024-03-14 Thread Rob Landley
Following up on commit cab0b6653827, the hexdump test suite is weird. For example, the first test has "simple\\n" when it means "simple\n" (which nevertheless somehow works for reasons I am loathe to examine at the moment, and I have a todo item to convert the various test arguments needing

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

2024-03-14 Thread Rob Landley
On 3/13/24 18:19, Oliver Webb wrote: >> If you want to complain, I do tend to have "s", "ss", and "sss" as an > > I did complain about that in the email. I noticed. >> You're basically complaining there was an "i" variable that wasn't a loop >> index. > > That IS a problem, Not "I have a

Re: [Toybox] [PATCH] watch: flush the buffer each round.

2024-03-13 Thread Rob Landley
On 3/12/24 12:24, enh wrote: > On Tue, Mar 12, 2024 at 8:45 AM Rob Landley wrote: >> >> Hello from Minneapolis: https://mstdn.jp/@landley/112078501045637288 >> >> Still _really_ fried from my move, but at least chipping away at the email >> backlog... >

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

2024-03-13 Thread Rob Landley
On 3/8/24 21:22, Oliver Webb via Toybox wrote: > 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 >

Re: [Toybox] [PATCH] watch: flush the buffer each round.

2024-03-12 Thread Rob Landley
Hello from Minneapolis: https://mstdn.jp/@landley/112078501045637288 Still _really_ fried from my move, but at least chipping away at the email backlog... On 3/11/24 12:27, enh wrote: > On Fri, Mar 8, 2024 at 5:43 PM Rob Landley wrote: >> >> I remember when the xprintf() family w

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

2024-03-08 Thread Rob Landley
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 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

Re: [Toybox] [PATCH] watch: flush the buffer each round.

2024-03-08 Thread Rob Landley
I remember when the xprintf() family would do a flush and check for errors each write. That's why code like: dprintf(1, "%c", padctimelen ? 0 : width-1)); if (yy>=3) dprintf(1, "\r\n"); Was allowable. I also remember when we had an xflush() that would catch errors if stdout

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

2024-03-08 Thread Rob Landley
On 3/8/24 00:02, Oliver Webb wrote: > 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 "re

[Toybox] Giving a mkroot talk at Texas LinuxFest April 13.

2024-03-06 Thread Rob Landley
Schedule just went up, 45 minute talk at 10am on the second day: https://2024.texaslinuxfest.org/schedule/ I need to practice to see what fits in 45 minutes, but it should be a subset of: https://landley.net/talks/mkroot-2023.txt Rob (I submitted a proposal last year before finalizing the

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

2024-03-06 Thread Rob Landley
On 3/5/24 19:16, Oliver Webb via Toybox wrote: > Taking a quick look at the release notes for hurd, they are starting x86_64 > and AMD64 > support, Not surprised you've never seen it and neither have I. > > In the 80s and 90s it was probably a lot more relevant then it is now. No, it really

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

2024-03-05 Thread Rob Landley
On 3/5/24 18:31, enh via Toybox wrote: >> We have a 7-10 year support horizon, How many terminal escape protocols have >> been relevant >> in the last 10 years: One. The story is the same for UTF8 and LP64 There's a certain amount of 80/20 going on. If you 80/20 twice you get 96%. (80% of the

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

2024-03-05 Thread Rob Landley
On 3/5/24 14:44, Oliver Webb via Toybox wrote: >>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, It's actually "reset" that should yank the tty out of cooked mode, which I

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

2024-03-04 Thread Rob Landley
On 3/4/24 20:09, Oliver Webb wrote: > Okay, so ASAN is doing _something_ that replaces the call to crypt with > something else, and since we only do > -lcrypt "as-needed" it does... something. Which means that crypt isn't really > being called. > This is a WEIRD bug, why is ASAN replacing the

Re: [Toybox] find(1) -name vs -wholename

2024-03-04 Thread Rob Landley
On 3/4/24 18:03, enh wrote: > On Mon, Mar 4, 2024 at 3:31 PM Rob Landley wrote: >> >> On 3/4/24 12:19, enh via Toybox wrote: >> > obviously the patch is trivial, but i can't think of an existing >> > toybox tool that has one of these "you're holding it wron

  1   2   3   4   5   6   7   8   9   10   >