ElektraInitiative / go-elektra-archive

Go bindings for Elektra
https://libelektra.org
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Tests failing due to missing mountpoints #17

Closed tmakar closed 1 year ago

tmakar commented 1 year ago

Steps to reproduce

Precondition

I have installed elektra and the newest go version.

  1. Run go build ./kdb
  2. Run go test ./kdb
  3. Then I get the error below.

--- FAIL: TestOpen (0.00s)
    kdb_test.go:17: kdb.Open() failed: C01200 Installation - Some mountpoints couldn't be parsed. See warnings for details.
--- FAIL: TestSet (0.00s)
    kdb_test.go:26: kdb.Open() failed: C01200 Installation - Some mountpoints couldn't be parsed. See warnings for details.
--- FAIL: TestRemoveKey (0.00s)
    kdb_test.go:47: could not open KDB: C01200 Installation - Some mountpoints couldn't be parsed. See warnings for details.
--- FAIL: TestConflict (0.01s)
    kdb_test.go:129: expected conflict err: C01320 Interface - NULL pointer passed for handle
--- FAIL: TestVersion (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0xa8 pc=0x102383f9c]

This error message is not really helpful Some mountpoints couldn't be parsed. See warnings for details. as no warnings or details have been provided. This makes it hard to identify the issue of this problem. What mountpoints failed? Where I can find them? etc.

May @flo91 or @kodebach can help me here.

Additional information

macOS (arm64) go-version: 1.20.2 kdb-version: 0.9.11

kodebach commented 1 year ago

Just a guess, but since the issue says 0.9.11, did you maybe update to 0.9.12 and then downgrade to 0.9.12? There is a big breaking change between 0.9.11 and 0.9.12 that changes how mountpoints work.

Could you try with the new 0.9.12 again?

tmakar commented 1 year ago

Just a guess, but since the issue says 0.9.11, did you maybe update to 0.9.12 and then downgrade to 0.9.12? There is a big breaking change between 0.9.11 and 0.9.12 that changes how mountpoints work.

Could you try with the new 0.9.12 again?

Thanks for the quick reply. Yes, this could be an issue as I updated 2 days ago and now installed it via homebrew. I will check this.

tmakar commented 1 year ago

Now, when I run kdb --version I get errors that I didn't specify a backend for my existing mountpoints. How can I specify the correct backend?

kodebach commented 1 year ago

It's the same issue, your trying to run kdb against an incompatible set of mountpoints. If you don't have anything important stored in Elektra, you can just delete /etc/kdb/elektra.ecf (not sure that path is correct for macOS). However, *this deletes () all data from Elektra** so be careful.

(*) technically just hides it, if you make a backup of elektra.ecf you could restore it.

tmakar commented 1 year ago

This now works, thank you @kodebach!