Exemple #1
0
    def run_sql_under_KM_dropMore(self, suffix):

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +
                        ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=80\"'
        )
        self.assertTrue(result)

        sql_file = local_path(self.gucCheck_sql + str(self._testMethodName) +
                              suffix + '.sql')
        self.assertTrue(PSQL.run_sql_file(sql_file))

        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"')
        self.assertTrue(result)

        out_file = sql_file.replace(".sql", ".out")

        return out_file
Exemple #2
0
    def run_sql_under_KM_dropMore(self,suffix):
        
        result = runShellCommand('gpssh' + self.hoststr +  ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +  ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=80\"') 
        self.assertTrue(result)
        
        sql_file = local_path(self.gucCheck_sql + str(self._testMethodName) + suffix + '.sql')
        self.assertTrue(PSQL.run_sql_file(sql_file))        

        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"') 
        self.assertTrue(result)        

        out_file = sql_file.replace(".sql",".out")

        return out_file
Exemple #3
0
    def run_sql_under_KM(self, suffix):

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +
                        ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=5\"'
        )
        self.assertTrue(result)

        sql_result = self.run_sql_file(
            local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +
                       '.sql'),
            local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +
                       '.ans'))

        result = runShellCommand('gpssh' + self.hoststr +
                                 ' \"sudo cat /proc/ickmlog \"' + '> ickm.log')
        self.assertTrue(result)

        result = runShellCommand(
            'gpssh' + self.hoststr +
            ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"')
        self.assertTrue(result)

        # Remove KM before check testing result to make sure KM could be removed if case failed.
        self.assertTrue(sql_result)

        # Check if DISORDER info exist
        check_result = self.checkOutputPattern("ickm.log", "DIS")
        return check_result
Exemple #4
0
    def run_sql_under_KM(self,suffix):
        
        result = runShellCommand('gpssh' + self.hoststr +  ' \"sudo dmesg -c\"')
        self.assertTrue(result)
        runShellCommand('gpssh ' + self.hoststr +  ' \"export PATH=$PATH:/sbin; \
                                            sudo rmmod ickm.ko\"')
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo insmod ickm.ko ict_type=0x101 seq_array=2 drop_times=5\"') 
        self.assertTrue(result)
        
        sql_result = self._run_test(local_path(self.gucCheck_sql + str(self._testMethodName) + suffix +'.sql'), 
                                local_path(self.gucCheck_sql + str(self._testMethodName) + suffix + '.ans'))

        result = runShellCommand('gpssh' + self.hoststr + ' \"sudo cat /proc/ickmlog \"' + '> ickm.log') 
        self.assertTrue(result)
    
        result = runShellCommand('gpssh' + self.hoststr +  ' \"export PATH=$PATH:/sbin;sudo rmmod ickm.ko \"') 
        self.assertTrue(result)        
  
        # Remove KM before check testing result to make sure KM could be removed if case failed. 
        self.assertTrue(sql_result)
        
        # Check if DISORDER info exist
        check_result = self.checkOutputPattern("ickm.log", "DIS")
        return check_result