primordic/IssueDupesLite huggingface dataset:
Repository: swiftlang/swift-testing

Issue #42: I need a replacement for `XCTContext.runActivity(named:)`
Created: 2023-10-01T05:29:16Z
Description
SSIA
I want to name each process in the test function.
I do not want to run it in the main thread.

Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
swift-testing version/commit hash
70f5963
Swift & OS version (output of swift --version && uname -a)
$ swift --version && uname -a
swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0
Darwin uhooinoMacBook-Air.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:52 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8103 arm64

Duplicate issue #607: Add API for writing informational messages in tests
Created: 2024-08-08T02:49:30Z
Description
My team uses seeded random value generation throughout our test suites. To ensure that tests are repeatable, we log the seed to the console before each test is run. With XCTest, we did this using XCTContext.runActivity as follows:
open class RandomizedTestCase : XCTestCase, RandomValueGeneratingTestSuite {
    …
    @MainActor
    public var randomSeed: UInt64 {
        …
        set {
            XCTContext.runActivity(named: "Using random seed \(newValue)") { (activity) in
                randomNumberGenerator.seed = newValue
                print(activity.name)
            }
        }
    }

    …

    open override func setUp() async throws {
        try await super.setUp()
        await setRandomSeed(Date.timeIntervalSinceReferenceDate.bitPattern)
    }
}
This allows the seed to show up in the console and xcresult bundles. In CI, we extract information from the xcresult bundles to generate HTML test reports, and it’s important that the seeds show up for failed tests so that engineers can repeat the test with the same inputs to diagnose what went wrong.
As best as I can tell, Swift Testing lacks any mechanism to log dynamic informational messages in tests. Console output is not included in the JSON ABI (or xcresult bundles when run from Xcode), so we can’t use print(…). Issue.record(_:sourceLocation:) nearly works, but issues are treated like test failures, which is inappropriate for our use case. If there were something like Message.record(_:sourceLocation:), that would probably work well for us.
Without some mechanism for seeing the random seeds in xcresult bundles, we can’t adopt Swift Testing.
If you consider this more an Xcode issue vs. a Swift Testing one, please let me know and I can log something using Feedback Assistant.
swift-testing version/commit hash
Whichever version is included with Xcode 16 beta 5.
Swift & OS version (output of swift --version && uname -a)
swift-driver version: 1.113 Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1)
Target: arm64-apple-macosx14.0
Darwin «redacted» 23.6.0 Darwin Kernel Version 23.6.0: Fri Jul  5 17:56:41 PDT 2024; root:xnu-10063.141.1~2/RELEASE_ARM64_T6000 arm64

Closing comment (2024-08-08T09:54:08Z): Duplicate of #42
Repository: swiftlang/swift-testing

Issue #162: Value not shown in error message when an expectation condition has effects (try/await)
Created: 2023-12-15T15:23:27Z
Description
#expect works differently when await keyword is inside its body. await #expect(expr) shows a breakdown of the actual value, while #expect(await expr) does not. I would like to know why the expectation failed even if the result is computed from an async expression.

Expected behavior
#expect(await Array(stream) == [1,2]) throws the error testAll(): Expectation failed: (Array(stream) → [1, 2, 3]) == ([1,2] → [1, 2])
Actual behavior
#expect(await Array(stream) == [1,2]) throws the error testAll(): Expectation failed: await Array(stream) == [1,2]
Steps to reproduce
No response
swift-testing version/commit hash
3fa4ea0
Swift & OS version (output of swift --version && uname -a)
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Darwin MBP 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

Duplicate issue #756: #expect does not show output for try expression
Created: 2024-10-09T05:39:36Z
Description
Motivation
The original logic is a 3 step computation.
However I'd like to test multi instance and name the instance with number make me sad. So I compress the steps into one throwing function.
But then the #expect macro won't show the output for the left expression with try.
let instance1 = step1(1)
let instance1Data = try step2(instance1)
let instance1String = step3(instance1Data)
#expect(instance1String == "1")

let instance2 = step1(2)
let instance2Data = try step2(instance2)
let instance2String = step3(instance2Data)
#expect(instance2String == "2")

...
⬇️
func helper(_ input: Int) throws -> String {
  let instance = step1(input)
  let data = try step2(instance)
  return step3(data)
}

#expect(try helper(1) == "1")
#expect(try helper(2) == "2")
...
Reproduce
A simplified version to demonstrate the issue
enum MultiError: Error {
    case invalidInput
}

func multi(_ a: Int, _ b: Int) throws -> Int {
    guard a > 0, b > 0 else {
        throw MultiError.invalidInput
    }
    return a * b
}

func multiWithoutThrow(_ a: Int, _ b: Int) -> Int {
    return a * b
}

@Test func example() async throws {
    #expect(try multi(1, 2) == 3)
    #expect(multiWithoutThrow(1, 2) == 3)
}
Expected behavior
Expectation failed: (try multi(1, 2) → 2) == 3
Expectation failed: (multiWithoutThrow(1, 2) → 2) == 3

Actual behavior
Expectation failed: try multi(1, 2) == 3
Expectation failed: (multiWithoutThrow(1, 2) → 2) == 3

Steps to reproduce
See code snippet above
swift-testing version/commit hash
Xcode 16.0
Swift & OS version (output of swift --version ; uname -a)
No response

Closing comment (2024-10-09T11:14:01Z): Duplicate of #162
Repository: swiftlang/swift-testing

