From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender-of-o57.zoho.eu (sender-of-o57.zoho.eu [136.143.169.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FD3419D8BC for ; Fri, 3 Apr 2026 15:51:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.57 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775231467; cv=pass; b=GX28mZmy5Jx+WHNjMtG2vS49y/sHIYkIE3zR5TFkA8S9EPADu98ngBDDV0bJA6aV46pEkdBuZVohg9zVmUdTjELNFusaqFS3wfnKZLAM652YQAyMsqsfZOfZF1yf7Lh7Fb4I/lcssyBL0sgGw4xY2J8S4XfVEOA5W5STBrxGfV8= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775231467; c=relaxed/simple; bh=lJY1ACbDTL9FYebHy3blTcMAFUF9iGRAU+q213vIqJg=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=f1Nn+4pH43V9U2S4Moy/yBzFGg5UdBYFyqtcYfSKgHwwbS17WBkVoC/14sH9hQENoc8ZEONBHWNna32V0f2y+FpUEi2baiMV1TfxzHfJfyZwtVovu6ocgrVl/FhPF3mfoK4JzyOaC7gksaHk3yb3bNmLJoSilbVXyiKl+Ox48Sw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org; spf=pass smtp.mailfrom=objecting.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b=mjxYtRJ0; arc=pass smtp.client-ip=136.143.169.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=objecting.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=objecting.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=objecting.org header.i=objecting@objecting.org header.b="mjxYtRJ0" ARC-Seal: i=1; a=rsa-sha256; t=1775231452; cv=none; d=zohomail.eu; s=zohoarc; b=Z3UFk0ihlqDyFP2yFGXBWU4cIrHl+ZtEmDybyRNsfNkWGjbsQIvhNUa+uvsuyuaaocWQHeSa4rk8Syo91YguD9+ardWRyf5ILn/e9h5UbRhJUPJ1VwlXeY4iYoUW1ezg+1tZjWbA/EAWpkVcwB3D03B3IDoSJz9mP3JP2vYGt2A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1775231452; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=lJY1ACbDTL9FYebHy3blTcMAFUF9iGRAU+q213vIqJg=; b=JOVWXsAhk5DJAqCtqfKi4oPF/d0+o7P2QeQTsPXOniLW4XB7gHJB27kYxFtRfcTRpHUowk3EaWQZxQxAdhyW2PMV3URgf/TFmTm5oQMdZdHAEuW1EqniZ9IOuPN1Yv5X7wcemJ+3Yt06v0OKDZt9imHyWpRou+0arByKXF064X0= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=objecting.org; spf=pass smtp.mailfrom=objecting@objecting.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1775231452; s=zmail; d=objecting.org; i=objecting@objecting.org; h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=lJY1ACbDTL9FYebHy3blTcMAFUF9iGRAU+q213vIqJg=; b=mjxYtRJ0Uf1m6l192+gQ7mI7hjV6qyBmfBnnZ0CMIMdMwRz+U62QPNlkKWyz2HCY I00Oa1YD5b7U6G2P0Wche18AauL9idgTCH/qNqdc/X5j8GSWXyuvCirJZW2g+6csybI wY6z0cJpYQdhwqg3trAy/xt0nf0YRjLhGTSj9Qt0= Received: from mail.zoho.com by mx.zoho.eu with SMTP id 1775231452119497.3122794995303; Fri, 3 Apr 2026 17:50:52 +0200 (CEST) Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1775231449852745.0999131693442; Fri, 3 Apr 2026 17:50:49 +0200 (CEST) Date: Fri, 03 Apr 2026 16:50:49 +0100 From: Josh Law To: Cc: , , , , Message-ID: <19d540a3afb.4e80747a170670.7200857965755638934@objecting.org> In-Reply-To: References: <20260403152853.61870-1-objecting@objecting.org> Subject: Re: [PATCH] lib/glob: add more KUnit tests for glob Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Importance: Normal User-Agent: Zoho Mail X-Mailer: Zoho Mail ---- On Fri, 03 Apr 2026 16:49:10 +0100 visitorckw@gmail.com wrote ---- > Hi Josh, > > On Fri, Apr 03, 2026 at 03:28:53PM +0000, Josh Law wrote: > > Since there isnt much tests for lib/glob.c, lets go ahead and add some = more > tests > > checkpatch.pl generates the following warnings: > > WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit > description?) > #60: > Since there isnt much tests for lib/glob.c, lets go ahead and add some mo= re > tests > > WARNING: 'isnt' may be misspelled - perhaps 'isn't'? > #60: > Since there isnt much tests for lib/glob.c, lets go ahead and add some mo= re > tests > ^^^^ > > total: 0 errors, 2 warnings, 31 lines checked > > I have mentioned this to you multiple times in the past: please always > run checkpatch.pl to check your patches before sending them. > > Regards, > Kuan-Wei Hi Kuan, it was genuinely my mistake. I forgot to run check patch before se= nding it over. And this happened. I'll give it a bit before sending over a = V2 fixing these issues :) > > > > > Signed-off-by: Josh Law > > > --- > > lib/tests/glob_kunit.c | 25 +++++++++++++++++++++++++ > > 1 file changed, 25 insertions(+) > > > > diff --git a/lib/tests/glob_kunit.c b/lib/tests/glob_kunit.c > > index 362b1eda8e5b..73d4f72fa824 100644 > > --- a/lib/tests/glob_kunit.c > > +++ b/lib/tests/glob_kunit.c > > @@ -90,6 +90,31 @@ static const struct glob_test_case glob_test_cases[]= =3D { > > =C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "*abcd*abcdef*", .str =3D "abcabcdab= cdeabcdefg", .expected =3D true > }, > > =C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "*abcd*", .str =3D "abcabcabcabcefg"= , .expected =3D false }, > > =C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "*ab*cd*", .str =3D "abcabcabcabcefg= ", .expected =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0/* backslash escaping */ > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\a", .str =3D "a", .expected =3D = true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\a", .str =3D "\\a", .expected = =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\*", .str =3D "*", .expected =3D = true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\*", .str =3D "a", .expected =3D = false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\?", .str =3D "?", .expected =3D = true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\?", .str =3D "a", .expected =3D = false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\[a]", .str =3D "[a]", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\\\", .str =3D "\\", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "a\\*b", .str =3D "a*b", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "a\\*b", .str =3D "aXb", .expected = =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0/* trailing backslash */ > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "a\\", .str =3D "a", .expected =3D = true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\\", .str =3D "", .expected =3D tr= ue }, > > +=C2=A0=C2=A0=C2=A0=C2=A0/* backwards ranges */ > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[z-a]", .str =3D "m", .expected = =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[!z-a]", .str =3D "m", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0/* high-bit characters */ > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\xc0", .str =3D "\xc0", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "\xc0", .str =3D "\x80", .expected = =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[\x80-\xff]", .str =3D "\xc0", .ex= pected =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[\x80-\xff]", .str =3D "\x7f", .ex= pected =3D false }, > > +=C2=A0=C2=A0=C2=A0=C2=A0/* unclosed bracket as literal */ > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[abc", .str =3D "[abc", .expected = =3D true }, > > +=C2=A0=C2=A0=C2=A0=C2=A0{ .pat =3D "[abc", .str =3D "a", .expected =3D= false }, > > }; > > > > static void glob_case_to_desc(const struct glob_test_case *t, char *des= c) > > -- > > 2.34.1 > >