Skip to content

Add CI - #31

Merged
rocky merged 2 commits into
mainfrom
ci
Aug 20, 2026
Merged

Add CI#31
rocky merged 2 commits into
mainfrom
ci

Conversation

@skr4n

@skr4n skr4n commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Upstream is yet to add vendoring support for libcdio-sys.
This therefore fetches it from a fork.

Do not merge.

libcdio-sys is temporarily fetched from git, till release.

@skr4n
skr4n force-pushed the ci branch 2 times, most recently from 197e2f8 to b23f5cf Compare August 13, 2026 10:25
@skr4n
skr4n force-pushed the ci branch 2 times, most recently from 8b7c917 to 38df243 Compare August 13, 2026 11:05
Base automatically changed from platybugs-2 to main August 13, 2026 14:30
@skr4n
skr4n force-pushed the ci branch 2 times, most recently from 1d887f5 to 8513c88 Compare August 14, 2026 11:20
@rocky

rocky commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

For what it is worth, I tried this branch on MSYS2 and FreeBSD, and the compile problems I was having are now gone.

For MSYS2 cargo build there is some weirdness about how MSYS2's git package works. Apparently this is a common problem and you have to do something to work around SSL2 verification.

Running gave me a UDF test failure:

$ cargo test -- --include-ignored
...
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests\iso-info.rs (target\debug\deps\iso_info-83a2970b562b84ca.exe)

running 7 tests
test joliet_metadata ... ok
test rock_metadata ... ok
test xa_metadata ... ok
test rock_contents ... ok
test joliet_contents ... ok
test udf ... FAILED
test xa_contents ... ok

failures:

---- udf stdout ----

thread 'udf' (7484) panicked at libcdio-cli\tests\iso-info.rs:157:10:
Unexpected stdout, failed diff original var
├── original: /:
│     dr-xr-xr-x 4294967295 4294967295   1       100 Feb 20 2014 01:26:20 .
│     -r-xr-xr-x 4294967295 4294967295   1        10 Feb 20 2014 01:25:12 FéжΘvrier

├── diff:
│   ---         orig
│   +++         var
│   @@ -2,2 +2,2 @@
│   -  dr-xr-xr-x 4294967295 4294967295   1       100 Feb 20 2014 01:26:20 .
│   -  -r-xr-xr-x 4294967295 4294967295   1        10 Feb 20 2014 01:25:12 FéжΘvrier
│   +  dr-xr-xr-x 4294967295 4294967295   1       100 Feb 19 2014 21:26:20 .
│   +  -r-xr-xr-x 4294967295 4294967295   1        10 Feb 19 2014 21:25:12 FéжΘvrier
└── var as str: /:
      dr-xr-xr-x 4294967295 4294967295   1       100 Feb 19 2014 21:26:20 .
      -r-xr-xr-x 4294967295 4294967295   1        10 Feb 19 2014 21:25:12 FéжΘvrier