Issue #491: error: stored property 'xcTestCompatibleSelector' of 'Sendable'-conforming struct 'Test' has non-sendable type '__XCTestCompatibleSelector?' (aka 'Optional<Selector>')
Created: 2024-06-17T01:30:10Z
Description
Using swift-6.0-DEVELOPMENT-SNAPSHOT-2024-06-12-a.xctoolchain on macOS, I'm unable to use swift testing because of this error.
Expected behavior
I expect swift test --disable-xctest would build and run my tests.
Actual behavior
.build/checkouts/swift-testing/Sources/Testing/Test.swift:69:14: error: stored property 'xcTestCompatibleSelector' of 'Sendable'-conforming struct 'Test' has non-sendable type '__XCTestCompatibleSelector?' (aka 'Optional<Selector>')
 67 |   /// property is always `nil`.
 68 |   @_spi(ForToolsIntegrationOnly)
 69 |   public var xcTestCompatibleSelector: __XCTestCompatibleSelector?
    |              `- error: stored property 'xcTestCompatibleSelector' of 'Sendable'-conforming struct 'Test' has non-sendable type '__XCTestCompatibleSelector?' (aka 'Optional<Selector>')
 70 |
 71 |   /// An enumeration describing the evaluation state of a test's cases.

ObjectiveC.Selector:1:23: note: struct 'Selector' does not conform to the 'Sendable' protocol
1 | @frozen public struct Selector : ExpressibleByStringLiteral {
  |                       `- note: struct 'Selector' does not conform to the 'Sendable' protocol
2 |     public init(_ str: String)
3 |     public init(stringLiteral value: String)

Steps to reproduce

Install swift-6.0-DEVELOPMENT-SNAPSHOT-2024-06-12-a.xctoolchain from swift.org
Run swift test --disable-xctest

swift-testing version/commit hash
da1d5ac
Swift & OS version (output of swift --version ; uname -a)
Apple Swift version 6.0-dev (LLVM 6e13b8be259f20f, Swift e7c2412597ed910)
Target: arm64-apple-macosx14.0

Darwin m14 23.6.0 Darwin Kernel Version 23.6.0: Thu Jun  6 16:11:38 PDT 2024; root:xnu-10063.140.26.0.1~13/DEVELOPMENT_ARM64_T6000 arm64

Duplicate issue #496: Compile error when building with 6.0-DEVELOPMENT-SNAPSHOT-2024-06-18-a
Created: 2024-06-19T17:09:57Z
Description
I get the following error when compiling
Stored property 'xcTestCompatibleSelector' of 'Sendable'-conforming struct 'Test' has non-sendable type '__XCTestCompatibleSelector?' (aka 'Optional<Selector>')

Expected behavior
It compiles
swift-testing version/commit hash
0.10.0
Swift & OS version (output of swift --version ; uname -a)
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: x86_64-apple-macosx14.0
Darwin Adams-iMac-Pro-2.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64

Closing comment (2024-06-19T17:38:13Z): Duplicate of #491
See my comment there
Repository: swiftlang/swift-testing

Issue #480: Using recording an issue inside of a detached task causes a crash.
Created: 2024-06-13T14:04:54Z
Description
This is something I learned while researching potential ways to address #475. Which, at the time I wrote that issue, I thought would have just resulted in the failure being silently dropped.
The current way of determining what the current reporting tests natively in Swift-Testing is broken when you run an expect inside of a detached task. Technically, you get a failing test result, but it's because the test runner crashed. I haven't yet spelunked enough through the codebase to figure out where that crash is.
This is because Test.current is stored as a task-local value. Which means that when you make an expect inside of a detached task, Swift Testing has lost that context, which means that Test.current is incorrectly (from the semantics of the current running test) as nil.
I don't know the concurrency system well enough to be able to suggest a good solution. The issue is that, because Swift Testing supports task-based parallelization, the value of Test.current strongly depends on the task it's running on. Which makes having a global Test.current like what's in swift-corelibs-xctest the wrong solution.
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
This test should pass. The test runner crashes with a non-zero error instead.
import Testing

@Test func CheckingExpectWithDetachedTasks() async {
    await Task.detached {
        #expect(Bool(false))
    }.value
}

swift-testing version/commit hash
Testing Library Version: 75.7 (arm64e-apple-macos13.0)
Swift & OS version (output of swift --version ; uname -a)
No response

Duplicate issue #500: Difficult to debug fatal error when expectation is called after a test completes
Created: 2024-06-24T19:40:52Z
Description
If you are testing code that runs in a Task and forget to wait for it to finish, Swift Testing currently crashes.
Expected behavior
Ideally, Swift Testing wouldn't crash, and would instead emit a test failure or some other friendlier diagnostic.
Actual behavior
Swift Testing crashes with the message:

❌ Fatal error: Internal inconsistency: No test reporter for test case argumentIDs: Optional([])

Steps to reproduce
@Test func task() async {
  let task = Task {
    #expect(1 == 2)
  }
  // await task.value  // Comment in for a passing test
}
swift-testing version/commit hash
Testing Library Version: 75.7 (arm64e-apple-macos13.0) (Xcode 16 beta 1)
Swift & OS version (output of swift --version ; uname -a)
swift-driver version: 1.109.2 Apple Swift version 6.0 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)
Target: arm64-apple-macosx14.0
Darwin Stephens-M2-Pro.lan 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 arm64

Closing comment (2024-06-25T10:25:58Z): Duplicate of #480
Repository: syslog-ng/syslog-ng

Issue #2941: Docker Image is a bit outdated
Created: 2019-09-23T12:27:38Z
Hi,
it would be nice if the Images over at https://hub.docker.com/r/balabit/syslog-ng
would be more recent.
Bonus would be to have the Versions as Tags, so you can switch easily between versions.
greetings
Christian

Duplicate issue #3198: Push newer version to DockerHub
Created: 2020-03-27T13:21:12Z
I would like to use syslog-ng in docker and I would like to run the latest version (which at the time of writing is 3.26.1).
When I go to https://hub.docker.com/r/balabit/syslog-ng/tags I can see the "latest" has been updated 2 months ago, but the last tagged version is 3.24.1
I would prefer not to use the "latest" tag as I want to be able to control my updates.
I tried to find out when are new versions tagged, but I couldn't find such information.
When can we expect to see 3.26.1 in dockerhub?

