zsh-workers
 help / color / mirror / code / Atom feed
* Test Fails While Compiling
@ 2017-03-15 17:22 shoober420
  2017-03-15 18:50 ` Sebastian Gniazdowski
  0 siblings, 1 reply; 2+ messages in thread
From: shoober420 @ 2017-03-15 17:22 UTC (permalink / raw)
  To: zsh-workers

The test for gdbm fails when trying to compile the latest development
tree. I have gdbm installed and its version is 1.13. Here is the error
message.

./V11db_gdbm.ztst: starting.
Test ./V11db_gdbm.ztst failed: bad status 1, expected 0 from:
 ztie -d db/gdbm -f $dbfile dbase
 dbase=( a b c d )
 zuntie dbase
 ztie -d db/gdbm -f $dbfile dbase
 result=( "${(kv)dbase[@]}" )
 print -rl -- "${(o)result[@]}"
 zuntie dbase
Error output:
(eval):ztie:1: error opening database file db.gdbm
(eval):zuntie:3: not a tied gdbm hash: dbase
(eval):ztie:4: error opening database file db.gdbm
(eval):zuntie:7: cannot untie dbase
Was testing: replace hash / database, scan
./V11db_gdbm.ztst: test failed.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Test Fails While Compiling
  2017-03-15 17:22 Test Fails While Compiling shoober420
@ 2017-03-15 18:50 ` Sebastian Gniazdowski
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Gniazdowski @ 2017-03-15 18:50 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

Can you try with attached patch?

It uses `gdbm_strerror(gdbm_errno)`, we would see exact error reason.

-- 
  Sebastian Gniazdowski
  psprint3@fastmail.com

[-- Attachment #2: gdbm_errno.diff --]
[-- Type: text/plain, Size: 514 bytes --]

diff --git a/Src/Modules/db_gdbm.c b/Src/Modules/db_gdbm.c
index 596a8ae..f812360 100644
--- a/Src/Modules/db_gdbm.c
+++ b/Src/Modules/db_gdbm.c
@@ -159,7 +159,7 @@ bin_ztie(char *nam, char **args, Options ops, UNUSED(int func))
 	addmodulefd(gdbm_fdesc(dbf), FDT_MODULE);
         append_tied_name(pmname);
     } else {
-	zwarnnam(nam, "error opening database file %s", resource_name);
+	zwarnnam(nam, "error opening database file %s (error: %s)", resource_name, gdbm_strerror(gdbm_errno));
 	return 1;
     }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-15 18:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-15 17:22 Test Fails While Compiling shoober420
2017-03-15 18:50 ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).