Include ~all crates in default members

Several tests were not running due to being omitted from this list.
pull/650/head
Tamir Duberstein 1 year ago
parent 5407d4a9a1
commit 6d06e2bf3a
No known key found for this signature in database

@ -1,7 +1,5 @@
[alias] [alias]
xtask = "run --package xtask --" xtask = "run --package xtask --"
build-bpfel = "build -Zbuild-std=core --target=bpfel-unknown-none"
build-bpfeb = "build -Zbuild-std=core --target=bpfeb-unknown-none"
[target.armv7-unknown-linux-gnueabi] [target.armv7-unknown-linux-gnueabi]
linker = "arm-linux-gnueabi-gcc" linker = "arm-linux-gnueabi-gcc"

@ -23,6 +23,9 @@ jobs:
- aarch64 - aarch64
- arm - arm
- riscv64 - riscv64
target:
- bpfel-unknown-none
- bpfeb-unknown-none
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
@ -38,11 +41,12 @@ jobs:
- name: Prereqs - name: Prereqs
run: cargo install bpf-linker run: cargo install bpf-linker
- uses: taiki-e/install-action@cargo-hack
- name: Build - name: Build
env: env:
CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }} CARGO_CFG_BPF_TARGET_ARCH: ${{ matrix.arch }}
run: | run: |
cargo build-bpfel -p aya-bpf --verbose cargo hack build --package aya-bpf --package aya-log-ebpf \
cargo build-bpfeb -p aya-bpf --verbose --feature-powerset \
cargo build-bpfel -p aya-log-ebpf --verbose --target ${{ matrix.target }} \
cargo build-bpfeb -p aya-log-ebpf --verbose -Z build-std=core

@ -1,11 +1,11 @@
[workspace] [workspace]
members = [ members = [
"aya", "aya",
"aya-obj",
"aya-tool",
"aya-log", "aya-log",
"aya-log-common", "aya-log-common",
"aya-log-parser", "aya-log-parser",
"aya-obj",
"aya-tool",
"test/integration-test", "test/integration-test",
"xtask", "xtask",
@ -19,15 +19,26 @@ members = [
"bpf/aya-log-ebpf", "bpf/aya-log-ebpf",
"test/integration-ebpf", "test/integration-ebpf",
] ]
resolver = "2" resolver = "2"
default-members = [ default-members = [
"aya", "aya",
"aya-bpf-macros",
"aya-log",
"aya-log-common",
"aya-log-parser",
"aya-obj", "aya-obj",
"aya-tool", "aya-tool",
"aya-log", # test/integration-test is omitted; it must be built with xtask.
"xtask",
"aya-bpf-macros", "aya-bpf-macros",
"aya-log-ebpf-macros", "aya-log-ebpf-macros",
# ebpf crates are omitted; they must be built with:
# --target bpfe{b,l}-unknown-none
# CARGO_CFG_BPF_TARGET_ARCH={x86_64,aarch64,arm,riscv64}
] ]
[profile.dev] [profile.dev]

@ -298,8 +298,8 @@ mod test {
#[test] #[test]
fn log_value_length_sufficient() { fn log_value_length_sufficient() {
assert!( assert!(
LOG_BUF_CAPACITY >= LogValueLength::MAX.into(), LOG_BUF_CAPACITY <= LogValueLength::MAX.into(),
"{} < {}", "{} > {}",
LOG_BUF_CAPACITY, LOG_BUF_CAPACITY,
LogValueLength::MAX LogValueLength::MAX
); );

@ -163,8 +163,7 @@ mod test {
Fragment::Parameter(Parameter { Fragment::Parameter(Parameter {
hint: DisplayHint::Ip hint: DisplayHint::Ip
}), }),
Fragment::Literal(" lmao ".into()), Fragment::Literal(" lmao {} {something}".into()),
Fragment::Literal(" {{}} {{something}}".into()),
]) ])
); );
assert!(parse("foo {:}").is_err()); assert!(parse("foo {:}").is_err());

@ -404,8 +404,13 @@ impl SkBuffContext {
/// # Examples /// # Examples
/// ///
/// ```no_run /// ```no_run
/// mod bindings; /// use aya_bpf::programs::SkBuffContext;
/// use bindings::{ethhdr, iphdr, udphdr}; /// # #[allow(non_camel_case_types)]
/// # struct ethhdr {};
/// # #[allow(non_camel_case_types)]
/// # struct iphdr {};
/// # #[allow(non_camel_case_types)]
/// # struct udphdr {};
/// ///
/// const ETH_HLEN: usize = core::mem::size_of::<ethhdr>(); /// const ETH_HLEN: usize = core::mem::size_of::<ethhdr>();
/// const IP_HLEN: usize = core::mem::size_of::<iphdr>(); /// const IP_HLEN: usize = core::mem::size_of::<iphdr>();

@ -161,8 +161,13 @@ impl TcContext {
/// # Examples /// # Examples
/// ///
/// ```no_run /// ```no_run
/// mod bindings; /// use aya_bpf::programs::TcContext;
/// use bindings::{ethhdr, iphdr, udphdr}; /// # #[allow(non_camel_case_types)]
/// # struct ethhdr {};
/// # #[allow(non_camel_case_types)]
/// # struct iphdr {};
/// # #[allow(non_camel_case_types)]
/// # struct udphdr {};
/// ///
/// const ETH_HLEN: usize = core::mem::size_of::<ethhdr>(); /// const ETH_HLEN: usize = core::mem::size_of::<ethhdr>();
/// const IP_HLEN: usize = core::mem::size_of::<iphdr>(); /// const IP_HLEN: usize = core::mem::size_of::<iphdr>();

Loading…
Cancel
Save