Closing comment (2020-03-27T14:24:24Z): Duplicate of #2941
Which is unfortunately still open :(
I updated our images. Thank You for reporting it!
Repository: syslog-ng/syslog-ng

Issue #1044: Unhelpful error message when trying elasticsearch() destination with Elasticsearch2
Created: 2016-05-06T11:43:44Z
If a user mistakenly chooses the wrong version of SCL compared to which library is installed, an unhelpful generic error message is shown.
We should probably show at least a stack trace.

Duplicate issue #1188: java-based destinations: Give understandable error message if class not found
Created: 2016-09-01T10:56:07Z
it is related to #1187.
If client-lib-dir() is not configured properly, for example the destination specific jar files are missing, syslog-ng displays only the next message:
[2016-09-01T10:45:53.190640] Add path to classpath: /home/pzolee/projects/syslog-ng-ose/install/lib/syslog-ng/java-modules/syslog-ng-core.jar;
[2016-09-01T10:45:53.193655] Error initializing message pipeline;

This is not really informative and makes the debugging very hard.
Instead, it should displays an error message about class not found and list the classes.
Similar to this:
Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/Elasticsearch
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.Elasticsearch

Closing comment (2016-09-01T14:01:28Z): Duplicates #1044
Repository: syslog-ng/syslog-ng

Issue #140: implement multi-line-timeout
Created: 2014-06-18T09:53:18Z
well, it seems that syslog-ng does not detect any files in this mode and/or at least not displaying any incoming message.
To reproduce the issue: create the source file with this content:
root@thor-t410:/home/pzolee/zwa/projects/syslog-ng-ose-3.6/install# cat /var/testdb_working_dir/073358cb-d1ab-415a-a2a3-a874a500b080.txt
Mar 18 12:07:04 testhost localprg PREFIX msg_with_prefix_without_garbage first line
msg_with_prefix_without_garbage second line
msg_with_prefix_without_garbage third line

then start syslog-ng with the config below.
The result:
[2014-06-18T09:43:28.842848] Module loaded and initialized successfully; module='syslogformat'
[2014-06-18T09:43:28.843001] Running application hooks; hook='1'
[2014-06-18T09:43:28.843019] Running application hooks; hook='3'
[2014-06-18T09:43:28.843054] syslog-ng starting up; version='3.6.0alpha0'

Thats all, syslog-ng does not recognize the file.
Expected result: syslog-ng processes the file then creates the proper multi line message when the timeout is reached:
"A message is considered complete if no new lines arrive to the message for 10 seconds, even if no line matching the multi-line-garbage() option is received."
config
@version: 3.6
options {
    threaded(yes);
};
source s_file_97358a54e6924af4826d9ab6ccb074fb {
    file("/var/testdb_working_dir/073358cb-d1ab-415a-a2a3-a874a500b080.txt" keep_hostname(yes)
 multi-line-mode(regexp)
 multi_line_prefix("PREFIX")
);
};
destination d_file_3f633b65908846c085561437c13d2ff8 {
    file("/var/testdb_working_dir/d333cb26-8a64-4bc1-8089-b04c1ace8a20.txt");
};
log {
source(s_file_97358a54e6924af4826d9ab6ccb074fb);
destination(d_file_3f633b65908846c085561437c13d2ff8);

flags(flow-control);
};

Duplicate issue #690: Feature: multiline timeout
Created: 2015-09-11T13:58:03Z
Currently when using multi-line-mode the message being currently processed can never leave syslog-ng until the next arrives.
The proposal is to add a multi-line-timeout option that would default to 0 to keep the current behaviour.

Closing comment (2015-12-16T11:25:54Z): Dup of #140 (we consider this as a bug).  Can we close this?
Repository: syslog-ng/syslog-ng

Issue #668: HTTP destination can use only PUT method
Created: 2015-09-03T09:07:48Z
It would be good if we can configure http method in configuration, and it can be use as value: PUT, or POST.

Duplicate issue #669: HTTP destination does not log any server side error
Created: 2015-09-03T09:11:25Z
It would be good if syslog-ng can log out server side errors to the console output.

Closing comment (2015-09-21T05:08:44Z): This task is related to #668 and will be fixed with PR #689. We just simply log the  returned status code of the server and a default message to the code as a reason.
Repository: syslog-ng/syslog-ng

Issue #663: geoip: spurious and wrongly routed messages
Created: 2015-08-28T14:42:00Z
When the geoip parser fails to match an entry in the database, e.g. 127.0.0.1, it complains with Invalid database type GeoIP City Edition, Rev 1, expected GeoIP Country Edition.

this message is spurious
and should flow through the internal message queue

Duplicate issue #1446: geoip: Invalid database type GeoIP Country Edition warning message
Created: 2017-04-25T13:55:09Z
This is an really annoying warning(?) message:
"Invalid database type GeoIP Country Edition, expected GeoIP City Edition, Rev 1"
If I add the city edition instead then:
"Invalid database type GeoIP City Edition, Rev 1, expected GeoIP Country Edition"
bonus: the function itself works, just gives this message every time when a new message comes.
This message should not come, and especially not to stderr without any formatting (this is not a syslog-ng debug message).
pzolee@Thor-E5440:~/projects/syslog-ng-ose/install$ sbin/syslog-ng -Fe
syslog-ng: Error setting capabilities, capability management disabled; error='Operation not permitted'
[2017-04-25T15:51:14.283711] WARNING: Configuration file format is newer than the current version, please specify the current version number (3.9) in the @version directive. syslog-ng will operate at its highest supported version in this mode;
[2017-04-25T15:51:14.283797] Plugin module not found in 'module-path'; module-path='/home/pzolee/projects/syslog-ng-ose/install/lib/syslog-ng', module='geoip'
[2017-04-25T15:51:14.303182] syslog-ng starting up; version='3.9.1'
[2017-04-25T15:51:16.984564] Syslog connection accepted; fd='14', client='AF_INET(127.0.0.1:41188)', local='AF_INET(0.0.0.0:1212)'
Invalid database type GeoIP Country Edition, expected GeoIP City Edition, Rev 1
[2017-04-25T15:51:16.984919] Syslog connection closed; fd='14', client='AF_INET(127.0.0.1:41188)', local='AF_INET(0.0.0.0:1212)'
[2017-04-25T15:52:10.216462] Syslog connection accepted; fd='14', client='AF_INET(127.0.0.1:41192)', local='AF_INET(0.0.0.0:1212)'
Invalid database type GeoIP Country Edition, expected GeoIP City Edition, Rev 1
[2017-04-25T15:52:10.216605] Syslog connection closed; fd='14', client='AF_INET(127.0.0.1:41192)', local='AF_INET(0.0.0.0:1212)'


reproduction:
start syslog-ng with the config below
send a message:echo "<38>Jan  1 14:45:22 95.108.142.138 prg00000[1234]: test message" | nc 127.0.0.1 1212
config:
@version: 7.0
@module geoip

options {
stats_freq(0);
keep_hostname(yes);
};

destination d_messages { file("/tmp/aaa" template("$(format-json --scope core --key geoip*)\n")); };

source s_tcp{tcp(port(1212));};

parser p_geoip { geoip( "${HOST}", prefix( "geoip." )
database("/usr/share/GeoIP/GeoIP.dat")
); };

log {
source(s_tcp);
parser(p_geoip);
destination(d_messages);
};

Closing comment (2017-04-25T14:12:47Z): that's a duplicate of #663
Repository: syslog-ng/syslog-ng

Issue #129: pdbtool merge: htmlentities break functionality
Created: 2014-05-22T11:49:11Z
I have a pdb file which triggers an action on a given condition:
<action condition='"${appacct.difference_dur}" &gt;= "604800"'>
pdbtool merge transforms this snippet into:
<action condition='&quot;${appacct.difference_dur}&quot; &gt;= &quot;604800&quot;'>
Problem is, the condition now matches all events, even those where ${appacct.difference_dur} < 604800.

Duplicate issue #154: pdbtool merge converts greater-than character
Created: 2014-07-07T19:26:57Z
Simply put, when merging two pattern databases, the > symbol is converted to &gt in the output file. This is meant to match literally in my log line (from a Cisco ASA log).

Closing comment (2014-07-12T10:24:32Z): Duplicate of #129
Repository: syslog-ng/syslog-ng

Issue #949: @ in format json is absorbed
Created: 2016-02-22T13:13:52Z
I have the following elasticsearch configuration:
destination d_elastic_aa0d413f8dc54bba979e079956b53a6b {
elasticsearch(client_lib_dir(/var/testdb_working_dir/b6b17447-b836-470e-9a41-29ce43fc3e5e/build/distributions/elastic-libs/lib)
client_mode("node")
cluster("elasticsearch-syslog-ng-test-jenkins")
frac_digits(3)
index("t1f9401b2ff1e390675a7_testbot")
port("9300")
resource("/var/testdb_working_dir/934e1c47-ccd2-444c-8527-6831e3a6dcd4.yml")
send_time_zone("+09:00")
server("10.140.32.83")
template("$(format-json date=${DATE} timezone=${TZ} @timestamp=${ISODATE})")
type("slng_test_type"));
};
the important part is the: @timestamp=${ISODATE}
Now syslog-ng generates the next message:
Outgoing log entry, json='{"timezone":"+09:00","date":"Feb 25 23:09:07.000","timestamp":"2016-02-25T23:09:07.000+09:00"}'
@ is missing in timestamp field thus the stored value belongs to timestamp field instead of @timestamp.
version:
this is the last commit:
commit 7cca32d
Merge: 52f535e d1f7098
Author: Balazs Scheidler balazs.scheidler@balabit.com
Date:   Fri Feb 19 20:53:45 2016 +0100
Merge pull request #938 from bkil-syslogng/f/fix-dup-last_parser-tlsssloptions

F/fix dup last parser tlsssloptions

Duplicate issue #1017: Cannot set @timestamp as pair in format-json value-pairs parameter.
Created: 2016-04-10T14:06:31Z
I have the following template:
"$(format-json --scope rfc5424 --exclude DATE --key ISODATE --pair @timestamp=$ISODATE)"
If I format I will get a JSON containing "timestamp" instead of "@timestamp".
The culprit is in vp_walker_split_name_to_tokens() function, if I change strcspn(&name[pos], "@."); to strcspn(&name[pos], "."); it works properly.

Closing comment (2016-04-10T14:36:15Z): Hello @talien,
I think this is a duplicate of #949. We have an unmerged fix here: #969.
Repository: syslog-ng/syslog-ng

Issue #318: Fails to start if destination host unreachable
Created: 2014-12-01T09:55:59Z
Reported by one of the Debian admins, syslog-ng 3.5.6 fails to start if a TLS destination is unreachable at the time syslog-ng is started during boot. This is very unfortunate, because this makes the whole system unbootable without manual intervention.
The desired behaviour would be suspending the destination until time-reopen() or somesuch. As far as I remember, something similar was attempted for tcp() destinations, but it appears it still does not work.

Duplicate issue #553: syslog-ng fails to start if a target cannot be resolved
Created: 2015-07-08T18:36:13Z
If any one of the hostnames given in network destinations are not resolvable, syslog-ng will not start.
This means that there is no logging occurring on the system at all, including local logging, and therefore there is no logging to say why syslog is not starting, leaving users at a loss.
It would seem much better that only the affected destination is disabled, and syslog-ng continues to run up with those destinations not in use, so some subset of system logging can still occur. syslog-ng should also then log to the logs that destination is unavailable due to error resolving hostname, allowing users to discover and resolve the issue more effectively.

Closing comment (2015-07-08T19:05:00Z): This is a duplicate of #318
Repository: syslog-ng/syslog-ng

Issue #2906: Backtick substitution is broken in v3.23.1
Created: 2019-09-06T09:37:58Z
@version: 3.23

@define test "/tmp/test"

log {
  source {
     file(`test`);
  };
};


Result:
Follow mode file still does not exist; filename='`test`'

It seems #2869 completely bypasses yy_filter_input(), because YY_INPUT is not used when flex scans from a buffer (yy_scan_buffer): f2ab472

Duplicate issue #2927: Global variables does not work anymore for file output
Created: 2019-09-16T12:14:43Z
Hi,
I just changed from v3.9 to 3.23.
Global variables in file destination path used to work but not anymore.
Version of syslog-ng
syslog-ng 3 (3.23.1)
Config version: 3.23
Installer-Version: 3.23.1
Revision:
Compile-Date: Sep 11 2019 17:44:21
Module-Directory: /logs/lvapp/lib/syslog-ng
Module-Path: /logs/lvapp/lib/syslog-ng
Include-Path: /logs/lvapp/share/syslog-ng/include
Available-Modules: cef,linux-kmsg-format,confgen,xml,map-value-pairs,kafka,graphite,csvparser,afsocket,pseudofile,afstomp,cryptofuncs,tfgetent,json-plugin,date,appmodel,afuser,system-source,disk-buffer,basicfuncs,afprog,examples,http,hook-commands,syslogformat,snmptrapd-parser,affile,stardate,tags-parser,kvformat,add-contextual-data,dbparser
Enable-Debug: off
Enable-GProf: off
Enable-Memtrace: off
Enable-IPv6: off
Enable-Spoof-Source: off
Enable-TCP-Wrapper: off
Enable-Linux-Caps: off
Enable-Systemd: off

Platform
[root@rhel6jb ~]# uname -a
Linux rhel6jb 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@rhel6jb ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Issue
Failure
Steps to reproduce

start syslog-ng

Configuration
@version: 3.23
@include "scl.conf"
source s_local {
        internal();
};

@define a_syslog_log_root_path "foo"
destination d_local {
        file(/tmp/`a_syslog_log_root_path`);
};

log {
        source(s_local);
        destination(d_local);
};

Input and output logs (if possible)
lsof :
syslog-ng 2257 root   13w   REG              253,0     1174  1463417 /tmp/`a_syslog_log_root_path`


My real config is a little bit more complex, with conf files including other and multiple variable substitutions, but this basic example also shows the issue.
# A more usefull example :
## In main syslog-ng.conf :
@define syslog_log_root_path "/tmp/syslog-ng"
@define naming_scheme "${YEAR}_${MONTH}_${DAY}.log"
##In instance1.conf :
@define instance1_syslog_log_root_path "`syslog_log_root_path`/network"
destination d_network_dhcp  {
    file("`instance1_syslog_log_root_path`/dhcp/$FULLHOST/`naming_scheme`"  group("logs_dhcp") dir-group("logs_dhcp") log-fifo-size(500000));
};

Closing comment (2019-09-18T05:58:57Z): Duplicate of #2906
Repository: t1m0thyj/WinDynamicDesktop

Issue #475: mutiple desktop stucking different state of wallpaper
Created: 2022-09-02T06:50:45Z
I'm thinking about preload theme by app start, this may solve title mentioned issue. Thank you.

Duplicate issue #523: wallpaper do not refresh itself in other mutli-task desktop screen
Created: 2023-04-08T15:07:54Z
WDD Version: 5.2.1
OS Version: win 11

suppose you set up WDD wallpaper after that creating new multi-task desktop the WDD do not change wallpaper of newly created desktop at the time of change to the
Steps to Reproduce:
1.changing multi-task desktop
Are you using the Microsoft Store version of WDD?: Yes

Closing comment (2023-04-20T04:16:36Z): Closing as duplicate of #475. Since WDD v5.1.0 the feature to sync virtual desktops is still available but must be installed separately as a script:

Note: This version removes syncing wallpaper across virtual desktops in Windows 11 which used an experimental API that is too unstable to support. If you still want this functionality, install the Sync Virtual Desktops script.
Repository: t1m0thyj/WinDynamicDesktop

Issue #256: Select Specific Image from Pack as Wallpaper
Created: 2020-10-14T05:40:37Z
Hi all,
The issue is when we buy a wallpaper pack with multiple images inside, we don't always like all of them.
It would be great to be able to pick which one to display at the moment and not be forced to see the one fixed  for the hour in the pack.
Could you guys add this feature ?
That would be top.
Thank you very much

Duplicate issue #271: Manual Choose for Pictures.
Created: 2020-11-21T22:45:31Z
Hello , I was wonder if you could give the option to choose manually between wallpapers of the selected theme , and other option to resume auto changing of wallpapers .
I Believe that will be great features to be add .
Thanks : )

