Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275170

Some jtreg sound tests should be marked with sound keyword

XMLWordPrintable

        The javax.sound jtreg tests do not have the headful keyword so are eligible to be run on systems where the test environment may be a daemon thread without access to sound devices, or the even there may be no sound devices in a VM.

        It appears that the result is that tests are bailing and reporting a pass in such situations eg this run of javax/sound/midi/Synthesizer/AsynchronousMidiChannel.java on a Windows VM :
        ====

        command: main AsynchronousMidiChannel
        reason: Assumed action based on file name: run main AsynchronousMidiChannel
        Mode: othervm
        Additional options from @modules: --add-modules java.desktop
        elapsed time (seconds): 0.752
        ----------configuration:(3/43)----------
        Boot Layer
          add modules: java.desktop

        ----------System.out:(2/74)----------
        Got synth: com.sun.media.sound.SoftSynthesizer@767f90bd
        could not test.
        ----------System.err:(2/115)----------
        MidiUnavailableException was thrown: javax.sound.midi.MidiUnavailableException: Can not open line
        STATUS:Passed.

        ===

        There needs to be a (tedious) audit of these tests to see which ones need
         @key headful
        which would mean "this test actually needs the sound device" just like many UI tests really need a framebuffer, since the resources are "usually" equivalent
        I think
        @ key sound
        would be useful too even if we don't use it (yet) just to be available.
        The sound tests are neatly partioned into the javax/sound directory so it could be argued it is implied but it would still be better to have it explicit because we could also have a VM situation where we have a virtual framebuffer but no virtual sound

              prr Philip Race
              prr Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: