Bug 5594 - "make test" before "make install" fails
Summary: "make test" before "make install" fails
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.2.0
Hardware: x86 Linux
: P3 major
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-07 09:23 UTC by David Eisner
Modified: 2009-05-17 17:53 UTC (History)
1 user (show)

See Also:


Attachments
fix from v3-2-test (2.13 KB, patch)
2008-07-14 17:39 UTC, Michael Adam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Eisner 2008-07-07 09:23:13 UTC
With Samba 3.0.x, I would:

1. configure
2. make
3. make test
4. make install (if all went well)

When I do a 'make test' with Samba 3.2.0, though, I eventually run
into problems like this:

RUNNING TESTS testparm_s3
Testing netbios name (0)
TEST OUTPUT:
Load smb config files from
/home/david/build/samba-3.2.0/source/st/lib/smb.conf.tmp
params.c:Parameter() - Ignoring badly formed line in configuration file: netbios
map_file: Failed to load /usr/local/samba/samba-3.2.0/lib/valid.dat -
No such file or directory
creating default valid table
Loaded services file OK.
ERROR: lock directory /usr/local/samba/samba-3.2.0/var/locks does not exist
ERROR: pid directory /usr/local/samba/samba-3.2.0/var/locks does not exist

So it's no longer possible to do a make test in-place before installing the binary.

Michael Adam posted this to the samba mailing list in response to my report:

---8<---
Oh, thanks for reporting.
Metze has also pointed this one out to me.

As you noted, it will work without complaints when you
do "make install" before "make test".

It is a bug and I am going to fix it.

The problem is that these new testparm_s3 tests call the testparm
binary, which uses the compiled in defaults for lock dir and so
on to set up locking and logging and so on. I did not notice
these problems in time since I only ran make test from a build
dir where I had previously done make install.

If you care, you might open a bugzilla entry (assigned to
obnox@samba.org) or/and of course provide a patch.

The plan would be to extend testparm so that one can completely
bypass the lockdir etc from compiled in defaults.
Or rewrite the testparm_s3 tests in C to not call testparm...

I need to think about that....

Cheers - Michael
--->8---
Comment 1 Michael Adam 2008-07-07 10:09:08 UTC
Hi David,
thanks for reporting.
Michael
Comment 2 Michael Adam 2008-07-14 17:39:51 UTC
Created attachment 3407 [details]
fix from v3-2-test

I have fixed this in v3-2-test (and v3-3-test)
by adding a --skip-global-checks parameter to testparm
and using it in the test scripts.

Please try the attached patch against the 3.2.0 tarball.

Michael
Comment 3 David Eisner 2008-07-22 09:20:02 UTC
The first part of the patch (for test_testparm_s3.sh) applied correctly, but it wasn't happy with the testparm.c patch (this against the 3.2.0 tarball).  I was able to apply it manually, though, and on first blush it seems to have fixed the problem.  Now I need to figure out why smbd is crashing ...

Thanks.
Comment 4 Michael Adam 2009-05-17 17:53:12 UTC
This is fixed.
Closing the bug report...
Please reopen if problem reoccurs.

Michael