Closing comment (2020-12-02T05:11:51Z): This seems like duplicate of #256. As mentioned in comment there, this is not a planned feature for WDD since you can create custom themes. Feel free to reopen if I've misunderstood the request.
Repository: t1m0thyj/WinDynamicDesktop

Issue #257: [Feature Request] Give option to make lock screen background dynamic as well
Created: 2020-10-14T16:56:09Z
Is your feature request related to a problem?
Yes, I keep my PC locked very often, and it's really annoying that the lock screen wallpaper is different from the main dyanmic wallpaper that I have. I have tried to set the lock screen background to one stage of the dynamic wallpaper, but it just makes it looks worse and inconsistant.
Describe the solution you'd like
The solution I would like is a small checkbox that can be pressed (either from the dropdown menu or the select theme window), which will set the lock screen background to be dynamic as well. This can be a boolean value in settings.conf as well. I don't know how this would be implemented, but I think it would be easy enough if the registry is being used to change the wallpaper, since I believe there is a registry entry for the lock screen background as well.
Describe alternatives you've considered
I've tried looking into other dynamic wallpaper apps as well, but none that I have seen have had a lock screen functionality. I tried making a script, but it didn't work out.

Duplicate issue #289: Problem setting WinDynamicDesktop theme in lock screen
Created: 2021-03-03T15:28:47Z
Hello, I really love WinDynamicDesktop and I've been looking at it's themes. But I was wondering if there is a way to set my lock screen background image to be the same as the one being displayed in the background screen so that they change at the same time and they both use the chosen theme. Does WinDynamicDesktop allow that in some way? Please tell me how to do it, thank you so much.

Closing comment (2021-05-07T04:14:56Z): Duplicate of #257
Repository: t1m0thyj/WinDynamicDesktop

Issue #15: Avira detects WinDynamicDesktop as a trojan
Created: 2018-06-18T09:37:08Z
Surely WinDynamicDesktop is safe, right? Should I mark it as safe?

Duplicate issue #18: Avast detection
Created: 2018-06-18T16:40:01Z
Avast's avg module is triggered when you click "start on boot", the module is idp.alexa.51

Closing comment (2018-06-18T23:45:20Z): Closed as duplicate of #15. Unfortunately I don't think I can really do much about this, if you're using AVG or Avira please submit the EXE to be reviewed as a false positive.
Repository: t1m0thyj/WinDynamicDesktop

Issue #324: Crash on pretty much any action
Created: 2021-06-01T21:02:06Z
WDD Version: 4.5.0
OS Version: Windows 10 Home 21H1 (Build 19043.1023)

Steps to Reproduce:

Do almost anything with the app (start it up [this stopped with a fresh install], try downloading a theme, try applying a theme). Opening "About" does NOT trigger the error.

Are you using the Microsoft Store version of WDD?: Yes
Log of error:
[2021-06-01 20:51:49.824] System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
   bei WinDynamicDesktop.WallpaperChangeScheduler.GetImageData(SolarData data, ThemeConfig theme, DateTime dateNow)
   bei WinDynamicDesktop.WPF.ThemePreviewerViewModel.PreviewTheme(ThemeConfig theme)
   bei WinDynamicDesktop.ThemeDialog.UpdateSelectedItem()
   bei WinDynamicDesktop.ThemeDialog.OnDownloadDialogClosed(Object sender, FormClosedEventArgs e)
   bei System.Windows.Forms.Form.OnFormClosed(FormClosedEventArgs e)
   bei System.Windows.Forms.Form.WmClose(Message& m)
   bei System.Windows.Forms.Form.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Der Index war außerhalb des Arraybereichs. is The index is out of range.

