Mailing List Archive

Fwd: Running vtest against master branch
Hello,

I am trying to run VTest against Varnish Cache master branch.

Here are my steps:


set VARNISH_FOLDER "/home/ubuntu/git/varnish"
set VARNISH_CACHE "varnish-cache"
set VARNISH_CACHE_BUILD "$VARNISH_FOLDER/varnish-cache-build"

git clone https://github.com/varnishcache/$VARNISH_CACHE.git
./autogen.sh
./configure --with-unwind --enable-developer-warnings
--enable-debugging-symbols --disable-stack-protector
--with-persistent-storage --enable-asan --enable-ubsan
--prefix=$VARNISH_CACHE_BUILD
make
make install
cd ..

git clone https://github.com/VTest/VTest.git vtest
cd vtest
env VARNISH_SRC="$VARNISH_FOLDER/varnish-cache" make varnishtest

but here it fails with:

cc \
-O2 -s -Wall -Werror \
-o varnishtest \
-DVTEST_WITH_VTC_VARNISH \
-DVTEST_WITH_VTC_LOGEXPECT \
-Isrc -Ilib -I/usr/local/include -pthread \
-I/home/ubuntu/git/varnish/varnish-cache/include \
src/*.c lib/*.c \
-L/usr/local/lib -lm -lpcre -lz \
-L/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-Wl,--rpath,/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-lvarnishapi
src/vtc_main.c: In function ‘cleaner_setup’:
src/vtc_main.c:232:3: error: ignoring return value of ‘nice’, declared with
attribute warn_unused_result [-Werror=unused-result]
(void)nice(1); /* Not important */
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:51: recipe for target 'varnishtest' failed
make: *** [varnishtest] Error 1

To be able to overcome this I had to change FLAGS:

diff --git Makefile Makefile
index 996686f..c3ba32a 100644
--- Makefile
+++ Makefile
@@ -18,7 +18,7 @@ DEPS= ${SRCS} \
src/teken_state.h \
src/vtc_h2_dectbl.h

-FLAGS= -O2 -s -Wall -Werror
+FLAGS ?= -O2 -s -Wall -Werror

INCS= -Isrc \
-Ilib \


and issue:

env FLAGS="-O2 -s -Wall"
VARNISH_SRC="/home/ubuntu/git/varnish/varnish-cache" make varnishtest


but now the outcome is:

cc \
-O2 -s -Wall \
-o varnishtest \
-DVTEST_WITH_VTC_VARNISH \
-DVTEST_WITH_VTC_LOGEXPECT \
-Isrc -Ilib -I/usr/local/include -pthread \
-I/home/ubuntu/git/varnish/varnish-cache/include \
src/*.c lib/*.c \
-L/usr/local/lib -lm -lpcre -lz \
-L/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-Wl,--rpath,/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-lvarnishapi
src/vtc_main.c: In function ‘cleaner_setup’:
src/vtc_main.c:232:3: warning: ignoring return value of ‘nice’, declared
with attribute warn_unused_result [-Wunused-result]
(void)nice(1); /* Not important */
^~~~~~~~~~~~~
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tmpnam' is
dangerous, better use `mkstemp'
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tempnam' is
dangerous, better use `mkstemp'
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tmpnam_r' is
dangerous, better use `mkstemp'

No tests are executed.
As you might have noticed I test on aarch64 architecture.

Do I need to do something more ?


Regards,
Martin
Fwd: Running vtest against master branch [ In reply to ]
Hello,

I am trying to run VTest against Varnish Cache master branch.

Here are my steps:


set VARNISH_FOLDER "/home/ubuntu/git/varnish"
set VARNISH_CACHE "varnish-cache"
set VARNISH_CACHE_BUILD "$VARNISH_FOLDER/varnish-cache-build"

git clone https://github.com/varnishcache/$VARNISH_CACHE.git
./autogen.sh
./configure --with-unwind --enable-developer-warnings
--enable-debugging-symbols --disable-stack-protector
--with-persistent-storage --enable-asan --enable-ubsan
--prefix=$VARNISH_CACHE_BUILD
make
make install
cd ..

git clone https://github.com/VTest/VTest.git vtest
cd vtest
env VARNISH_SRC="$VARNISH_FOLDER/varnish-cache" make varnishtest

but here it fails with:

cc \
-O2 -s -Wall -Werror \
-o varnishtest \
-DVTEST_WITH_VTC_VARNISH \
-DVTEST_WITH_VTC_LOGEXPECT \
-Isrc -Ilib -I/usr/local/include -pthread \
-I/home/ubuntu/git/varnish/varnish-cache/include \
src/*.c lib/*.c \
-L/usr/local/lib -lm -lpcre -lz \
-L/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-Wl,--rpath,/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-lvarnishapi
src/vtc_main.c: In function ‘cleaner_setup’:
src/vtc_main.c:232:3: error: ignoring return value of ‘nice’, declared with
attribute warn_unused_result [-Werror=unused-result]
(void)nice(1); /* Not important */
^~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:51: recipe for target 'varnishtest' failed
make: *** [varnishtest] Error 1

To be able to overcome this I had to change FLAGS:

diff --git Makefile Makefile
index 996686f..c3ba32a 100644
--- Makefile
+++ Makefile
@@ -18,7 +18,7 @@ DEPS= ${SRCS} \
src/teken_state.h \
src/vtc_h2_dectbl.h

-FLAGS= -O2 -s -Wall -Werror
+FLAGS ?= -O2 -s -Wall -Werror

INCS= -Isrc \
-Ilib \


and issue:

env FLAGS="-O2 -s -Wall"
VARNISH_SRC="/home/ubuntu/git/varnish/varnish-cache" make varnishtest


but now the outcome is:

cc \
-O2 -s -Wall \
-o varnishtest \
-DVTEST_WITH_VTC_VARNISH \
-DVTEST_WITH_VTC_LOGEXPECT \
-Isrc -Ilib -I/usr/local/include -pthread \
-I/home/ubuntu/git/varnish/varnish-cache/include \
src/*.c lib/*.c \
-L/usr/local/lib -lm -lpcre -lz \
-L/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-Wl,--rpath,/home/ubuntu/git/varnish/varnish-cache/lib/libvarnishapi/.libs \
-lvarnishapi
src/vtc_main.c: In function ‘cleaner_setup’:
src/vtc_main.c:232:3: warning: ignoring return value of ‘nice’, declared
with attribute warn_unused_result [-Wunused-result]
(void)nice(1); /* Not important */
^~~~~~~~~~~~~
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tmpnam' is
dangerous, better use `mkstemp'
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tempnam' is
dangerous, better use `mkstemp'
//usr/lib/aarch64-linux-gnu/libasan.so.4: warning: the use of `tmpnam_r' is
dangerous, better use `mkstemp'

No tests are executed.
As you might have noticed I test on aarch64 architecture.

Do I need to do something more ?


Regards,
Martin
Re: Fwd: Running vtest against master branch [ In reply to ]
Hi,

On 30/01/2020 12:13, Martin Grigorov wrote:
> Hello,
>
> I am trying to run VTest against Varnish Cache master branch.

As of now, vtest is bundled in varnish-cache as varnishtest.

I made a previous attempt to make varnish-cache use vtest, but that was not
accepted at the time: https://github.com/varnishcache/varnish-cache/pull/2838

Nils
Re: Fwd: Running vtest against master branch [ In reply to ]
Hi,

On Thu, Jan 30, 2020 at 2:49 PM Nils Goroll <slink@schokola.de> wrote:

> Hi,
>
> On 30/01/2020 12:13, Martin Grigorov wrote:
>
> Hello,
>
> I am trying to run VTest against Varnish Cache master branch.
>
> As of now, vtest is bundled in varnish-cache as varnishtest.
>
> I made a previous attempt to make varnish-cache use vtest, but that was
> not accepted at the time:
> https://github.com/varnishcache/varnish-cache/pull/2838
>
Thanks for the answer!

What is the proper way to run the tests ?
I see a folder "bin/varnishtest/". There is a Makefile there but I don't
see the goal that runs the tests.
I've also found "tools/vtest.sh" but it clones varnish-cache, generates SSH
key pair and asks me to send the public key to PHK. It seems this script is
intended for the dev team.


> Nils
>
Re: Fwd: Running vtest against master branch [ In reply to ]
On Thu, Jan 30, 2020 at 3:26 PM Martin Grigorov <martin.grigorov@gmail.com>
wrote:

> Hi,
>
> On Thu, Jan 30, 2020 at 2:49 PM Nils Goroll <slink@schokola.de> wrote:
>
>> Hi,
>>
>> On 30/01/2020 12:13, Martin Grigorov wrote:
>>
>> Hello,
>>
>> I am trying to run VTest against Varnish Cache master branch.
>>
>> As of now, vtest is bundled in varnish-cache as varnishtest.
>>
>> I made a previous attempt to make varnish-cache use vtest, but that was
>> not accepted at the time:
>> https://github.com/varnishcache/varnish-cache/pull/2838
>>
> Thanks for the answer!
>
> What is the proper way to run the tests ?
> I see a folder "bin/varnishtest/". There is a Makefile there but I don't
> see the goal that runs the tests.
>

"make check" maybe ?!
but it leads to such output here:

FAIL: tests/a00000.vtc
SKIP: tests/a00001.vtc
SKIP: tests/a00002.vtc
SKIP: tests/a00003.vtc
SKIP: tests/a00004.vtc
....


> I've also found "tools/vtest.sh" but it clones varnish-cache, generates
> SSH key pair and asks me to send the public key to PHK. It seems this
> script is intended for the dev team.
>
>
>> Nils
>>
>
Re: Fwd: Running vtest against master branch [ In reply to ]
On 30/01/2020 14:27, Martin Grigorov wrote:
>
> "make check" maybe ?!

Yes

You can also call varnishtest directly, for example

    cd bin/varnishtest

    ./varnishtest -i -j 50 tests/*.vtc

-i instructs varnishtest to use the varnish binaries from the build tree.

FAIL: tests/a00000.vtc
SKIP: tests/a00001.vtc
SKIP: tests/a00002.vtc
SKIP: tests/a00003.vtc
SKIP: tests/a00004.vtc

This would be an indication that your varnishtest does not work in the first
place. The .log files should tell you more

Nils

_______________________________________________
varnish-dev mailing list
varnish-dev@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev