[Home]

Summary:ASTERISK-24292: Asterisk testsuite - Files that should (or not) be executable
Reporter:Tzafrir Cohen (tzafrir)Labels:
Date Opened:2014-08-31 14:34:09Date Closed:
Priority:MajorRegression?
Status:Open/NewComponents:Tests/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This is a minor issue I encountered while packaging the asterisk test
suite.

Lintian, the Debian packaging checker, (mostly rightly) complained about
some files that were executable and should not have been and vice versa.

Here is what I needed to do to override most of the warnings:

Below, using Makefile syntax. The testsuite files were installed under
$(target).
{noformat}
       find $(target)/tests -name \*.py -executable | \
               while read file; do \
                       if head -q -n1 $$file | egrep -q "^('''|\"\"\")"; then \
                               chmod a-x $$file; \
                       fi; \
               done
       find $(target)/tests/channels/SIP/rfc2833_dtmf_detect \
               -name \*.xml -exec chmod a-x \{\} \;
{noformat}

So I removed the executable bits from some XML files and from some
(actually many) python files that had <'''> or <"""> in the first line.
Those are surely not executable (#!).This is a minor issue I encountered while packaging the asterisk test
suite.

Lintian, the Debian packaging checker, (mostly rightly) complained about
some files that were executable and should not have been and vice versa.

Here is what I needed to do to override most of the warnings:

Below, using Makefile syntax. The testsuite files were installed under
$(target).
{noformat}
       find $(target)/tests -name \*.py -executable | \
               while read file; do \
                       if head -q -n1 $$file | egrep -q "^('''|\"\"\")"; then \
                               chmod a-x $$file; \
                       fi; \
               done
       find $(target)/tests/channels/SIP/rfc2833_dtmf_detect \
               -name \*.xml -exec chmod a-x \{\} \;
{noformat}

So I removed the executable bits from some XML files and from some
(actually many) python files that had <'''> or <"""> in the first line.
Those are surely not executable (#!).This is a minor issue I encountered while packaging the asterisk test
suite.

Lintian, the Debian packaging checker, (mostly rightly) complained about
some files that were executable and should not have been and vice versa.

Here is what I needed to do to override most of the warnings:

Below, using Makefile syntax. The testsuite files were installed under
$(target).
{noformat}
       find $(target)/tests -name \*.py -executable | \
               while read file; do \
                       if head -q -n1 $$file | egrep -q "^('''|\"\"\")"; then \
                               chmod a-x $$file; \
                       fi; \
               done
       find $(target)/tests/channels/SIP/rfc2833_dtmf_detect \
               -name \*.xml -exec chmod a-x \{\} \;
{noformat}

So I removed the executable bits from some XML files and from some
(actually many) python files that had <'''> or <"""> in the first line.
Those are surely not executable (#!).This is a minor issue I encountered while packaging the asterisk test
suite.

Lintian, the Debian packaging checker, (mostly rightly) complained about
some files that were executable and should not have been and vice versa.

Here is what I needed to do to override most of the warnings:

Below, using Makefile syntax. The testsuite files were installed under
$(target).
{noformat}
       find $(target)/tests -name \*.py -executable | \
               while read file; do \
                       if head -q -n1 $$file | egrep -q "^('''|\"\"\")"; then \
                               chmod a-x $$file; \
                       fi; \
               done
       find $(target)/tests/channels/SIP/rfc2833_dtmf_detect \
               -name \*.xml -exec chmod a-x \{\} \;
{noformat}

So I removed the executable bits from some XML files and from some
(actually many) python files that had <'''> or <"""> in the first line.
Those are surely not executable (#!).

Left over warnings:
{noformat}
W: asterisk-testsuite: script-not-executable usr/share/asterisk-testsuite/lib/sh/library.sh
W: asterisk-testsuite: script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/donothing.agi
W: asterisk-testsuite: script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/executing.agi
W: asterisk-testsuite: script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/waiting.agi
W: asterisk-testsuite: script-not-executable usr/share/asterisk-testsuite/tests/skeleton_test/run-test
{noformat}

library.sh surely should not need a script header (and if you just give
it a header for identification: #!/bin/sh is better). Not sure if the
AGIs are intentionally not executable.

For the record, I suppressed the following:

# For tests that check bad interpreters:
{noformat}
unusual-interpreter usr/share/asterisk-testsuite/tests/agi/exit_status/badinterpreter.agi #!/bin/this-path-does-not-exist
script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/badinterpreter2.agi
wrong-path-for-interpreter usr/share/asterisk-testsuite/tests/agi/exit_status/badinterpreter3.agi (#!/tmp/bash != /bin/bash)
script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi
unusual-interpreter usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/badinterpreter.agi #!/bin/this-path-does-not-exist
script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/badinterpreter2.agi
script-not-executable usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi
wrong-path-for-interpreter usr/share/asterisk-testsuite/tests/agi/exit_status/userA/agi-bin/badinterpreter3.agi (#!/tmp/bash != /bin/bash)
{noformat}
Comments:By: Matt Jordan (mjordan) 2014-09-03 11:04:15.120-0500

Tzafrir - do you have a patch that fixes the above mentioned issues?