Commit Graph

8 Commits (82039144bdf7d46d536b62d94d29268990180294)

Author SHA1 Message Date
Tamir Duberstein 82a77bc83d
integration-test: Implement running on VMs
Implements running integration tests on multiple VMs with arbitrary
kernel images using `cargo xtask integration-test vm ...`.

This changes our coverage from 6.2 to 6.1 and 6.4.
1 year ago
Tamir Duberstein 4fef255823
disallow (some) as conversions
See https://rust-lang.github.io/rust-clippy/master/#/as_conversions.
1 year ago
Tamir Duberstein 6feebef9e5
aya-log-ebpf: simplify argument validation 1 year ago
Robert Bartlensky 47a2f25fca aya-log-ebpf-macros: fix compile errors
aya-log-ebpf-macros was failing to compile because it was referencing
a couple of `DisplayHint` variants that no longer exist. These were
removed in #599.

```
    Compiling aya-log-ebpf-macros v0.1.0 (/home/robert/aya/aya-log-ebpf-macros)
error[E0599]: no variant or associated item named `Ipv4` found for enum `DisplayHint` in the current scope
  --> aya-log-ebpf-macros/src/expand.rs:93:22
   |
93 |         DisplayHint::Ipv4 => parse_str("::aya_log_ebpf::macro_support::check_impl_ipv4"),
   |                      ^^^^ variant or associated item not found in `DisplayHint`

error[E0599]: no variant or associated item named `Ipv6` found for enum `DisplayHint` in the current scope
  --> aya-log-ebpf-macros/src/expand.rs:94:22
   |
94 |         DisplayHint::Ipv6 => parse_str("::aya_log_ebpf::macro_support::check_impl_ipv6"),
   |                      ^^^^ variant or associated item not found in `DisplayHint`

For more information about this error, try `rustc --explain E0599`.
```
1 year ago
Hanaasagi 0970300d1f feat(aya-log): check format and value type in proc macro 1 year ago
Michal Rostecki 83ec27f06b lib: Add display hints
This change adds optional display hints:

* `{:x}`, `{:X}` - for hex representation of numbers
* `{:ipv4}`, `{:IPv4}` - for IPv4 addresses
* `{:ipv6}`, `{:IPv6}` - for IPv6 addresses

It also gets rid of dyn-fmt and instead comes with our own parser
implementation.

Tested on: https://github.com/vadorovsky/aya-examples/tree/main/tc

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki 944d6b8a16 Change from Rust edition 2018 to 2021
Rust 2021 adds more core prelude imports, including `TryFrom` and
`TryInto`.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Dave Tucker dc31e11691 Re-organize into a single workspace
This commit moves the aya-log projects from the subtree and adds them to
the main cargo workspace. It also brings the BPF crates into the
workspace and moves the macro crates up a level since they aren't BPF
code.

Miri was disabled for aya-bpf as the previous config wasn't actually
checking anything.

CI, clippy, fmt and release configurations have all been adjusted
appropriately.

CI was not properly running for other supported arches which was also
ixed here.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago