Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power


#Servers
#Opensource
 View Only
  • 1.  dsadm issue after AIX 7.2 migration

    Posted 06/25/18 01:04 PM

    Originally posted by: Faisal_IBM


    After migration from AIX 7.1 to 7.2, the dsadm utility stopped working with the following error;

    Can't locate Expect.pm in @INC (you may need to install the Expect module) (@INC contains: /usr/opt/perl5/lib/site_perl/5.20.1/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.20.1 /usr/opt/perl5/lib/5.20.1/aix-thread-multi /usr/opt/perl5/lib/5.20.1 /usr/opt/perl5/lib/site_perl .   /opt/ibm/dsadm/bin/perlmods/aix/6.1.0.0 /opt/ibm/dsadm/bin/perlmods/Expect /opt/ibm/dsadm/bin/perlmods) at /usr/bin/dsadm line 127.
    BEGIN failed--compilation aborted at /usr/bin/dsadm line 127.

     

    When tried to install Expect, getting error;

    # echo $PATH
    /opt/IBM/xlC/13.1.3/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java5/jre/bin:/usr/java5/bin:/usr/local/bin

     

    # perl -MCPAN -e shell

    cpan[1]> install Expect
    Reading '/.cpan/Metadata'
      Database was generated on Mon, 25 Jun 2018 15:17:03 GMT
    Running install for module 'Expect'
    Checksum for /.cpan/sources/authors/id/J/JA/JACOBY/Expect-1.35.tar.gz ok
    Scanning cache /.cpan/build for sizes
    ............................................................................DONE
    'YAML' not installed, will not store persistent state
    Configuring J/JA/JACOBY/Expect-1.35.tar.gz with Makefile.PL
    Checking if your kit is complete...
    Looks good
    Generating a Unix-style Makefile
    Writing Makefile for Expect
    Writing MYMETA.yml and MYMETA.json
      JACOBY/Expect-1.35.tar.gz
      /usr/opt/perl5/bin/perl Makefile.PL -- OK
    Running make for J/JA/JACOBY/Expect-1.35.tar.gz
    cp lib/Expect.pm blib/lib/Expect.pm
    Manifying blib/man3/Expect.3
      JACOBY/Expect-1.35.tar.gz
      /usr/bin/make -- OK
    Running make test
            PERL_DL_NONLAZY=1 /usr/opt/perl5/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/01-test.t .......     # Basic tests...
    t/01-test.t ....... 1/14     # Testing exec failure...
        # Testing exp_continue...
        # number of timeout calls in 5 sec: 4
    t/01-test.t ....... 4/14     # timeout shouldn't destroy accum contents
    t/01-test.t ....... 5/14     # Testing -notransfer...
    t/01-test.t ....... 6/14     # Testing raw reversing...
        # isatty($exp): YES
        # Called: 3
        # Elapsed time: 6  delay by expect: 4.5
        # Elapsed time: 5  delay by expect: 3.9
        # Elapsed time: 6  delay by expect: 4.3
        # Called: 3
    t/01-test.t ....... 7/14     # Check if the raw pty can handle large chunks of text at once
        # ------------------------------------------------------------------------------
        #   The following tests check system-dependend behaviour, so even if some fail,
        #   Expect might still be perfectly usable for you!
        # ------------------------------------------------------------------------------
        # Length: 512
        # Good, your raw pty can handle lines of at least 512 bytes at a time.
        # Status: match
    t/01-test.t ....... 8/14     # Check if the default pty can handle large chunks of text at once
        # ------------------------------------------------------------------------------
        #   The following tests check system-dependend behaviour, so even if some fail,
        #   Expect might still be perfectly usable for you!
        # ------------------------------------------------------------------------------
        # Length: 164
        # Good, your default pty can handle lines of at least 164 bytes at a time.
        # Status: match
    t/01-test.t ....... 9/14     # Testing controlling terminal...
        # Checking if exit status is returned correctly...
        # soft_close: 0x2A00
    t/01-test.t ....... 11/14     # Checking if signal exit status is returned correctly...
        # soft_close: 0x000F
    t/01-test.t ....... 12/14 # 
    # Checking if EOF on pty slave is correctly reported to master...
    # (this fails on about 50% of the supported systems, so don't panic!
    #  Expect will work anyway!)

    t/01-test.t ....... 13/14     
        #   Failed test 'Sorry, you may not notice if the spawned process closes the pty. (timeout)'
        #   at t/01-test.t line 434.
        #                   'eof'
        #     doesn't match '(?^:^timeout$)'
        # Looks like you failed 1 test of 1.

    #   Failed test 'eof_on_pty'
    #   at t/01-test.t line 436.
    t/01-test.t ....... 14/14 # Please scroll back and check which test(s) failed and what comments
    # were given.  Expect probably is still completely usable!!
    # Looks like you failed 1 test of 14.
    t/01-test.t ....... Dubious, test returned 1 (wstat 256, 0x100)
    Failed 1/14 subtests 
    t/02-bc.t ......... skipped: See https://rt.cpan.org/Ticket/Display.html?id=98495
    t/03-log.t ........ # Test created for https://rt.cpan.org/Ticket/Display.html?id=62359 related to clear_accum
    t/03-log.t ........ ok     
    t/04-multiline.t .. ok     
    t/10-internal.t ... ok     
    t/11-calc.t ....... 1/22 # SPACE
    t/11-calc.t ....... ok     

    Test Summary Report
    -------------------
    t/01-test.t     (Wstat: 256 Tests: 14 Failed: 1)
      Failed test:  13
      Non-zero exit status: 1
    Files=6, Tests=97, 69 wallclock secs ( 0.05 usr  0.02 sys +  0.47 cusr  0.18 csys =  0.72 CPU)
    Result: FAIL
    Failed 1/6 test programs. 1/97 subtests failed.
    make: 1254-004 The error code from the last command is 255.


    Stop.
      JACOBY/Expect-1.35.tar.gz
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports JACOBY/Expect-1.35.tar.gz
    Failed during this command:
     JACOBY/Expect-1.35.tar.gz                    : make_test NO

    cpan[2]> 


    #AIX-Open-Source-Software
    #AIXOpenSource


  • 2.  Re: dsadm issue after AIX 7.2 migration

    Posted 06/26/18 08:35 AM

    Originally posted by: sangameshm


    Not done the complete analysis but looks like adding below changes to eof_on_pty subtest will run the tests fine.

    --- t/01-test.t_orig    2018-06-26 07:33:34.000000000 -0500
    +++ t/01-test.t 2018-06-26 07:33:12.000000000 -0500
    @@ -430,6 +430,9 @@
            if ($Config{osname} eq 'linux') {
                    $expected = '(eof|timeout)';
            }
    +       if ($Config{osname} eq 'aix') {
    +               $expected = '(eof|timeout)';
    +       }
      
            like $res, qr/^$expected$/, "Sorry, you may not notice if the spawned process closes the pty. ($expected)";
            $exp->hard_close();

     

     

     

            PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/01-test.t .......     # Basic tests...
    t/01-test.t ....... 1/14     # Testing exec failure...
        # Testing exp_continue...
        # number of timeout calls in 5 sec: 4
    t/01-test.t ....... 4/14     # timeout shouldn't destroy accum contents
    t/01-test.t ....... 5/14     # Testing -notransfer...
    t/01-test.t ....... 6/14     # Testing raw reversing...
        # isatty($exp): YES
        # Called: 3
        # Elapsed time: 6  delay by expect: 4.5
        # Elapsed time: 5  delay by expect: 3.9
        # Elapsed time: 6  delay by expect: 4.3
        # Called: 3
    t/01-test.t ....... 7/14     # Check if the raw pty can handle large chunks of text at once
        # ------------------------------------------------------------------------------
        #   The following tests check system-dependend behaviour, so even if some fail,
        #   Expect might still be perfectly usable for you!
        # ------------------------------------------------------------------------------
        # Length: 512
        # Good, your raw pty can handle lines of at least 512 bytes at a time.
        # Status: match
    t/01-test.t ....... 8/14     # Check if the default pty can handle large chunks of text at once
        # ------------------------------------------------------------------------------
        #   The following tests check system-dependend behaviour, so even if some fail,
        #   Expect might still be perfectly usable for you!
        # ------------------------------------------------------------------------------
        # Length: 164
        # Good, your default pty can handle lines of at least 164 bytes at a time.
        # Status: match
    t/01-test.t ....... 9/14     # Testing controlling terminal...
    t/01-test.t ....... 10/14     # Checking if exit status is returned correctly...
    t/01-test.t ....... 11/14     # soft_close: 0x2A00
        # Checking if signal exit status is returned correctly...
    t/01-test.t ....... 12/14     # soft_close: 0x000F

    # Checking if EOF on pty slave is correctly reported to master...
    # (this fails on about 50% of the supported systems, so don't panic!
    #  Expect will work anyway!)

    t/01-test.t ....... ok     
    t/02-bc.t ......... skipped: See https://rt.cpan.org/Ticket/Display.html?id=98495
    t/03-log.t ........ # Test created for https://rt.cpan.org/Ticket/Display.html?id=62359 related to clear_accum
    t/03-log.t ........ ok     
    t/04-multiline.t .. ok     
    t/10-internal.t ... ok     
    t/11-calc.t ....... 1/22 # OUTPUT
    t/11-calc.t ....... ok     
    All tests successful.
    Files=6, Tests=97, 71 wallclock secs ( 0.06 usr  0.04 sys +  0.52 cusr  0.29 csys =  0.91 CPU)
    Result: PASS
    Target "test" is up to date.

     


    #AIXOpenSource
    #AIX-Open-Source-Software