Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relying on --data-dir can be problematic. #9175

Open
0xFFFC0000 opened this issue Feb 16, 2024 · 1 comment
Open

Relying on --data-dir can be problematic. #9175

0xFFFC0000 opened this issue Feb 16, 2024 · 1 comment

Comments

@0xFFFC0000
Copy link
Collaborator

In functional_tests we define --data-dir for the daemon but, the daemon will read the default --config-file too. If you have anything in your default config file that would interfere with tests, that means tests are not going to run correctly.

E.g. you can run the mining test in functional_tests with:

/usr/bin/python3 /home/0xfffc/developments/monero/tests/functional_tests/functional_tests_rpc.py /usr/bin/python3 /home/0xfffc/developments/monero/tests/functional_tests /home/0xfffc/developments/monero/build mining

these are the commands we are running for the mining test in functional_tests:


/home/0xfffc/developments/monero/build/bin/monerod --regtest --fixed-difficulty 10 --no-igd --p2p-bind-port 18280 --rpc-bind-port 18180 --zmq-rpc-bind-port 18380 --zmq-pub tcp://127.0.0.1:18480 --non-interactive --disable-dns-checkpoints --check-updates disabled --rpc-ssl disabled --data-dir /home/0xfffc/developments/monero/build/functional-tests-directory/monerod0 --log-level 1 --offline


/home/0xfffc/developments/monero/build/bin/monerod --regtest --fixed-difficulty 10 --no-igd --p2p-bind-port 18281 --rpc-bind-port 18181 --zmq-rpc-bind-port 18381 --zmq-pub tcp://127.0.0.1:18481 --non-interactive --disable-dns-checkpoints --check-updates disabled --rpc-ssl disabled --data-dir /home/0xfffc/developments/monero/build/functional-tests-directory/monerod1 --log-level 1 --rpc-payment-address 44SKxxLQw929wRF6BA9paQ1EWFshNnKhXM3qz6Mo3JGDE2YG3xyzVutMStEicxbQGRfrYvAAYxH6Fe8rnD56EaNwUiqhcwR --rpc-payment-difficulty 10 --rpc-payment-credits 5000 --offline


/home/0xfffc/developments/monero/build/bin/monerod --regtest --fixed-difficulty 10 --no-igd --p2p-bind-port 18282 --rpc-bind-port 18182 --zmq-rpc-bind-port 18382 --zmq-pub tcp://127.0.0.1:18482 --non-interactive --disable-dns-checkpoints --check-updates disabled --rpc-ssl disabled --data-dir /home/0xfffc/developments/monero/build/functional-tests-directory/monerod2 --log-level 1 --add-exclusive-node 127.0.0.1:18283


/home/0xfffc/developments/monero/build/bin/monerod --regtest --fixed-difficulty 10 --no-igd --p2p-bind-port 18283 --rpc-bind-port 18183 --zmq-rpc-bind-port 18383 --zmq-pub tcp://127.0.0.1:18483 --non-interactive --disable-dns-checkpoints --check-updates disabled --rpc-ssl disabled --data-dir /home/0xfffc/developments/monero/build/functional-tests-directory/monerod3 --log-level 1 --add-exclusive-node 127.0.0.1:18282


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18090 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --daemon-port 18180


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18091 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --daemon-port 18180


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18092 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --daemon-port 18180


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18093 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --daemon-port 18180


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18094 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --daemon-port 18182


/home/0xfffc/developments/monero/build/bin/monero-wallet-rpc --wallet-dir /home/0xfffc/developments/monero/build/functional-tests-directory --rpc-bind-port 18095 --disable-rpc-login --rpc-ssl disabled --daemon-ssl disabled --log-level 1 --allow-mismatched-daemon-version --offline

@hyc
Copy link
Collaborator

hyc commented Feb 16, 2024

Would be a good idea to have a --no-config-file option to prevent that from being read while running tests.
Or, have the test suite create its own config file and specify that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants