chiark / gitweb /
otter.git
4 years agocmdlistener: Change type of bulk_download
Ian Jackson [Sun, 2 May 2021 22:57:32 +0000 (23:57 +0100)]
cmdlistener: Change type of bulk_download

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoProvide DebugExt::to_debug
Ian Jackson [Sun, 2 May 2021 22:56:34 +0000 (23:56 +0100)]
Provide DebugExt::to_debug

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: rework ListBundles return value
Ian Jackson [Sun, 2 May 2021 21:14:00 +0000 (22:14 +0100)]
bundles: rework ListBundles return value

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoif_let: Provide a cardboard cutout version for basic struct variants
Ian Jackson [Sun, 2 May 2021 21:11:42 +0000 (22:11 +0100)]
if_let: Provide a cardboard cutout version for basic struct variants

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Provide Display for Id
Ian Jackson [Sun, 2 May 2021 20:54:27 +0000 (21:54 +0100)]
bundles: Provide Display for Id

Nothing uses this yet but maybe it will be useful.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoConvert bundles::Index to a newtype
Ian Jackson [Sun, 2 May 2021 20:50:09 +0000 (21:50 +0100)]
Convert bundles::Index to a newtype

Mostly for string formatting.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Introduce and use Kind::only
Ian Jackson [Sun, 2 May 2021 09:54:01 +0000 (10:54 +0100)]
bundles: Introduce and use Kind::only

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Fix a typo
Ian Jackson [Sun, 2 May 2021 09:48:15 +0000 (10:48 +0100)]
bundles: Fix a typo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Add a todo
Ian Jackson [Sun, 2 May 2021 09:45:33 +0000 (10:45 +0100)]
bundles: Add a todo

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Initial list-bundles
Ian Jackson [Sun, 2 May 2021 01:03:03 +0000 (02:03 +0100)]
bundles: Initial list-bundles

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: use strum Display for bundles::Kind
Ian Jackson [Sun, 2 May 2021 00:37:23 +0000 (01:37 +0100)]
bundles: use strum Display for bundles::Kind

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Add a bound on b_file for debug convenience
Ian Jackson [Sun, 2 May 2021 00:31:50 +0000 (01:31 +0100)]
bundles: Add a bound on b_file for debug convenience

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Note what we loaded
Ian Jackson [Sun, 2 May 2021 00:18:07 +0000 (01:18 +0100)]
bundles: Note what we loaded

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Actually create the directory, on upload
Ian Jackson [Sun, 2 May 2021 00:12:00 +0000 (01:12 +0100)]
bundles: Actually create the directory, on upload

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agootter: Provide upload-bundle. Does not work yet.
Ian Jackson [Sat, 1 May 2021 23:51:41 +0000 (00:51 +0100)]
otter: Provide upload-bundle.  Does not work yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Provide cmd_withbulk
Ian Jackson [Sat, 1 May 2021 23:35:58 +0000 (00:35 +0100)]
cmdlistener: Provide cmd_withbulk

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Refactor to use write_withbulk
Ian Jackson [Sat, 1 May 2021 23:24:13 +0000 (00:24 +0100)]
cmdlistener: Refactor to use write_withbulk

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Fix writer framing on errors, restructure
Ian Jackson [Sat, 1 May 2021 23:22:02 +0000 (00:22 +0100)]
cmdlistener: Fix writer framing on errors, restructure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agobundles: Initial implementation of framework
Ian Jackson [Sat, 1 May 2021 19:02:14 +0000 (20:02 +0100)]
bundles: Initial implementation of framework

See todos in bundles.rs.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Prepare for aux save files to also be dirs
Ian Jackson [Sat, 1 May 2021 18:59:58 +0000 (19:59 +0100)]
global: Prepare for aux save files to also be dirs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Make savefilename pub
Ian Jackson [Sat, 1 May 2021 18:57:34 +0000 (19:57 +0100)]
global: Make savefilename pub