command=`"C:\\msys64\\tmp`\libcdio\\cdio-rust\\target\\debug\\iso-info-rs.exe" "-U" "../test-data/udf.iso"`
code=0
stdout=```
/:
  dr-xr-xr-x 4294967295 4294967295   1       100 Feb 19 2014 21:26:20 .
  -r-xr-xr-x 4294967295 4294967295   1        10 Feb 19 2014 21:25:12 FéжΘvrier

stderr=""

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    udf

test result: FAILED. 6 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

error: test failed, to rerun pass `-p libcdio-cli --test iso-info`

@skr4n

skr4n commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator Author

This is rather strange.
The timestamps seem to not match up.
The test expects a UTC timestamp, but got a UTC-4 timestamp (which should be your local one).

This line sets the TZ env variable for the test to use UTC.
It seems to have worked for the other tests but not for this one.

Could you run it again to rule out any race condition of sort.

If that still fails, show the outputs of:

cdio-rust$ cargo run --bin iso-info-rs -- -U test-data/udf.iso 

and (with the env)

cdio-rust$ TZ=UTC cargo run --bin iso-info-rs -- -U test-data/udf.iso 

and (with udf1.iso)

cdio-rust$ cargo run --bin iso-info-rs -- -U test-data/udf.iso 

And lastly try commenting that TZ UTC line in the test and see if that changes anything.

@skr4n
skr4n marked this pull request as ready for review August 18, 2026 04:19
@rocky

rocky commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This is rather strange. The timestamps seem to not match up. The test expects a UTC timestamp, but got a UTC-4 timestamp (which should be your local one).

This line sets the TZ env variable for the test to use UTC. It seems to have worked for the other tests but not for this one.

Could you run it again to rule out any race condition of sort.

If that still fails, show the outputs of:

cdio-rust$ cargo run --bin iso-info-rs -- -U test-data/udf.iso 

and (with the env)

cdio-rust$ TZ=UTC cargo run --bin iso-info-rs -- -U test-data/udf.iso 

and (with udf1.iso)

cdio-rust$ cargo run --bin iso-info-rs -- -U test-data/udf.iso 

And lastly try commenting that TZ UTC line in the test and see if that changes anything.

I've now run cargo clean and cargo run on Ubuntu (rather than MSYS2), and I get the same kinds of failures.

I also tried commenting out all of the TZ=UTC lines in iso-info.rs (and then cargo clean && cargo build) and I get the same output as I do with those lines in there.

I am seeing time differences depending on how TZ is set in the environment on the command line.

So right now it appears as those setting TZ=UTC inside iso-info.rs is not having any effecrt.

Here are some logs:

iso-info-test.log

@skr4n

skr4n commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

I also tried commenting out all of the TZ=UTC lines in iso-info.rs (and then cargo clean && cargo build) and I get the same output as I do with those lines in there.

Those lines set the env for the tests (which are run with cargo test) not for the binary (which is run with cargo run).

Just to clarify:

  • The tests execute libcdio-cli/tests/iso-info.rs (which you've edited).
  • cargo run --bin <name> executes libcdio-cli/src/<name>/main.rs.
    Therefore, editing the former doesn't affect the latter in any way.

Anyway, could you add the output of the tests, by running:
cargo test --all-features

@skr4n

skr4n commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

This can be merged, as it doesn't have anything to do with the time issues.

@rocky

rocky commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

I also tried commenting out all of the TZ=UTC lines in iso-info.rs (and then cargo clean && cargo build) and I get the same output as I do with those lines in there.

Those lines set the env for the tests (which are run with cargo test) not for the binary (which is run with cargo run).

Just to clarify:

  • The tests execute libcdio-cli/tests/iso-info.rs (which you've edited).
  • cargo run --bin <name> executes libcdio-cli/src/<name>/main.rs.
    Therefore, editing the former doesn't affect the latter in any way.

Anyway, could you add the output of the tests, by running: cargo test --all-features

Issue #31 added to track this.

@rocky

rocky commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

How do I debug this?

I tried:

$ cargo test --no-run -- --include-ignored
   Compiling libcdio-sys v3.0.0+2.4.0p2.0.2 (https://github.com/libcdio/libcdio-sys.git?rev=a232be6#a232be6d)
   Compiling libcdio-rs v0.1.0 (/src/external-vcs/github/libcdio/cdio-rust/libcdio-rs)
   Compiling libcdio-cli v0.1.0 (/src/external-vcs/github/libcdio/cdio-rust/libcdio-cli)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 19.77s
  Executable unittests src/lib.rs (target/debug/deps/libcdio_cli-241b4b888a471160)
  Executable unittests src/cd-drive/main.rs (target/debug/deps/cd_drive_rs-61f3627241168675)
  Executable unittests src/iso-info/main.rs (target/debug/deps/iso_info_rs-5bca6be39a81abf1)
  Executable unittests src/iso-read/main.rs (target/debug/deps/iso_read_rs-24a44f54d0cd052f)
  Executable unittests src/mmc-tool/main.rs (target/debug/deps/mmc_tool_rs-7c1f9f400758a255)
  Executable tests/iso-info.rs (target/debug/deps/iso_info-2f10ac63a17ef097)
  Executable tests/iso-read.rs (target/debug/deps/iso_read-e8c6a1108175173b)
  Executable unittests src/lib.rs (target/debug/deps/libcdio_rs-18fabf07fde7e217)
  Executable tests/media_removal.rs (target/debug/deps/media_removal-4243b65b0295e550)
$  rust-gdb ./target/debug/deps/iso_info_rs-5bca6be39a81abf1
GNU gdb (Ubuntu 15.1-1ubuntu1~24.04.1) 15.1
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Reading symbols from ./target/debug/deps/iso_info_rs-5bca6be39a81abf1...
(gdb) break main
Breakpoint 1 at 0x32fa0
(gdb) break print_iso9660_metadata
Function "print_iso9660_metadata" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (print_iso9660_metadata) pending.
(gdb) run iso --include-ignored --show-output
Starting program: /src/external-vcs/github/libcdio/cdio-rust/target/debug/deps/iso_info_rs-5bca6be39a81abf1 iso --include-ignored --show-output
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, 0x0000555555586fa0 in main ()
(gdb) c
Continuing.

running 0 tests

successes:

successes:

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

[Inferior 1 (process 552582) exited normally]
(gdb) 

@rocky

rocky commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

I think README.md needs to be updated to remove the information about setting LIBCDIO environment variables, right?

@skr4n

skr4n commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

I think README.md needs to be updated to remove the information about setting LIBCDIO environment variables, right?

Yes.
I will be revising the README all at once.

@rocky
rocky merged commit 0dc9a49 into main Aug 20, 2026
3 checks passed
@skr4n
skr4n deleted the ci branch August 20, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants