Skip to content

Commit

Permalink
Merge pull request #271 from lsof-org/fix-freebsd-tests
Browse files Browse the repository at this point in the history
Fix freebsd tests
  • Loading branch information
jiegec authored Jan 16, 2023
2 parents 0298955 + 205ebef commit 229f41a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ case $LSOF_TGT in # {

freebsd)
LSOF_FBSD_ZFS=0
LSOF_TSTKMEM=0
if test "X$LSOF_CC" = "X" # {
then
LSOF_CC=cc
Expand Down
2 changes: 1 addition & 1 deletion tests/LTbasic.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ tstlsof(texec, tkmem, tproc)
*/
if (!devp || !inop)
break;
if ((cem = ConvLsofDev(devp->v, &lsofdc))) {
if ((cem = ConvLsofDev(devp->v, &tmpdc))) {
if (pem)
(void) PrtMsg(pem, Pn);
pem = cem;
Expand Down
1 change: 0 additions & 1 deletion tests/LTlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ static char copyright[] =
# if defined(LT_DEV64)
#undef X2DEV_T
#define X2DEV_T unsigned long long
#define major_X(dp, em) ((int)((x2dev(dp, em) >> 32) & 0xffffffff))
# endif /* defined(LT_DEV64) */
#endif /* defined(LT_DIAL_freebsd) */

Expand Down
4 changes: 4 additions & 0 deletions tests/LTnlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ main(argc, argv)
Pn);
do_unlink = 0;
}
#if defined(LT_DIAL_freebsd)
// See https://github.com/lsof-org/lsof/issues/264, unlinked files are not found by lsof
do_unlink = 0;
#endif
/*
* Find the test file.
*/
Expand Down
1 change: 1 addition & 0 deletions tests/LsofTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#undef USE_LSOF_C_OPT
# endif /* defined(LT_DIAL_freebsd) */


Expand Down
3 changes: 3 additions & 0 deletions tests/TestDB
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ LT_BIGF LT_CC LT_DIAL_uw LT_KMEM LT_VERS=70101
LT_BIGF LT_CC LT_DIAL_uw LT_KMEM LT_VERS=70103
LT_BIGF LT_CC LT_DIAL_uw LT_KMEM LT_VERS=70104
LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_KMEM LT_VERS=13000
LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_VERS=12000
LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_VERS=13000
LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_VERS=14000
LT_BIGF LT_CC LT_DIAL_linux LT_VERS=50009 _FILE_OFFSET_BITS=64
LT_BIGF LT_CC LT_DIAL_linux LT_VERS=60005 _FILE_OFFSET_BITS=64
LT_CC LT_DIAL_darwin LT_VERS=1900
Expand Down

0 comments on commit 229f41a

Please sign in to comment.