The bundles code is going to want this.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Refactor destroy game best effort deleting
Ian Jackson [Sat, 1 May 2021 18:56:09 +0000 (19:56 +0100)]
global: Refactor destroy game best effort deleting

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodigest: provide DigestWrite
Ian Jackson [Sat, 1 May 2021 16:45:00 +0000 (17:45 +0100)]
digest: provide DigestWrite

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agodigest: provide DigestRead etc.
Ian Jackson [Sat, 1 May 2021 16:35:01 +0000 (17:35 +0100)]
digest: provide DigestRead etc.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Provide facility for bulk upload/download
Ian Jackson [Sat, 1 May 2021 15:37:46 +0000 (16:37 +0100)]
cmdlistener: Provide facility for bulk upload/download

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomove mgmtchannel read/write to methods on Framed
Ian Jackson [Sat, 1 May 2021 15:35:47 +0000 (16:35 +0100)]
move mgmtchannel read/write to methods on Framed

This will allow us to borrow the read and write halves of a channel
separately, for doing bulk upload/download.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Break out CommandStream so it doesn't get chan
Ian Jackson [Sat, 1 May 2021 15:06:51 +0000 (16:06 +0100)]
cmdlistener: Break out CommandStream so it doesn't get chan

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomgmtchannel: Provide _withbulk
Ian Jackson [Sat, 1 May 2021 14:57:51 +0000 (15:57 +0100)]
mgmtchannel: Provide _withbulk

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketfraame: Move stream flush to finish call
Ian Jackson [Sat, 1 May 2021 14:52:19 +0000 (15:52 +0100)]
packetfraame: Move stream flush to finish call

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Slightly reorganise InstanceOuter construction
Ian Jackson [Sat, 1 May 2021 12:20:57 +0000 (13:20 +0100)]
global: Slightly reorganise InstanceOuter construction

Tidier, and makes space for bundles.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Introduce InstanceOuter
Ian Jackson [Sat, 1 May 2021 12:19:04 +0000 (13:19 +0100)]
global: Introduce InstanceOuter

This will let us put bundle information within a separate lock.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoCHANGLOG: mention spec parsing change
Ian Jackson [Thu, 29 Apr 2021 00:57:19 +0000 (01:57 +0100)]
CHANGLOG: mention spec parsing change

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMove game spec parsing from client to server
Ian Jackson [Thu, 29 Apr 2021 00:43:38 +0000 (01:43 +0100)]
Move game spec parsing from client to server

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomgmtchannel: Correct handling of expanded insn responses
Ian Jackson [Thu, 29 Apr 2021 00:55:59 +0000 (01:55 +0100)]
mgmtchannel: Correct handling of expanded insn responses

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agootter(1): Provide SpecRaw
Ian Jackson [Thu, 29 Apr 2021 00:17:33 +0000 (01:17 +0100)]
otter(1): Provide SpecRaw

Not used yet.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agootter: Introduce SpecParse trait for specs we may want to send raw
Ian Jackson [Thu, 29 Apr 2021 00:17:23 +0000 (01:17 +0100)]
otter: Introduce SpecParse trait for specs we may want to send raw

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Introduce InsnExpanded
Ian Jackson [Wed, 28 Apr 2021 23:57:30 +0000 (00:57 +0100)]
cmdlistener: Introduce InsnExpanded

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Move handling of expand
Ian Jackson [Wed, 28 Apr 2021 23:54:25 +0000 (00:54 +0100)]
cmdlistener: Move handling of expand

