coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stty: don't treat baud rates of (speed_t) -1 as invalid


From: Collin Funk
Subject: Re: [PATCH] stty: don't treat baud rates of (speed_t) -1 as invalid
Date: Mon, 19 Oct 2026 18:27:35 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Pádraig Brady <P@draigBrady.com> writes:

> On 19/10/2026 06:37, Collin Funk wrote:
>> It would be good to add a test for this, but it seems a bit tricky to
>> see if a baud rate of UINT_MAX is supported without using 'stty'
>> itself, since a buggy version would mistakenly say it is unsupported.
>> Perhaps a Perl or Python script will do? I'll check tomorrow, unless
>> anyone has better ideas. Also, this patch requires the one I sent
>> previously. I probably should have sent them together. Oops.
> Both look good to me thanks.
>
> Testing is tricky.
> Perhaps add SPEED_T_MAX to getlimits and
> if $SPEED_T_MAX-1 is supported assume $SPEED_T_MAX is?
> But that's an assumption.
>
> I'm inclined to think this edge case is not worth testing.

Agreed, I guess the tests can wait. I pushed it as is.

I don't think anyone had their day ruined by this bug. :)

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]