Duplicate issue #243: Error when starting WinDynamicDesktop 
Created: 2020-09-17T22:24:04Z
Description
[2020-09-17 22:09:20.196] System.IndexOutOfRangeException: Index was outside the bounds of the array.
at WinDynamicDesktop.WallpaperChangeScheduler.GetImageData(SolarData data, ThemeConfig theme)
at WinDynamicDesktop.WallpaperChangeScheduler.RunScheduler(Boolean forceImageUpdate)
at WinDynamicDesktop.AppContext..ctor(String[] args)
at WinDynamicDesktop.Program.Main(String[] args)
Steps to reproduce

start windows
See error.

Expected behavior

Screenshots

Environment

OS: Windows 10 2004
App version: 4.2.0
Installed from: Microsoft Store, Installer EXE, Portable ZIP

Additional information

Closing comment (2021-06-08T23:26:03Z): @kelvincht Seems related to #324, could you try the build linked in this comment?
Repository: t1m0thyj/WinDynamicDesktop

Issue #425: Enabling night mode doesn't refresh wallpaper
Created: 2022-04-04T11:26:54Z
5.0.1 fixes scripts 👍
One other thing I found is that enabling night mode doesn't automatically refresh wallpaper and it stays on the current wallpaper so I need to manually refresh wallpaper. I think that before this was done automatically when enabling night mode.
Originally posted by @dlackovic2 in t1m0thyj/WDD-scripts#16 (comment)

Duplicate issue #440: Background still not updating on enabling night mode
Created: 2022-05-13T13:20:30Z
The wallpaper is not updating when enabling night mode and has to be done manually. I have restarted my computer and explorer.exe multiple times and still does not work.

WDD Version: 5.0.1
OS Version: Win 10 Pro

Are you using the Microsoft Store version of WDD?: Yes

Closing comment (2022-05-14T14:58:46Z): Related to #425, this is a bug in WDD and I plan to release an update that fixes it soon.
Repository: t1m0thyj/WinDynamicDesktop

Issue #257: [Feature Request] Give option to make lock screen background dynamic as well
Created: 2020-10-14T16:56:09Z
Is your feature request related to a problem?
Yes, I keep my PC locked very often, and it's really annoying that the lock screen wallpaper is different from the main dyanmic wallpaper that I have. I have tried to set the lock screen background to one stage of the dynamic wallpaper, but it just makes it looks worse and inconsistant.
Describe the solution you'd like
The solution I would like is a small checkbox that can be pressed (either from the dropdown menu or the select theme window), which will set the lock screen background to be dynamic as well. This can be a boolean value in settings.conf as well. I don't know how this would be implemented, but I think it would be easy enough if the registry is being used to change the wallpaper, since I believe there is a registry entry for the lock screen background as well.
Describe alternatives you've considered
I've tried looking into other dynamic wallpaper apps as well, but none that I have seen have had a lock screen functionality. I tried making a script, but it didn't work out.

Duplicate issue #269: Login Screen Wallpaper
Created: 2020-11-10T20:05:11Z
As the title said. I wish WinDynamicDesktop can change the login screen wallpaper too.

Closing comment (2020-11-13T06:06:29Z): Duplicate of #257. There is an experimental script available for WDD that can change lockscreen wallpaper: https://windd.info/scripts/
Repository: t1m0thyj/WinDynamicDesktop

Issue #510: Shuffle theme improvement, make a queue/playlist so all themes get its turn (the same theme does not shuffle twice in the same playlist).
Created: 2023-02-19T07:39:58Z
Done, The issue is when shuffle is enabled. I get the same theme twice without going over all the themes I have.

I want it to act like a music playlist to go over all the playlist without going back to the same theme if not all themes were ser beforehand.

Duplicate issue #608: Random from favorites but different from last
Created: 2024-09-03T01:42:19Z
Random from favorites but different from last. Now it could be the same as last theme.

Closing comment (2024-10-12T12:21:17Z): Related to #510 - WinDD stores "shuffleHistory" in settings.json to keep track of the last theme ID picked, so it should already be picking a theme different from the last one.
Next time this happens, please upload your settings.json file (with location info redacted) that includes the "shuffleHistory" and provide the name of the theme being shown twice.
Repository: t1m0thyj/WinDynamicDesktop

Issue #427: windows/app theme does not referesh the system after switching!
Created: 2022-04-09T13:55:40Z
WDD Version: 5.1
OS Version: 11 lastest

Steps to Reproduce:
1.change light to dark mode
2. pressing start menu shows whitetext on white surface+app that needs to be updated doesnot referesh unless refreshed manuallY!
Are you using the Microsoft Store version of WDD?: No

Duplicate issue #480: ChangeWindowsAppTheme and ChangeWindowsSystemTheme not working with new 22H2 update.
Created: 2022-09-30T06:41:44Z
WDD Version: 5.1.0
OS Version: 22H2

Steps to Reproduce:

enable ChangeWindowsAppTheme and ChangeWindowsSystemTheme.
it does not change taskbar color.

Are you using the Microsoft Store version of WDD?: Yes
I am the same i have the same issues as #337 and #463 and t1m0thyj/WDD-scripts#23
taskbar and other apps not respecting wdd scrip:

i have noticed that if i double toggle the light mode(turning off than on it fixes the issue)

Closing comment (2023-01-03T01:42:07Z): Closing as duplicate of #427
Repository: t1m0thyj/WinDynamicDesktop

Issue #548: Windows lock screen wallpapers can't update automatically. 
Created: 2023-11-25T04:07:47Z
WDD Version:5.3.1
OS Version:WIN10 enterprise LTSC 21h2(19044.3448)

Steps to Reproduce:
Lock screen wallpaper gets stuck and won't update. I've changed the new theme, and the wallpaper displayed on my desktop is correct, but the lock screen wallpaper is still the first WDD wallpaper to be set. I've restarted explorer but it doesn't work
Are you using the Microsoft Store version of WDD?:
:No

Duplicate issue #483: lockscreen wallpaper is not changing on windows 11 22h2
Created: 2022-10-03T15:55:14Z
WDD Version: 5.1.0
OS Version: windows 11 22H2

Steps to Reproduce:

enable change lockscreen wallpaper
lockscreen wallpaper is not changing.

Are you using the Microsoft Store version of WDD?: Yes

Closing comment (2024-10-01T21:56:33Z): @zararashigal This issue is now being tracked in #548. I can't fix the issue until I can reproduce it. To help diagnose the issue, could you gather logs by following the steps in #548 (comment)?
Repository: taiki-e/cargo-llvm-cov

Issue #43: Add an option to merge coverage of generics in the summary
Created: 2021-08-07T10:20:14Z
First, thanks for a very useful tool!
It would be nice if there was an command line option to merge the coverage of different instantiations of generic functions in the summary of the coverge of a file, so that it would show 100% coverage if the tests covered all of a generic function, even if different regions of the function were covered by different instantiations. Consider the following source file:
fn smaller_than_default<T: Default + PartialOrd>(t: T) -> bool {
    if t < T::default() { true }
    else { false }
}

#[test]
fn test_instantiations() {
    assert!(!smaller_than_default(56.4_f32));
    assert!(smaller_than_default(-56_i32));
}
With cargo-llvm-cov 0.1.0-alpha.4, the report will show a region coverage of 88.89% (8/9), even though all regions of the generic function are marked as covered. The current rule seems to be that there needs to be at least one instantiation with 100% coverage for the generic function to be counted as 100% covered. This is probably a good choice for some situations, but sometimes you have a generic function that is difficult to cover completely with a single instantiation and for those cases it would be nice to have an option to merge the coverage of all instantiations when computing the summary.

Duplicate issue #234: Modify output style
Created: 2023-01-03T12:06:54Z
Using the cargo llvm-cov output coverage on my computer showed a large area of -, which looked terrible. This is a sample screenshot:

Closing comment (2023-01-04T14:28:47Z): This is essentially the same issue as #8 (comment).
And it is also related to #43 in that the summary output of llvm-cov is not very configurable.
That said, this is about text summary output, which is relatively simple, so technically, I think both this issue and #43 can be resolved by using JSON output to generate our own summary output. (--show-missing-lines was actually implemented in this way: #143)
Repository: taiki-e/cargo-llvm-cov

Issue #123: Ignore all `#[test]`-related code automatically
Created: 2022-01-07T14:58:41Z
UPDATE3(taiki-e):

If you want to ignore all #[test]-related code, you can use module-level #[coverage(off)] attribute:
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]

#[cfg(test)]
#[cfg_attr(coverage_nightly, coverage(off))]
mod tests {
    // ...
}
cargo-llvm-cov excludes code contained in the directory named tests from the report by default, so you can also use it instead of #[coverage(off)] attribute.

#[coverage(off)] attribute has been stabilized in rust-lang/rust#130766 (will be included in Rust 1.85). UPDATE: stabilization has been reverted in rust-lang/rust#134672.

