[tor-dev] Stegotorus - google unit tests
vmon at riseup.net
vmon at riseup.net
Tue Mar 25 10:34:30 UTC 2014
Hey Noah,
It seems that you successfully compiled Stegotorus, congratulation! ;)
Although, you still have problem with compiling the unit tests in google
framework, they are not essential in solving your challenge. I recommend
that you start working on your challenge now.
Per Google's recommendation, I've included the google unit test code
inside the code, so that g_unittests_LDFLAGS probably won't help
(because you are linking to the object file directly). You might want to
download the google frame work and try to compile it independently
without the stegotorus headache:
https://googletest.googlecode.com/files/gtest-1.7.0.zip
Keep the good work going!
vmon
Noah Rahman <selimthegrim at gmail.com> writes:
> after fixing the local branch and having to remove -Werror by hand
> from the makefile yet again...maybe I am missing something else in the
> unit tests? I checked git branch -v and it now matches the tor-improve
> on remote/tor-improve
>
> selimthegrim at Rimsky-Korsakoffee:~/stegotorus$ make -j2
> make all-am
> make[1]: Entering directory `/home/selimthegrim/stegotorus'
> depbase=`echo src/steg/payload_scraper.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/steg/payload_scraper.o -MD -MP -MF $depbase.Tpo -c
> -o src/steg/payload_scraper.o src/steg/payload_scraper.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> /bin/bash ./src/genmodtable.sh protolist.cc src/protocol/chop.cc
> src/protocol/chop_blk.cc src/protocol/null.cc
> protolist.cc is unchanged
> touch stamp-protolist
> /bin/bash ./src/genmodtable.sh steglist.cc src/steg/b64cookies.cc
> src/steg/cookies.cc src/steg/embed.cc src/steg/http.cc
> src/steg/http_apache.cc src/steg/http_steg_mods/file_steg.cc
> src/steg/http_steg_mods/pdfSteg.cc src/steg/http_steg_mods/swfSteg.cc
> src/steg/http_steg_mods/jsSteg.cc src/steg/http_steg_mods/jpgSteg.cc
> src/steg/http_steg_mods/pngSteg.cc src/steg/http_steg_mods/gifSteg.cc
> src/steg/nosteg.cc src/steg/nosteg_rr.cc src/steg/payload_server.cc
> src/steg/trace_payload_server.cc src/steg/payload_scraper.cc
> src/steg/apache_payload_server.cc
> steglist.cc is unchanged
> touch stamp-steglist
> depbase=`echo src/pgen_fake.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/pgen_fake.o -MD -MP -MF $depbase.Tpo -c -o
> src/pgen_fake.o src/pgen_fake.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> /bin/bash ./src/test/genunitgrps.sh unitgrplist.cc
> src/test/unittest_base64.cc src/test/unittest_compression.cc
> src/test/unittest_crypt.cc src/test/unittest_pdfsteg.cc
> src/test/unittest_socks.cc
> touch stamp-unitgrplist
> depbase=`echo src/test/tltester.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
> `;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/tltester.o -MD -MP -MF $depbase.Tpo -c -o
> src/test/tltester.o src/test/tltester.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/webpage_tester.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/webpage_tester.o -MD -MP -MF $depbase.Tpo -c -
> o src/test/webpage_tester.o src/test/webpage_tester.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> src/steg/payload_scraper.cc: In member function ‘int
> PayloadScraper::scrape()’:
> src/steg/payload_scraper.cc:283:49: warning: ignoring return value of
> ‘int system(const char*)’, declared with attribute warn_unused_result
> [-Wunused-result]
> system(ftp_unmount_command_string.c_str());
> ^
> src/steg/payload_scraper.cc:312:49: warning: ignoring return value of
> ‘int system(const char*)’, declared with attribute warn_unused_result
> [-Wunused-result]
> system(ftp_unmount_command_string.c_str());
> ^
> depbase=`echo protolist.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT protolist.o -MD -MP -MF $depbase.Tpo -c -o protolist.o
> protolist.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo steglist.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT steglist.o -MD -MP -MF $depbase.Tpo -c -o steglist.o
> steglist.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o pgen_fake src/pgen_fake.o src/util.o
> src/rng.o src/base64.o -lcrypto
> depbase=`echo src/test/tinytest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
> `;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/tinytest.o -MD -MP -MF $depbase.Tpo -c -o
> src/test/tinytest.o src/test/tinytest.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'
> `;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest.o -MD -MP -MF $depbase.Tpo -c -o
> src/test/unittest.o src/test/unittest.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest_base64.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest_base64.o -MD -MP -MF $depbase.Tpo -c
> -o src/test/unittest_base64.o src/test/unittest_base64.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest_compression.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest_compression.o -MD -MP -MF
> $depbase.Tpo -c -o src/test/unittest_compression.o
> src/test/unittest_compression.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest_crypt.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest_crypt.o -MD -MP -MF $depbase.Tpo -c -
> o src/test/unittest_crypt.o src/test/unittest_crypt.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest_pdfsteg.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest_pdfsteg.o -MD -MP -MF $depbase.Tpo -
> c -o src/test/unittest_pdfsteg.o src/test/unittest_pdfsteg.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/unittest_socks.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/unittest_socks.o -MD -MP -MF $depbase.Tpo -c -
> o src/test/unittest_socks.o src/test/unittest_socks.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo unitgrplist.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT unitgrplist.o -MD -MP -MF $depbase.Tpo -c -o
> unitgrplist.o unitgrplist.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/gtest/gtest_main.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/gtest/gtest_main.o -MD -MP -MF $depbase.Tpo -
> c -o src/test/gtest/gtest_main.o src/test/gtest/gtest_main.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/gtest/gtest-all.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/gtest/gtest-all.o -MD -MP -MF $depbase.Tpo -c
> -o src/test/gtest/gtest-all.o src/test/gtest/gtest-all.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/steg_test/steg_mod_unittest.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/steg_test/steg_mod_unittest.o -MD -MP -MF
> $depbase.Tpo -c -o src/test/steg_test/steg_mod_unittest.o
> src/test/steg_test/steg_mod_unittest.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/test/steg_test/payload_scraper_unittest.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/steg_test/payload_scraper_unittest.o -MD -MP -
> MF $depbase.Tpo -c -o src/test/steg_test/payload_scraper_unittest.o
> src/test/steg_test/payload_scraper_unittest.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o tltester src/test/tltester.o
> src/util.o src/util-net.o -levent
> depbase=`echo src/test/tester_proxy/tester_proxy.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/test/tester_proxy/tester_proxy.o -MD -MP -MF
> $depbase.Tpo -c -o src/test/tester_proxy/tester_proxy.o
> src/test/tester_proxy/tester_proxy.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> depbase=`echo src/http_parser/http_parser.o | sed 's|
> [^/]*$|.deps/&|;s|\.o$||'`;\
> g++ -I. -I./src -I./src/steg -I./src/steg/http_steg_mods -
> I./src/test/gtest -I./src/test/gtest/include -Wall -Wextra -
> Wno-missing-field-initializers -Wformat=2 -std=c++0x -g -O2 -
> std=gnu++11 -MT src/http_parser/http_parser.o -MD -MP -MF $depbase.Tpo
> -c -o src/http_parser/http_parser.o src/http_parser/http_parser.cc &&\
> mv -f $depbase.Tpo $depbase.Po
> rm -f libstegotorus.a
> ar cru libstegotorus.a src/base64.o src/compression.o
> src/connections.o src/crypt.o src/mkem.o src/network.o src/protocol.o
> src/rng.o src/socks.o src/steg.o src/util.o src/util-net.o
> src/evbuf_util.o src/curl_util.o src/transparent_proxy.o
> src/protocol/chop.o src/protocol/chop_blk.o src/protocol/null.o
> src/steg/b64cookies.o src/steg/cookies.o src/steg/embed.o
> src/steg/http.o src/steg/http_apache.o src/steg/http_apache.o
> src/steg/http_steg_mods/file_steg.o src/steg/http_steg_mods/pdfSteg.o
> src/steg/http_steg_mods/swfSteg.o src/steg/http_steg_mods/jsSteg.o
> src/steg/http_steg_mods/jpgSteg.o src/steg/http_steg_mods/pngSteg.o
> src/steg/http_steg_mods/gifSteg.o src/steg/nosteg.o
> src/steg/nosteg_rr.o src/steg/payload_server.o
> src/steg/trace_payload_server.o src/steg/payload_scraper.o
> src/steg/apache_payload_server.o src/subprocess-unix.o protolist.o
> steglist.o
> : libstegotorus.a
> /bin/bash ./src/audit-globals.sh src/base64.o src/compression.o
> src/connections.o src/crypt.o src/mkem.o src/network.o src/protocol.o
> src/rng.o src/socks.o src/steg.o src/util.o src/util-net.o
> src/evbuf_util.o src/curl_util.o src/transparent_proxy.o
> src/protocol/chop.o src/protocol/chop_blk.o src/protocol/null.o
> src/steg/b64cookies.o src/steg/cookies.o src/steg/embed.o
> src/steg/http.o src/steg/http_apache.o src/steg/http_apache.o
> src/steg/http_steg_mods/file_steg.o src/steg/http_steg_mods/pdfSteg.o
> src/steg/http_steg_mods/swfSteg.o src/steg/http_steg_mods/jsSteg.o
> src/steg/http_steg_mods/jpgSteg.o src/steg/http_steg_mods/pngSteg.o
> src/steg/http_steg_mods/gifSteg.o src/steg/nosteg.o
> src/steg/nosteg_rr.o src/steg/payload_server.o
> src/steg/trace_payload_server.o src/steg/payload_scraper.o
> src/steg/apache_payload_server.o src/subprocess-unix.o protolist.o
> steglist.o src/main.o
> sed: -e expression #1, char 113: unknown option to `s'
> touch stamp-audit-globals
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o unittests src/test/tinytest.o
> src/test/unittest.o src/test/unittest_base64.o
> src/test/unittest_compression.o src/test/unittest_crypt.o
> src/test/unittest_pdfsteg.o src/test/unittest_socks.o unitgrplist.o
> libstegotorus.a -levent -lcrypto -lz -lcurl -lboost_system -
> lboost_filesystem -lconfig++
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o tester_proxy
> src/test/tester_proxy/tester_proxy.o -levent_openssl -levent -lssl -
> lcrypto
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o webpage_tester
> src/test/webpage_tester.o src/util.o src/util-net.o src/curl_util.o
> src/http_parser/http_parser.o -levent -lcrypto -lz -lcurl -
> lboost_system -lboost_filesystem -lconfig++
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o stegotorus src/main.o libstegotorus.a
> -levent -lcrypto -lz -lcurl -lboost_system -lboost_filesystem -
> lconfig++
> g++ -Wall -Wextra -Wno-missing-field-initializers -Wformat=2 -
> std=c++0x -g -O2 -std=gnu++11 -o g_unittests
> src/test/gtest/gtest_main.o src/test/gtest/gtest-all.o
> src/test/steg_test/steg_mod_unittest.o
> src/test/steg_test/payload_scraper_unittest.o libstegotorus.a -levent -
> lcrypto -lz -lcurl -lboost_system -lboost_filesystem -lconfig++
> /usr/bin/ld: src/test/gtest/gtest-all.o: undefined reference to symbol
> 'pthread_key_delete@@GLIBC_2.2.5'
> /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO
> missing from command line
> collect2: error: ld returned 1 exit status
> make[1]: *** [g_unittests] Error 1
> make[1]: Leaving directory `/home/selimthegrim/stegotorus'
> make: *** [all] Error 2
More information about the tor-dev
mailing list