MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.11k stars 19.2k forks source link

[BUG] Test framework mutates permissions on buildroot components #20433

Closed brianredbeard closed 3 years ago

brianredbeard commented 3 years ago

Bug Description

When using the newly introduced test framework, within the Makefile the contents of buildroot/bin/ and buildroot/tests/ unceremoniously have their permissions changed adding the executable mode bit. This results in changes to the files within the context of Git.

Configuration Files

bug-report-configs.zip

None, this is working directly on the upstream bugfix-2.0.x branch.

Steps to Reproduce

  1. Check the current state of the repository:
[~/Projects/Arduino/Marlin]$ git status 
On branch bugfix-2.0.x
Your branch is up to date with 'remotes/origin/bugfix-2.0.x'.

nothing to commit, working tree clean
  1. Run the test suite (for this case I'm specifying one of the BTT boards because it completes more quickly and is irrelevant to the issue):
[~/Projects/Arduino/Marlin]$ PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:~/.platformio/penv/bin make --debug tests-single-local -e TEST_TARGET=STM32F103RE_btt
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
 File 'tests-single-local' does not exist.
Must remake target 'tests-single-local'.
chmod +x buildroot/bin/*
chmod +x buildroot/tests/*
export PATH=./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin \
  && export VERBOSE_PLATFORMIO= \
  && run_tests . STM32F103RE_btt ""
Running STM32F103RE_btt Tests

[Test STM32F103RE_btt --target clean] Setup Build Environment...
Passed
which: no gsed in (./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin:/home/bharrington/Projects/Arduino/Marlin/buildroot/tests:./buildroot/bin)
which: no gsed in (./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin:/home/bharrington/Projects/Arduino/Marlin/buildroot/tests:./buildroot/bin)
which: no gsed in (./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin:/home/bharrington/Projects/Arduino/Marlin/buildroot/tests:./buildroot/bin)
which: no gsed in (./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin:/home/bharrington/Projects/Arduino/Marlin/buildroot/tests:./buildroot/bin)
which: no gsed in (./buildroot/bin/:./buildroot/tests/:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bharrington/.platformio/penv/bin:/home/bharrington/Projects/Arduino/Marlin/buildroot/tests:./buildroot/bin)

[Test STM32F103RE_btt] BigTreeTech SKR E3 DIP v1.0 - Basic Config with mixed TMC Drivers...
 - framework-arduinoststm32-maple 3.10000.201129 (1.0.0) 
Passed
All tests completed successfully
Successfully remade target file 'tests-single-local'.
  1. Check the current state of the files in the repository:
[~/Projects/Arduino/Marlin]$ git status
On branch bugfix-2.0.x
Your branch is up to date with 'remotes/origin/bugfix-2.0.x'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   buildroot/tests/ARMED-tests
    modified:   buildroot/tests/BIGTREE_BTT002-tests
    modified:   buildroot/tests/BIGTREE_GTR_V1_0-tests
    modified:   buildroot/tests/BIGTREE_SKR_PRO-tests
    modified:   buildroot/tests/FLYF407ZG-tests
    modified:   buildroot/tests/FYSETC_F6_13-tests
    modified:   buildroot/tests/FYSETC_S6-tests
    modified:   buildroot/tests/LERDGEX-tests
    modified:   buildroot/tests/NUCLEO_F767ZI-tests
    modified:   buildroot/tests/REMRAM_V1-tests
    modified:   buildroot/tests/SAMD51_grandcentral_m4-tests
    modified:   buildroot/tests/STM32F070CB_malyan-tests
    modified:   buildroot/tests/STM32F070RB_malyan-tests
    modified:   buildroot/tests/STM32F103CB_malyan-tests
    modified:   buildroot/tests/STM32F103RC_btt-tests
    modified:   buildroot/tests/STM32F103RC_btt_USB-tests
    modified:   buildroot/tests/STM32F103RC_fysetc-tests
    modified:   buildroot/tests/STM32F103RC_meeb-tests
    modified:   buildroot/tests/STM32F103RET6_creality-tests
    modified:   buildroot/tests/STM32F103RE_btt-tests
    modified:   buildroot/tests/STM32F103RE_btt_USB-tests
    modified:   buildroot/tests/STM32F401VE_STEVAL-tests
    modified:   buildroot/tests/at90usb1286_cdc-tests
    modified:   buildroot/tests/at90usb1286_dfu-tests
    modified:   buildroot/tests/jgaurora_a5s_a1-tests
    modified:   buildroot/tests/mega1280-tests
    modified:   buildroot/tests/mks_robin-tests
    modified:   buildroot/tests/mks_robin_lite-tests
    modified:   buildroot/tests/mks_robin_mini-tests
    modified:   buildroot/tests/mks_robin_nano35-tests
    modified:   buildroot/tests/mks_robin_nano35_stm32-tests
    modified:   buildroot/tests/mks_robin_pro-tests
    modified:   buildroot/tests/mks_robin_stm32-tests
    modified:   buildroot/tests/rambo-tests
    modified:   buildroot/tests/rumba32-tests
    modified:   buildroot/tests/sanguino1284p-tests
    modified:   buildroot/tests/sanguino644p-tests
    modified:   buildroot/tests/teensy41-tests

no changes added to commit (use "git add" and/or "git commit -a")

Expected behavior:

If the tests need execute permissions, these should be set in revision control. If there is a concern about ensuring tests are added with the correct permissions when committed a check should be added on incoming pull requests.

Actual behavior:

See #3 above.

sjasonsmith commented 3 years ago

Thanks for reporting this @brianredbeard. This was missed earlier because some of us are one Windows, where permissions issues go unnoticed.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.