instance_id string | repo string | pull_number int64 | issue_numbers sequence | base_commit string | patch string | test_patch string | problem_statement string | hints_text string | created_at string | version string | updated_at string | environment_setup_commit string | FAIL_TO_PASS sequence | PASS_TO_PASS sequence | FAIL_TO_FAIL sequence | PASS_TO_FAIL sequence | source_dir string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aya-rs__aya-774 | aya-rs/aya | 774 | [
"636"
] | 792f467d40dc4c6c543c62dda7a608863fc364dc | diff --git a/aya/src/maps/mod.rs b/aya/src/maps/mod.rs
--- a/aya/src/maps/mod.rs
+++ b/aya/src/maps/mod.rs
@@ -291,9 +291,9 @@ macro_rules! impl_try_from_map {
// rather than the repeated idents used later because the macro language does not allow one
// repetition to be pasted inside another.
($ty_param... | diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs
--- a/aya/src/maps/hash_map/hash_map.rs
+++ b/aya/src/maps/hash_map/hash_map.rs
@@ -108,43 +108,22 @@ mod tests {
use libc::{EFAULT, ENOENT};
use crate::{
- bpf_map_def,
generated::{
bpf_attr, bpf... | cant' use LruHashMap in userspace
the userspace HashMap try_from impl
```rust
impl<'a, V: Pod, K: Pod> TryFrom<&'a mut Map> for HashMap<&'a mut MapData, V, K> {
type Error = MapError;
fn try_from(map: &'a mut Map) -> Result<HashMap<&'a mut MapData, V, K>, MapError> {
match map {
Ma... | https://docs.rs/aya/latest/src/aya/maps/hash_map/hash_map.rs.html#48
the crates.io version handled the lruhashmap
maybe we can add a new type LruHashMap to fix this problem
Do you have a test? I don't understand this issue.
sorry for the late reply
kernel space codes
main.rs
```rust
#[xdp(name = "lru_test")]... | 2023-08-31T01:49:22Z | 1.5 | 2023-09-01T15:30:33Z | 1d272f38bd19f64652ac8a278948f61e66164856 | [
"maps::hash_map::hash_map::tests::test_try_from_ok_lru",
"maps::hash_map::per_cpu_hash_map::tests::test_try_from_ok_lru"
] | [
"maps::bloom_filter::tests::test_contains_not_found",
"maps::bloom_filter::tests::test_contains_syscall_error",
"maps::bloom_filter::tests::test_insert_ok",
"maps::bloom_filter::tests::test_insert_syscall_error",
"maps::bloom_filter::tests::test_new_ok",
"maps::bloom_filter::tests::test_try_from_ok",
"m... | [] | [] | null |
aya-rs__aya-656 | aya-rs/aya | 656 | [
"654"
] | 61608e64583f9dc599eef9b8db098f38a765b285 | diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,7 +24,6 @@ resolver = "2"
default-members = [
"aya",
- "aya-bpf-macros",
"aya-log",
"aya-log-common",
"aya-log-parser",
diff --git a/aya-obj/Cargo.toml b/aya-obj/Cargo.toml
--- a/aya-obj/Cargo.toml
+++ b/aya-obj/Carg... | diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs
--- a/aya-obj/src/obj.rs
+++ b/aya-obj/src/obj.rs
@@ -1486,7 +1486,7 @@ pub fn copy_instructions(data: &[u8]) -> Result<Vec<bpf_insn>, ParseError> {
#[cfg(test)]
mod tests {
use alloc::vec;
- use matches::assert_matches;
+ use assert_matches::assert_matc... | Kernel version detection is broken on WSL
Using aya from with the yesterday's commit fails with
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(Parse("90.1", "patch"))', /home/debian/.cargo/git/checkouts/aya-c55fbc69175ac116/242d8c3/aya/src/maps/mod.rs:504:55
```
when runnin... | 2023-07-14T14:51:06Z | 0.11 | 2023-07-15T03:18:35Z | 61608e64583f9dc599eef9b8db098f38a765b285 | [
"btf::btf::tests::parsing_older_ext_data",
"btf::btf::tests::test_fixup_ptr",
"btf::btf::tests::test_fixup_func_proto",
"btf::btf::tests::test_fixup_datasec",
"btf::btf::tests::test_parse_header",
"btf::btf::tests::test_sanitize_datasec",
"btf::btf::tests::test_parse_btf",
"btf::btf::tests::test_sanit... | [
"tests::btf_relocations::relocate_enum64",
"tests::btf_relocations::relocate_enum64_signed",
"tests::btf_relocations::relocate_enum_signed",
"tests::load::pin_lifecycle",
"tests::smoke::xdp"
] | [
"tests::btf_relocations::relocate_pointer",
"tests::elf::test_maps",
"tests::btf_relocations::relocate_field",
"tests::btf_relocations::relocate_struct_flavors",
"tests::btf_relocations::relocate_enum",
"tests::rbpf::use_map_with_rbpf",
"tests::rbpf::run_with_rbpf",
"tests::load::pin_lifecycle_kprobe"... | [] | null | |
aya-rs__aya-897 | aya-rs/aya | 897 | [
"896"
] | b6a84b658ae00f23d0f1721c30d11f2e57f99eab | diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs
--- a/aya-bpf-macros/src/cgroup_skb.rs
+++ b/aya-bpf-macros/src/cgroup_skb.rs
@@ -29,7 +29,7 @@ impl CgroupSkb {
let section_name: Cow<'_, _> = if self.attach_type.is_some() {
format!("cgroup_skb/{}", self.attach_type... | diff --git a/aya-bpf-macros/src/cgroup_skb.rs b/aya-bpf-macros/src/cgroup_skb.rs
--- a/aya-bpf-macros/src/cgroup_skb.rs
+++ b/aya-bpf-macros/src/cgroup_skb.rs
@@ -66,7 +66,7 @@ mod tests {
let expanded = prog.expand().unwrap();
let expected = quote! {
#[no_mangle]
- #[link_sect... | Error: error parsing BPF object: invalid program section `cgroup_skb`
**My program code:
```
#[cgroup_skb]
pub fn cg01(ctx: SkBuffContext) -> i32 {
match try_cg02(ctx) {
Ok(ret) => ret,
Err(ret) => ret,
}
}
fn try_cg01(ctx: SkBuffContext) -> Result<i32, i32> {
info!(&ctx, "received... | Change
```
#[cgroup_skb]
```
to
```
#[cgroup_skb(ingress)]
```
if you want to hook to ingress or
```
#[cgroup_skb(egress)]
```
if you want to hook to egress
@dave-tucker looks like this was broken in https://github.com/aya-rs/aya/commit/c72aab5f7b809b48273cd2fed4554ddff6b66bdf#diff-748602d38469... | 2024-03-04T07:45:13Z | 1.5 | 2024-03-04T08:53:45Z | 1d272f38bd19f64652ac8a278948f61e66164856 | [
"cgroup_skb::tests::cgroup_skb"
] | [
"cgroup_device::tests::test_cgroup_device",
"btf_tracepoint::tests::test_btf_tracepoint",
"cgroup_skb::tests::cgroup_skb_egress",
"btf_tracepoint::tests::test_btf_tracepoint_with_function",
"cgroup_skb::tests::cgroup_skb_ingress",
"cgroup_skb::tests::priv_function",
"cgroup_skb::tests::pub_crate_functio... | [] | [] | null |
aya-rs__aya-431 | aya-rs/aya | 431 | [
"427"
] | 82773f46c8cff830b36b8b4f57100952eb6ec8d2 | diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs
--- a/aya/src/maps/array/array.rs
+++ b/aya/src/maps/array/array.rs
@@ -1,4 +1,5 @@
use std::{
+ borrow::Borrow,
convert::{AsMut, AsRef},
marker::PhantomData,
};
diff --git a/aya/src/maps/array/array.rs b/aya/src/maps/array/array.rs
-... | diff --git a/aya/src/maps/hash_map/hash_map.rs b/aya/src/maps/hash_map/hash_map.rs
--- a/aya/src/maps/hash_map/hash_map.rs
+++ b/aya/src/maps/hash_map/hash_map.rs
@@ -311,6 +317,27 @@ mod tests {
assert!(hm.insert(1, 42, 0).is_ok());
}
+ #[test]
+ fn test_insert_boxed_ok() {
+ override_sysc... | API for updating maps with large Pod
Although Rust is memory safe, it does not have any stack overflow protection. The default Rust stack is 2MB which is plenty for most applications. However, when dealing with Pod with large arrays embedded, it's possible to overflow the user space Rust stack.
Here's an example:
... | We can change the insert() calls to take `AsRef<K>` and `AsRef<V>` so they work with both values and references (including boxes) | 2022-11-01T20:35:41Z | 0.11 | 2023-02-23T09:59:02Z | 61608e64583f9dc599eef9b8db098f38a765b285 | [
"maps::bloom_filter::tests::test_contains_syscall_error",
"maps::bloom_filter::tests::test_contains_not_found",
"maps::bloom_filter::tests::test_insert_ok",
"maps::bloom_filter::tests::test_insert_syscall_error",
"maps::bloom_filter::tests::test_new_not_created",
"maps::bloom_filter::tests::test_new_ok",
... | [] | [] | [] | null |
aya-rs__aya-90 | aya-rs/aya | 90 | [
"88"
] | 3a8e4fe9b91538a0fafd8c91ae96185c1a017651 | diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/aya/src/obj/mod.rs
+++ b/aya/src/obj/mod.rs
@@ -410,6 +410,7 @@ struct Section<'a> {
address: u64,
name: &'a str,
data: &'a [u8],
+ size: u64,
relocations: Vec<Relocation>,
}
diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/a... | diff --git a/aya/src/obj/mod.rs b/aya/src/obj/mod.rs
--- a/aya/src/obj/mod.rs
+++ b/aya/src/obj/mod.rs
@@ -607,6 +611,7 @@ mod tests {
address: 0,
name,
data,
+ size: data.len() as u64,
relocations: Vec::new(),
}
}
| bpf(2) fails with invalid argument when creating .bss map
I wanted to test out a simple example of using .data, .rodata, and .bss maps in Aya. It seems that .data and .rodata work just fine, but creating the .bss map always seems to fail with an invalid argument error. Inspecting the strace dump (shown below), the offe... | 2021-10-31T00:02:13Z | 0.10 | 2021-11-04T06:00:06Z | b9a544831c5b4cd8728e9cca6580c14a623b7793 | [
"maps::hash_map::hash_map::tests::test_get_syscall_error",
"maps::hash_map::hash_map::tests::test_insert_ok",
"maps::hash_map::hash_map::tests::test_get_not_found",
"maps::hash_map::hash_map::tests::test_insert_syscall_error",
"maps::hash_map::hash_map::tests::test_iter",
"maps::hash_map::hash_map::tests:... | [] | [] | [] | null | |
aya-rs__aya-253 | aya-rs/aya | 253 | [
"51"
] | b9a544831c5b4cd8728e9cca6580c14a623b7793 | diff --git a/aya/src/programs/cgroup_skb.rs b/aya/src/programs/cgroup_skb.rs
--- a/aya/src/programs/cgroup_skb.rs
+++ b/aya/src/programs/cgroup_skb.rs
@@ -9,7 +9,8 @@ use crate::{
bpf_prog_type::BPF_PROG_TYPE_CGROUP_SKB,
},
programs::{
- define_link_wrapper, load_program, FdLink, Link, ProgAtt... | diff --git a/aya/src/programs/links.rs b/aya/src/programs/links.rs
--- a/aya/src/programs/links.rs
+++ b/aya/src/programs/links.rs
@@ -153,7 +192,7 @@ pub(crate) use define_link_wrapper;
mod tests {
use std::{cell::RefCell, rc::Rc};
- use crate::programs::ProgramError;
+ use crate::programs::{OwnedLink, P... | lifecyle: Add a `forget()` API for `Link`
Default behaviour is that the `Drop` trait calls `detach()` when the program is terminated (or panics).
For some types of long running programs you may wish to intentionally `forget()` the fd wrapped by `Link`, so you can keep the program running after exit. Query and detach c... | I'm not sure it should be called `forget()`, but then again I am struggling to come up with a better name. Maybe something like `keep_program_attached()`, `disown()`, or `keep_attached()`. Maybe I'll come up with a better name.
| 2022-05-06T23:27:37Z | 0.10 | 2022-05-12T18:56:36Z | b9a544831c5b4cd8728e9cca6580c14a623b7793 | [
"maps::hash_map::hash_map::tests::test_insert_ok",
"maps::hash_map::hash_map::tests::test_get_not_found",
"maps::hash_map::hash_map::tests::test_get_syscall_error",
"maps::hash_map::hash_map::tests::test_insert_syscall_error",
"maps::hash_map::hash_map::tests::test_iter",
"maps::hash_map::hash_map::tests:... | [] | [] | [] | null |
sharkdp__bat-1017 | sharkdp/bat | 1,017 | [
"1008"
] | d6abad908a51cf9396cc8521a5ec94b1fc9206ea | diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs
--- a/src/syntax_mapping.rs
+++ b/src/syntax_mapping.rs
@@ -42,6 +42,11 @@ impl<'a> SyntaxMapping<'a> {
)
.unwrap();
+ // See #1008
+ mapping
+ .insert("rails", MappingTarget::MapToUnknown)
+ .unwr... | diff --git a/src/assets.rs b/src/assets.rs
--- a/src/assets.rs
+++ b/src/assets.rs
@@ -481,4 +481,15 @@ mod tests {
"Bourne Again Shell (bash)"
);
}
+
+ #[test]
+ fn issue_1008() {
+ let test = SyntaxDetectionTest::new();
+
+ assert_eq!(
+ test.syntax_for_file_w... | bin/rails script highlighted as HTML (Rails) instead of Ruby
<!--
Hey there, thanks for creating an issue!
In order to reproduce your issue, we might need to know a little bit more about the environment
which you're running `bat` on.
If you're on Linux or MacOS:
Please run the script at https://github.com/sh... | Thank you for reporting this!
We recently discussed whether first-line syntax detection should take precedence over the filename syntax detection: see #685 and https://github.com/sharkdp/bat/issues/891#issuecomment-604617183
Unfortunately, there are some cases where it's not favorable to rely on first-line detect... | 2020-05-24T08:23:09Z | 0.15 | 2020-05-24T09:27:48Z | 2d1a92b7cc2af6c35f868cbefe9dbfe466c59fcb | [
"config::default_config_should_highlight_no_lines",
"config::default_config_should_include_all_lines",
"less::test_parse_less_version_487",
"less::test_parse_less_version_551",
"less::test_parse_less_version_529",
"line_range::test_parse_partial_min",
"less::test_parse_less_version_wrong_program",
"li... | [] | [] | [] | null |
sharkdp__bat-1556 | sharkdp/bat | 1,556 | [
"1550"
] | c569774e1a8528fab91225dabdadf53fde3916ea | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@
- If `PAGER` (but not `BAT_PAGER` or `--pager`) is `more` or `most`, silently use `less` instead to ensure support for colors, see #1063 (@Enselic)
- If `PAGER` is `bat`, silently use `less` to prevent recursion. For `BAT... | diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs
--- a/tests/integration_tests.rs
+++ b/tests/integration_tests.rs
@@ -652,6 +652,13 @@ fn config_location_test() {
.assert()
.success()
.stdout("bat.conf\n");
+
+ bat_with_config()
+ .env("BAT_CONFIG_PATH", "not-ex... | BAT_CONFIG_PATH ignored by --generate-config-file
<!-- Hey there, thank you for creating an issue! -->
**What version of `bat` are you using?**
<!-- Output of `bat --version` -->
Newest
**Describe the bug you encountered:**
)
```
in
```
pub fn config_file() -> PathBuf {
env::var("BAT_CONFIG_PATH")
.ok()
.map(PathBuf::from)
.filter(|conf... | 2021-02-27T11:22:32Z | 0.17 | 2021-02-28T14:19:15Z | c569774e1a8528fab91225dabdadf53fde3916ea | [
"config_location_test"
] | [
"line_range::test_ranges_open_low",
"input::utf16le",
"less::test_parse_less_version_487",
"less::test_parse_less_version_551",
"config::default_config_should_include_all_lines",
"line_range::test_ranges_simple",
"line_range::test_parse_full",
"input::basic",
"line_range::test_ranges_advanced",
"p... | [] | [] | null |
sharkdp__bat-1522 | sharkdp/bat | 1,522 | [
"1521"
] | d36b091fd7c9050c80078c0fe286d09dbab0f45a | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -17,9 +17,9 @@ dependencies = [
[[package]]
name = "ansi_colours"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d0f302a81afc6a7f4350c04f0ba7cfab529cc009bca3324b3fb5764e6a... | diff --git a/Cargo.lock b/Cargo.lock
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -117,7 +106,7 @@ dependencies = [
"serial_test",
"shell-words",
"syntect",
- "tempdir",
+ "tempfile",
"unicode-width",
"wait-timeout",
"wild",
diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -76,11 +73,11 @@ ... | RUSTSEC-2020-0053: dirs: dirs is unmaintained, use dirs-next instead
When `cargo-audit` is run on any crate that depends directly or indirectly on bat, the following is output (for more info, see https://rustsec.org/advisories/RUSTSEC-2020-0053):
```
Crate: dirs
Version: 3.0.1
Warning: unmaint... | 2021-01-17T22:23:01Z | 0.17 | 2021-02-16T16:42:31Z | c569774e1a8528fab91225dabdadf53fde3916ea | [
"config::default_config_should_highlight_no_lines",
"config::default_config_should_include_all_lines",
"less::test_parse_less_version_487",
"input::utf16le",
"input::basic",
"less::test_parse_less_version_wrong_program",
"less::test_parse_less_version_529",
"line_range::test_parse_fail",
"line_range... | [] | [] | [] | null | |
sharkdp__bat-1506 | sharkdp/bat | 1,506 | [
"1413"
] | b25713938d23b0ff59e82e3e969b56423028ce53 | "diff --git a/CHANGELOG.md b/CHANGELOG.md\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -14,6 +14,7 @@(...TRUNCATED) | "diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs\n--- a/tests/integration_tests(...TRUNCATED) | "Can't use `bat` at all! (Error: Use of bat as a pager is disallowed...)\n**What version of `bat` ar(...TRUNCATED) | "That's intentional, see https://github.com/sharkdp/bat/pull/1343\r\nPersonally, I don't like this r(...TRUNCATED) | 2021-01-10T16:13:16Z | 0.17 | 2021-08-20T04:48:10Z | c569774e1a8528fab91225dabdadf53fde3916ea | [
"env_var_pager_value_bat"
] | ["config::default_config_should_include_all_lines","less::test_parse_less_version_529","config::defa(...TRUNCATED) | [] | [] | null |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 8