~tomleb/hare

linux::keyctl: Add chown and setperm
speed up crypto::argon2 a bit

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
cmd/hare: Improve 'Command not found' error message in get_version

Signed-off-by: Alexey Yerin <yyp@disroot.org>
crypto: use test::skip

Implements: https://todo.sr.ht/~sircmpwn/hare/898

Signed-off-by: Sebastian <sebastian@sebsite.pw>
test: implement skip function

The test runner itself is also refactored to more neatly accomodate for
skipped tests.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
test: disallow expectabort outside @test

Also renamed common to util, since that's just a better name

Signed-off-by: Sebastian <sebastian@sebsite.pw>
Move string comparison logic to sort::cmp::strs()

This way, strings::compare() becomes a wrapper for sort::cmp::strs()
instead of the other way around. That in turn makes strings depend on
sort::cmp instead of the other way around, making sort::cmp (and by
extension, sort itself) usable by bytes (and potentially other modules
that strings depends on).

Thanks to Seb for the idea for this approach, see
https://lists.sr.ht/~sircmpwn/hare-dev/%3Cd2d241c3-e405-49bf-b874-660f7cfa50fd%40bitfehler.net%3E

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
all: style fix

Signed-off-by: Sebastian <sebastian@sebsite.pw>
all: fix test failure memory leaks

by using defer to free resources, so they free even if an assertion
fails

Signed-off-by: Sebastian <sebastian@sebsite.pw>
time::chrono: drop unused leapsecs parameter

Signed-off-by: Sebastian <sebastian@sebsite.pw>
cmd/parsechk: initial commit

This uses hare::parse to parse all .ha files in the tree, and report if
any parsing errors occurred. This should hopefully ensure that in the
future we keep hare::parse up to date, and don't push changes that
compile but don't work with haredoc.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
os: remove finish

This was an alias of fs::finish, which doesn't make sense since os::iter
returns an fs::iterator, and the os-specific finish function is embedded
within the iterator itself so it's called by fs::finish. os::finish also
wasn't ever referenced by the docs, so users have been lead to use
fs::finish anyway.

Signed-off-by: Sebastian <sebastian@sebsite.pw>
crypto::{math,bigint}: export some util functions

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
crypto::math: make eq0u32 param u32

The int parameter was inhereted from the BearSSL implementation. It does
not make any sense here though. It seems like some kind of a C
workaround (wild guess).

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
crypto::bigint: decode only actual encoded words

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
*: remove full module name usage
hare::parse: Disallow single element tuple types

Signed-off-by: Alexey Yerin <yyp@disroot.org>
hare::parse: Disallow single type tagged unions

Similar to single item tuples, those are also disallowed in harec. They also
create invalid code in unparse->parse roundtrip.

Signed-off-by: Alexey Yerin <yyp@disroot.org>
hare::parse: Disallow single element tuples

Bootstrap harec already disallows them and in general they are incredibly
broken.

Signed-off-by: Alexey Yerin <yyp@disroot.org>
cmd/hare: Improve errors for task failure

Add full path to the module and reorder words to look more like English.

Signed-off-by: Alexey Yerin <yyp@disroot.org>
Next