UPDATE2(taiki-e):
See #123 (comment)

UPDATE(taiki-e):

If you want to ignore all #[test]-related code, consider using coverage-helper crate version 0.2+.
cargo-llvm-cov excludes code contained in the directory named tests from the report by default, so you can also use it instead of coverage-helper crate.

https://github.com/taiki-e/cargo-llvm-cov#exclude-function-from-coverage

AFAIK this is not currently possible (though I would love to be proven wrong), so just filing this as a nice-to-have tracking issue.
What I would like is that only library code counts towards coverage. Having all of the #[test] and #[cfg(test)] code (fn and whole utility modules) count towards coverage metrics right now skews those numbers up quite a bit.
Right now cargo-llvm-cov automatically ignores all the examples and tests code via -ignore-filename-regex but unit test functions are still counted (and possibly doctests once those are being fixed [tentative fix in #122]).

Duplicate issue #428: The std assert macros have a custom message which show as not covered in coverage
Created: 2025-03-18T05:10:44Z
Rusts assert macros have a custom message you can add which show up as missed lines in the coverage.
(I searched through issues and didn't find any previous mention, if I missed it feel free to close this.)
Now I don't think they should show up in the coverage at all and the entire test module should be ignored for coverage? Perhaps there are other views on this?
The docs talk about ignoring code via the [#[coverage(off)] attribute][rust-lang/rust#84605] attribute. I would have to include this for every test block. Perhaps tests should be ignored by default?
https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#exclude-code-from-coverage

Closing comment (2025-03-18T12:54:36Z): Macro issue is a duplicate of #243.

Now I don't think they should show up in the coverage at all and the entire test module should be ignored for coverage? Perhaps there are other views on this?

This has been an established opinion for years and is tracked in #123.
Unfortunately, without the help of a compiler, AFAIK there are only three options: separate the file (as described in the readme), exclude it on the user side by using attribute (as described in the readme), or scan all code (slow and fragile).
Repository: taiki-e/cargo-llvm-cov

Issue #292: Cleanup profraw files + `--no-clean`
Created: 2023-07-16T19:40:12Z
I really like the --no-clean flag since it makes incremental re-run of tests much faster. However, it eventually gets slower and slower since there are tons of profraw files generated.
In practice, I found that running rm -f target/llvm-cov-target/*.profraw before a llvm-cov run with --no-clean flag has the best of both world: the target/llvm-cov-target won't blow up in size, and we still get all the incremental runs' benefit.
Could this be added as a builtin flag so I don't have to write a custom script to do this?

Duplicate issue #381: Less aggressive clean
Created: 2024-08-07T23:00:47Z
Is there a way now to keep the artifacts that Cargo would produce, but remove everything else (e.g., profraw files)?

  
    
      cargo-llvm-cov/src/clean.rs
    
    
        Lines 40 to 47
      in
      7d4bb5e
    
  
  
    

        
          
           // TODO: remove need for this. 
        

        
          
           // If --no-clean, --no-run, or --no-report is used: do not remove artifacts 
        

        
          
           // Otherwise, remove the followings to avoid false positives/false negatives: 
        

        
          
           // - build artifacts of crates to be measured for coverage 
        

        
          
           // - profdata 
        

        
          
           // - profraw 
        

        
          
           // - doctest bins 
        

        
          
           // - old reports 
        
    
  


My goal is to run cargo-llvm-cov multiple times and not be slowed down by recompilations, but also not have "false positive" reports from previous runs.
If there is no way to do this currently, would you be open to adding such a feature?

Closing comment (2024-08-08T09:19:03Z): Duplicate of #292

Ooh, sorry.
Repository: taiki-e/cargo-llvm-cov

Issue #254: Improve clarity in docs around use of no_coverage and toolchain on Windows
Created: 2023-04-09T00:11:30Z
Hey there, thanks so much for your incredible work on this tool.
Just noticed two things as a new user of this tool on Windows:

I couldn't clearly see in the README that the tool is only supported on MSVC on Windows, I couldn't get it working on the GNU toolchain
I understand that no_coverage is an unstable feature, but perhaps it should be stated that it will only work on nightly Rust and be ignored on the stable channel

And as two follow-ups to these points:

Is it possible to get this tool working on the GNU toolchain for Windows?
Is there a way to specify no_coverage on stable Rust?  The tool itself works perfectly on stable Rust but the no_coverage attribute is simply ignored and not taken into account

Thanks heaps
Fotis

Duplicate issue #273: #[coverage_helper::test] is not working with #[tokio::test]
Created: 2023-05-05T14:46:24Z
Hey there, I have the problem that my tests are also getting tested. So my test coverage is never gonna reach 100%.
How can I ignore the tests getting tested?
Note:
I use cargo llvm-cov nextest --open
the coverage_helper doesnt seem to work for me

Closing comment (2023-05-05T14:57:11Z): dup of #254. no_coverage require nightly as feature() implied.
Repository: taiki-e/cargo-llvm-cov

Issue #282: Missing lines on async functions with tracing::instrument macro
Created: 2023-05-23T04:02:19Z
I noticed that some of my functions are missing line information when they're processed with the tracing::instrument macro. When I look at the HTML report, the source code is there of course, but most of the lines are neither detected as covered nor uncovered.
As soon as I remove the macro, they're detected properly again. I understand macros are always tricky to handle, and I wonder whether this is something that's better reported on the tracing repo's issue tracker?
For now, I can work around it as follows:
#[cfg_attr(not(coverage), instrument(skip_all, level = "trace"))]
async fn something() {}

Duplicate issue #402: Incorrect code coverage data for function marked with tracing::instrument
Created: 2024-12-10T22:01:38Z
See repo with reproducible issue here: https://github.com/asvrada/demo_cov_tracing
See more detail of issue in readme from above link

Closing comment (2024-12-10T22:09:43Z): Closed as there is duplicate: #282