We're going to want this to interact with resp

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Provide InsnMark for handling expanding insns
Ian Jackson [Wed, 28 Apr 2021 23:50:30 +0000 (00:50 +0100)]
cmdlistener: Provide InsnMark for handling expanding insns

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: allow insns to prepend more insns
Ian Jackson [Wed, 28 Apr 2021 23:44:26 +0000 (00:44 +0100)]
cmdlistener: allow insns to prepend more insns

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPosOffTableError: Use error autoconversion
Ian Jackson [Wed, 28 Apr 2021 22:43:00 +0000 (23:43 +0100)]
PosOffTableError: Use error autoconversion

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPosOffTableError: Use in organise
Ian Jackson [Wed, 28 Apr 2021 22:38:54 +0000 (23:38 +0100)]
PosOffTableError: Use in organise

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoPosOffTableError: Introduce
Ian Jackson [Wed, 28 Apr 2021 22:36:50 +0000 (23:36 +0100)]
PosOffTableError: Introduce

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agocmdlistener: Do not allow resizing the table so pieces fall outside
Ian Jackson [Wed, 28 Apr 2021 22:29:37 +0000 (23:29 +0100)]
cmdlistener: Do not allow resizing the table so pieces fall outside

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoCHANGELOG: Document recent changes
Ian Jackson [Wed, 28 Apr 2021 22:21:41 +0000 (23:21 +0100)]
CHANGELOG: Document recent changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoCHANGELOG: Document recent changes
Ian Jackson [Wed, 28 Apr 2021 22:19:27 +0000 (23:19 +0100)]
CHANGELOG: Document recent changes

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoapitests: Test that all specs load
Ian Jackson [Wed, 28 Apr 2021 18:53:02 +0000 (19:53 +0100)]
apitests: Test that all specs load

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoMakefile: Add missing dependency of tests on specs
Ian Jackson [Wed, 28 Apr 2021 18:51:06 +0000 (19:51 +0100)]
Makefile: Add missing dependency of tests on specs

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: vatikan: Add a reference to where the info came from
Ian Jackson [Wed, 28 Apr 2021 18:13:33 +0000 (19:13 +0100)]
specs: vatikan: Add a reference to where the info came from

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: Rename same-scope.table.toml
Ian Jackson [Wed, 28 Apr 2021 18:03:31 +0000 (19:03 +0100)]
specs: Rename same-scope.table.toml

This should have a hyphen.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: Introduce samescope.table.toml
Ian Jackson [Wed, 28 Apr 2021 17:02:17 +0000 (18:02 +0100)]
specs: Introduce samescope.table.toml

And the supporting Rust code.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: Plumb InstanceName through to TablePlayerSpec::account_glob
Ian Jackson [Wed, 28 Apr 2021 17:01:34 +0000 (18:01 +0100)]
specs: Plumb InstanceName through to TablePlayerSpec::account_glob

This makes it possible for the meaning of a TablePlayerSpec to be
"local" relative to the instance name.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: Add private.table.toml
Ian Jackson [Wed, 28 Apr 2021 17:00:05 +0000 (18:00 +0100)]
specs: Add private.table.toml

It seems like this should exist.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agootter(1): Add env_logger
Ian Jackson [Wed, 28 Apr 2021 16:58:42 +0000 (17:58 +0100)]
otter(1): Add env_logger

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomgmtchannel: Add tracing calls
Ian Jackson [Wed, 28 Apr 2021 16:53:36 +0000 (17:53 +0100)]
mgmtchannel: Add tracing calls

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospec: Fix TablePlayerSpec glob pattern generation
Ian Jackson [Wed, 28 Apr 2021 16:52:11 +0000 (17:52 +0100)]
spec: Fix TablePlayerSpec glob pattern generation

Fixes TablePlayerSpec::Local.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopaketframe: Delete unused copies of rmp mgmtchannel r/w
Ian Jackson [Wed, 28 Apr 2021 16:33:19 +0000 (17:33 +0100)]
paketframe: Delete unused copies of rmp mgmtchannel r/w

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agospecs: Add vatikan.game.toml
Ian Jackson [Wed, 28 Apr 2021 15:52:27 +0000 (16:52 +0100)]
specs: Add vatikan.game.toml

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agohidden: Document ShowUnocculted proof obligations
Ian Jackson [Sun, 25 Apr 2021 17:13:40 +0000 (18:13 +0100)]
hidden: Document ShowUnocculted proof obligations

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoauthproofs: Document proof obligations
Ian Jackson [Sun, 25 Apr 2021 17:05:32 +0000 (18:05 +0100)]
authproofs: Document proof obligations

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agoglobal: Rename "aux" (from daft old name "access")
Ian Jackson [Sat, 24 Apr 2021 13:01:46 +0000 (14:01 +0100)]
global: Rename "aux" (from daft old name "access")

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomgmtchannel: Switch to msgpack from json
Ian Jackson [Fri, 16 Apr 2021 23:40:55 +0000 (00:40 +0100)]
mgmtchannel: Switch to msgpack from json

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agomgmtchannel: Switch to Framed from newline-based framing
Ian Jackson [Fri, 16 Apr 2021 23:33:22 +0000 (00:33 +0100)]
mgmtchannel: Switch to Framed from newline-based framing

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: test: Test an empty frame
Ian Jackson [Sat, 17 Apr 2021 20:54:06 +0000 (21:54 +0100)]
packetframe: test: Test an empty frame

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Completely rewrite FrameReader
Ian Jackson [Sun, 18 Apr 2021 12:30:34 +0000 (13:30 +0100)]
packetframe: Completely rewrite FrameReader

The was growing more and more epicycles, every time I fixed a test
failure.  And it still wouldn't cope with an empty frame!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test with BufReaders
Ian Jackson [Sun, 18 Apr 2021 12:25:25 +0000 (13:25 +0100)]
packetframe: tests: Test with BufReaders

We are about to make this get quite involved with a BufReader's buffer
methods, so the BufReader will hide our LumpReader.  So test all
combinations of both.  This still only takes 2.5s in a debug build.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Tests: Fold read_all into lumpreader loop
Ian Jackson [Sun, 18 Apr 2021 11:58:12 +0000 (12:58 +0100)]
packetframe: Tests: Fold read_all into lumpreader loop

Just code motion and removal of an indiredtion.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Tests: Fold first read_all into lumpreader test
Ian Jackson [Sun, 18 Apr 2021 11:56:01 +0000 (12:56 +0100)]
packetframe: Tests: Fold first read_all into lumpreader test

With a buffer of len+1 this is equivalent.  This will make it easier
to change the way FrameReader is constructed.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Fuse: introduce and use new()
Ian Jackson [Sun, 18 Apr 2021 11:34:49 +0000 (12:34 +0100)]
packetframe: Fuse: introduce and use new()

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Introduce ChunkLen type
Ian Jackson [Sun, 18 Apr 2021 11:20:19 +0000 (12:20 +0100)]
packetframe: Introduce ChunkLen type

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Rework EOF handling
Ian Jackson [Sat, 17 Apr 2021 19:49:16 +0000 (20:49 +0100)]
packetframe: Rework EOF handling

Check EOF on new_frame(), to return None rather than a weird Read.
Make EOF handling fused too by introducing the new HadEof state.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Break out expect_is_bad_eof
Ian Jackson [Sat, 17 Apr 2021 19:48:56 +0000 (20:48 +0100)]
packetframe: tests: Break out expect_is_bad_eof

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Break out chunk_remaining
Ian Jackson [Sat, 17 Apr 2021 19:35:00 +0000 (20:35 +0100)]
packetframe: Break out chunk_remaining

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Handle end of chunk differently
Ian Jackson [Sat, 17 Apr 2021 19:30:49 +0000 (20:30 +0100)]
packetframe: Handle end of chunk differently

GoodEof is much nicer.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Invent SE::GoodEof
Ian Jackson [Sat, 17 Apr 2021 19:26:13 +0000 (20:26 +0100)]
packetframe: Invent SE::GoodEof

This seems to clarify things and will help in a moemnt.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Add some comments
Ian Jackson [Sat, 17 Apr 2021 19:18:59 +0000 (20:18 +0100)]
packetframe: Add some comments

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Make badeof into a fn rather than a closure
Ian Jackson [Sat, 17 Apr 2021 19:12:50 +0000 (20:12 +0100)]
packetframe: Make badeof into a fn rather than a closure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Introduce a special return type for do_read
Ian Jackson [Sat, 17 Apr 2021 19:08:44 +0000 (20:08 +0100)]
packetframe: Introduce a special return type for do_read

The nested results were extremely confusing!

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Break out expect_bad_eof
Ian Jackson [Sat, 17 Apr 2021 18:53:05 +0000 (19:53 +0100)]
packetframe: tests: Break out expect_bad_eof

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Rename expect_good_eof
Ian Jackson [Sat, 17 Apr 2021 18:51:01 +0000 (19:51 +0100)]
packetframe: tests: Rename expect_good_eof

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Stricten an assertion
Ian Jackson [Sat, 17 Apr 2021 18:49:23 +0000 (19:49 +0100)]
packetframe: tests: Stricten an assertion

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Tidy file by reorganising it and adding comments
Ian Jackson [Sat, 17 Apr 2021 18:49:06 +0000 (19:49 +0100)]
packetframe: Tidy file by reorganising it and adding comments

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test EOF failure before subsequent chunk header
Ian Jackson [Sat, 17 Apr 2021 18:13:21 +0000 (19:13 +0100)]
packetframe: tests: Test EOF failure before subsequent chunk header

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Tristate for state
Ian Jackson [Sat, 17 Apr 2021 18:33:41 +0000 (19:33 +0100)]
packetframe: Tristate for state

New arrangements to handle EOF right

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test EOF failure mid-chunk-data
Ian Jackson [Sat, 17 Apr 2021 18:03:51 +0000 (19:03 +0100)]
packetframe: tests: Test EOF failure mid-chunk-data

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Fix EOF handling in chunk data
Ian Jackson [Sat, 17 Apr 2021 18:03:39 +0000 (19:03 +0100)]
packetframe: Fix EOF handling in chunk data

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test EOF failure in chunk header
Ian Jackson [Sat, 17 Apr 2021 17:57:21 +0000 (18:57 +0100)]
packetframe: tests: Test EOF failure in chunk header

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test EOF succss before first chunk header
Ian Jackson [Sat, 17 Apr 2021 14:12:29 +0000 (15:12 +0100)]
packetframe: tests: Test EOF succss before first chunk header

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Fix EOF handling in chunk header
Ian Jackson [Sat, 17 Apr 2021 14:25:32 +0000 (15:25 +0100)]
packetframe: Fix EOF handling in chunk header

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Move lump test to avoid warning
Ian Jackson [Sat, 17 Apr 2021 12:55:30 +0000 (13:55 +0100)]
packetframe: tests: Move lump test to avoid warning

Otherwise LumpReader is present but dead code under miri.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Disable lump test under miri
Ian Jackson [Sat, 17 Apr 2021 12:54:08 +0000 (13:54 +0100)]
packetframe: tests: Disable lump test under miri

There's no unsafe here and this test is rather slow.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: Test that before boom is boom
Ian Jackson [Sat, 17 Apr 2021 12:50:38 +0000 (13:50 +0100)]
packetframe: tests: Test that before boom is boom

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: LumpReader tests whole buf too
Ian Jackson [Sat, 17 Apr 2021 12:47:50 +0000 (13:47 +0100)]
packetframe: tests: LumpReader tests whole buf too

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: tests: LumpReader tests short reads
Ian Jackson [Sat, 17 Apr 2021 12:45:54 +0000 (13:45 +0100)]
packetframe: tests: LumpReader tests short reads

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Some commented-out dbg
Ian Jackson [Sat, 17 Apr 2021 12:45:45 +0000 (13:45 +0100)]
packetframe: Some commented-out dbg

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Fix expect_boom to cope with short reads
Ian Jackson [Sat, 17 Apr 2021 12:44:55 +0000 (13:44 +0100)]
packetframe: Fix expect_boom to cope with short reads

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Fix handling of partial read
Ian Jackson [Sat, 17 Apr 2021 12:41:34 +0000 (13:41 +0100)]
packetframe: Fix handling of partial read

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Add a bit of dbg to test
Ian Jackson [Sat, 17 Apr 2021 12:31:16 +0000 (13:31 +0100)]
packetframe: Add a bit of dbg to test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Add a bit of dbg to test
Ian Jackson [Sat, 17 Apr 2021 12:29:12 +0000 (13:29 +0100)]
packetframe: Add a bit of dbg to test

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
4 years agopacketframe: Remove dbg calls from non-test code
Ian Jackson [Sat, 17 Apr 2021 12:22:35 +0000 (13:22 +0100)]
packetframe: Remove dbg calls from non-test code

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>